Run pre flight script for Snow Leopard Server to backup OS X Server Services with ServerBackup command

Sylvain's Avatar

Sylvain

17 Aug, 2012 09:36 AM

I don't know where to place this information. I hope that's the good place. I wanted to share some information about backup OS X Services like iCal Server, AddressBook Server, Open Directory and so on... on Snow Leopard Server.

Mike had provided in this article http://help.bombich.com/kb/scheduling/performing-actions-before-and... good information to backup MySQL or Open Directory with a preflight script. There is an alternative to launch a pre flight script to create a backup of each OS X Services without too much lines of code.

I use for that ServerBackup command of OS X which is very practical. I don't know if it is available in other OS X Server versions.

#!/bin/sh
/usr/sbin/ServerBackup -cmd backup -source /

The drawback with this solution is that the Open Directory Sparse Image won't be secured with a password unlike the Mike script does. However it will backup all your OS X Server Services.

It will last a little bit time before a result appear when using the ServerBackup command, please be patient.
The destination of the backup is /.ServerBackups

Sylvain

  1. Support Staff 2 Posted by Mike Bombich on 17 Aug, 2012 03:39 PM

    Mike Bombich's Avatar

    Hi Sylvain:

    Thanks for this suggestion. I'm adding this as a to-do item to get that tool documented in the same section of documentation that you referenced. I think that tool must be new to Lion, I'm pretty sure it wasn't available on Snow Leopard. For Lion+ users, though, that's a really convenient option.

    Mike

  2. 3 Posted by Sylvain on 17 Aug, 2012 04:34 PM

    Sylvain's Avatar

    Hi, Thanks

    It works on snow Leopard server also. That's the version I use.

    Regards

  3. 4 Posted by Sylvain on 23 Aug, 2012 09:30 AM

    Sylvain's Avatar

    I have some additional information about ServerBackup. You can get information about ServerBackup by doing in the Terminal

    man ServerBackup
    

    Additionally you can define what services to backup by editing the file /etc/server_backup/com.apple.ServerBackup.plist
    . Just set to false the services that you want to disable from the backup.

  4. Mike Bombich closed this discussion on 20 Sep, 2012 04:59 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac