NOTE: Bender is no longer being developed as the need to run OS X Server has greatly diminished ... and now it's gone to server heaven (or hell).
Click Here to download Bender.
What is Bender?
Bender is a utility written by Forget Computers to automate the backup of OS X Server settings to provide easy restoration of services should they become corrupt and for importing server settings after a migration or server upgrade. Additional instructions are available here at krypted.com.
How does it work?
Bender is provided as a simple PKG installer. Once installed, Bender will create a Backup directory in the root of the boot drive. Each evening at 10 PM Bender creates the following files (and keeps the backups for 30 days before removing old copies):
- A directory with the date and time the backup was run.
- An Open Directory archive if the server is running as an Open Directory master.
- A single XML plist of all the server settings (running or not) found in either Server Admin or Server (depending on your operating system).
- A series of individual XML plists of each server setting, so restoration or import of select settings is possible.
What OS X Server operating systems does Bender support?
Bender is robust and supports OS X Server 10.6 and later, including OS X 10.11 El Capitan and Server 5. (Bender has not been fully tested in 10.12 Sierra.)
How do I use the backups that Bender creates to restore my settings?
To restore an Open Directory archive:
- Open Server Admin (in 10.7 and earlier) and select the Open Directory service.
- Click on the Archive tab, choose the archive you wish to use, and click Restore.
- To determine the password used to encrypt the archive, run this command inTerminal:
For older versions of Bender:
/sbin/ifconfig | /usr/bin/grep -m 1 ether | /usr/bin/awk '{print $2}' | /usr/bin/sed 's/://g' | /usr/bin/cut -c 5-
For the current release of Bender:
system_profiler SPHardwareDataType | awk '/Hardware UUID/{print $3}'
Note: There is currently no restore option in Server.app in 10.8 or later, so use the command line:
sudo slapconfig -restoredb /path/to/your/archive.sparseimage
To restore all OS X Server settings:
sudo serveradmin settings < /path/to/your-sa_backup-allservices.backup
To restore a specific OS X Server setting:
sudo serveradmin settings < /path/to/your-sa_backup-servicename.backup
To restore Profile Manager:
sudo cat /path/to/your-profile-backup.sql | psql -h /Library/Server/ProfileManager/Config/var/PostgreSQL -U _devicemgr devicemgr_v2m0
To restore Profile Manager in macOS Sierra 10.12.3 and Server.app 5.2: (Thanks to Paul Roomberg for figuring this out!)
sudo pg_restore <path to .pgdump file> -U _devicemgr
Helpful Hint: Terminal in OS X supports drag & drop, so you can simply drag the plist you want to restore instead of typing in the full path.
I've downloaded and installed Bender. What do I do now? Can I customize the settings?
If you change any variable definitions within your deployment please test appropriately! You can edit the Bender backup binary here: /usr/local/robotcloud/bin/bender
To change the default backup destination:
In a text editor (vi, nano, TextWrangler) edit the backupDestination line to point to the external volume of your choice, ex: pathBackups="/Volumes/Drobo"
To change the default Open Directory passphrase:
In a text editor (vi, nano, TextWrangler) edit the ldapPass line with the desired passphrase, ex: ldapPass="BiteMyShinyMetalBackup2016!"
We recommend that you add the Bender Backups directory created by Bender to the scope of your local backup program. If you use CrashPlan PROe you can add this destination as default on all of our managed workstations within a couple of minutes. If you use another backup application, your mileage may vary.
Contact
Bender is provided under the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007. For more information, please visit http://www.gnu.org/licenses/. The likeness of Bender is the property of Matt Groening and others.
If you have any questions, feedback, or suggestions, please contact us and let us know!
Kick Bender Out The Door
Use Terminal to uninstall Bender completely:
sudo launchctl unload /Library/LaunchDaemons/net.robotcloud.bender.plist
sudo rm /Library/LaunchDaemons/net.robotcloud.bender.plist
sudo rm -Rf /usr/local/robotcloud
ADDITIONAL OPTIONS
If you want to disable Bender backups but not uninstall it, you can use this Terminal command:
sudo launchctl unload -w /Library/LaunchDaemons/net.robotcloud.bender.plist
If you later decide to enable Bender backups after disabling them:
sudo launchctl load /Library/LaunchDaemons/net.robotcloud.bender.plist
Contribute
Contribute to Bender on Github, or if you've found value in Bender we welcome monetary contributions to support further development.
Comments
10 comments
Recent feedback received:
I had problems with ProfileManager and fixed it by adding
in front of
If I change backupDestination="/Backups/$date" I also have to change:
For Calendar backup I added:
Hi Ben,
Thanks for the tip using 'sudo -u _devicemgr'
We are now able to backup profile manager successfully
However - we are unable to restore - we get sql error -
psql: could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/Library/Server/ProfileManager/Config/var/PostgreSQL/.s.PGSQL.5432
Running macOS Sierra 10.12.6 with Server 5.3.1
Have you seen this error before ?
Thanks
Hi Ishai, Did you try the note mentioned above about restoring Profile Manager in 10.12?
Hi Ben - which mention would that be ? This one ?
To restore Profile Manager:
sudo cat /path/to/your-profile-backup.sql | psql -h /Library/Server/ProfileManager/Config/var/PostgreSQL -U _devicemgr devicemgr_v2m0
Ishai, you mentioned running 10.12 so I believe this is the one you want ...
To restore Profile Manager in macOS Sierra 10.12.3 and Server.app 5.2: (Thanks to Paul Roomberg for figuring this out!)
Thanks Ben,
I have probably missed out on this one but this one is for Server.app 5.2 and when trying to restore i get this
pg_restore: [archiver] input file appears to be a text format dump. Please use psql
I understand this is probably a change in Server.app =>5.3 (Also the pg_dump issue you managed to resolve)
I will try to get to the bottom of this cause losing our PM database without a way to restore it easily is a major issue
Thanks again !
Hi Ishai, Did you have any luck finding a way to restore?
Hi Ben,
I haven't managed to restore the DB.
Ishai
I need to restore my (wiki) OS X Server (macOS 10.12.6, macOS Server 5.3.1) configuration. The serveradmin command is not found. I type this in macOS terminal. Terminal says command not found. Do I type it in terminal, because the serveradmin command is not found or somewhere else? How can I use the serveradmin command in Terminal?
My bender backup is in the file named 2018-08-15-2200 with 3 subdirecotries, so I type
Is this correct?
At the addiitonal options there s a typo: .pist instead of .plist
Hi Ben!
I tried to install Bender in my snow leopard server, but the installation failed, do you have any idea why? It runs OS 10.6, and the message only was "Installation failed, the installer encountered an error that caused the installer to fail, contact the software manufacturer for assistance". We want to migrate this server to a newer machine running El Capitan, do you think this could be one way to perform that upgrade?
Thanks,
Rubí.
Please sign in to leave a comment.