This is one of those things that you should try at least once before you actually need it. Restoring a backup from the commandline takes a bit of preparation, but the process itself is pretty simple.
Please note: Where you see "$OBM_DIR", you should substitute this with '/usr/local/obm' unless you have specifically set this as an environment variable.
First, you need to know which backup you want to restore. Here is how you can find out what backups are available:
fs2:~# $OBM_DIR/bin/ListBackupJob.sh testbackup
Using APP_HOME : /usr/local/obm
Using CONFIG_HOME : /root/.obm
Using BACKUP_SET_ID : testbackup
As you can see, I have eight backups to choose from. After you have decided which backup to restore, you have to edit the $OBM_DIR/bin/Restore.sh script. You need to set five variables; they are all at the top of the script. I’ve used the following for this example:
You can now start the restore. With the example I used I should get a copy of the contents of /usr/local/obm as it was on the 28th of august, and it will be placed in /tmp. Please note that you have to run this from inside the OBM directory!
fs2:~# cd $OBM_DIR/bin
Using APP_HOME: : /usr/local/obm
Using BACKUP_SET : testbackup
Using RESTORE_FROM : /usr/local/obm
Using RESTORE_TO : /tmp
Using POINT_IN_TIME : 2008-08-28-13-23-34
Using RESTORE_PERMISSION : true
[2008-08-28 13:37:31] Start
[2008-08-28 13:37:31] Downloading restore file list …
[2008-08-28 13:37:33] Total no. of file(s) to restore: 844
[2008-08-28 13:37:33] Total restore file size: 59.89M bytes
[2008-08-28 13:37:33] Creating new folder … “/tmp/obm”
[2008-08-28 13:37:59] End
That’s it: you now know how to use the commandline for Ahsay’s OBM software.