You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I backup profile manager database on OS X Yosemite?

Hello guys,

I'm struggling to find an answer on how to backup profile manager database(devices, groups etc.) on Yosemite(server 4), so far I only found a few threads for Mavericks (10.9) & Server 3 saying to type the following command via terminal: "sudo pg_dump -U _postgres -c device_management > $HOME/device_management.sql"

Although this command applies to Mavericks(server 3) I decided to give it a shot but as expected I got this error message:

"pg_dump: [archiver (db)] connection to database "device_management" failed: could not connect to server: No such file or directory

Is the server running locally and accepting

connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?"

I also tried to backup & restore profile manager's database with TimeMachine but unfortunately it didn't worked..

It seems that TimeMachine misses the profile manager's data folders(see thread: Profile Manager not being backed up in Time Machine?)

and I saw that other people also complained about this problem.


As we're a company who holds thousands of devices & integrates them on daily basis to profile manager, I would be very pleased to know how to backup our Profile manager's database.
Please see this question as HIGH importance, I really hope to get an answer ASAP..

Thanks in advance for all the repliers! 🙂


Yours sincerely,

Daniel Adler.

iPad Mini, iOS 8.1.3, OS X Server ver. 4

Posted on Mar 2, 2015 2:09 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 13, 2017 7:05 AM

UPDATED FOR SIERRA

Just revisiting this post.


Here is the correct syntax to backup / export the Profile Manager database when running Sierra


sudo -u _devicemgr pg_dump -h /Library/Server/ProfileManager/Config/var/PostgreSQL -U _devicemgr devicemgr_v2m0 -c -f ~/Desktop/profileManager.sql

20 replies

Mar 31, 2016 10:05 AM in response to Đaniel

Hey guys,


I'm just setting up a new 10.11 server and attempted to import that PM data from a live 10.9 server via this method and although it completed the import, there we a lot of errors and subsequently PM was pretty broken ( i.e. wouldn't load in the browser).


I should maybe have asked here first but thought I'd give it a go as I was in a test environment!


Anyone know if there is a method to achieve what I'm attempting? Or have Apple moved the goalposts as per usual?


Cheers!

How do I backup profile manager database on OS X Yosemite?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.