Q: 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
Darn my feeble typing fingers. In the original post I put a space in the command path... Sigh. So sorry. You need:
sudo pg_dump -h /Library/Server/ProfileManager/Config/var/PostgreSQL -U _devicemgr devicemgr_v2m0 -c -f ~/Desktop/profileManager.sql
Notice in that /Library/Server/ProfileManager/Config/var/PostgreSQL is correct, not /Library/Server/ ProfileManager/Config/var/PostgreSQL (grr).
Automating the process is turning the command into a script and then using cron or launchd to run it automatically.
Reid
Apple Consultants Network
Author "Yosemite Server – Foundation Services" :: Exclusively available in Apple's iBooks Store
Author "Mavericks Server – Foundation Services" :: Exclusively available in Apple's iBooks Store
Author "Mavericks Server – Control and Collaboration" :: Exclusively available in Apple's iBooks Store
Posted on Mar 5, 2015 9:26 AM