I received some questions today about the ability to use a commandline interface with Ahsay’s OBM (Online Backup Manager). For those that don’t know Ahsay: they are one of the larger suppliers of custom-brandable online backup software. Almost every company that offers an online backup service and doesn’t write their own software uses Ahsay. 

One of the most appealing features of their software is that it offers the same GUI interface on all supported platforms (Windows, Linux, MacOS X, Solaris, etc), but there are times when you need to work with their software in an environment that doesn’t have the proper X11 libraries or forces you to use the command line for some other reason. In this post I’ll detail the steps necessary to run and restore your first backup set in linux without using the GUI; since most of the software is identical on other platforms, I expect these instructions to work on Mac OS and Solaris as well. The instructions are for version 5.2 of the software.

Step one: install the software

This should be the easy bit. Just follow the commands below:

export OBM_DIR=/usr/local/obm
mkdir $OBM_DIR
wget http://your.backup.provider/obs/download/obm-nix.tar.gz
tar xzf obm-nix.tar.gz
rm obm-nix.tar.gz

The software should now be installed, and both the auto-update agent and the backup scheduler are started for you. There is one small bug in the installer: it doesn’t create startup links for runlevel 2, which happens to be the default runlevel on Debian systems. So if you’re using Debian you’ll have to create these manually:

ln -s /etc/init.d/obmaua /etc/rc.2/S99obmaua
ln -s /etc/init.d/obmscheduler /etc/rc2.d/S99obmscheduler

You can verify that the scheduler is running in the process list, and there should now be a logfile for the scheduler as well. This is located in your homedir by default:

tail ~/.obm/log/Scheduler/debug.log

Step two: Configure your account details

Your Backup Service Provider has given you a login name and the name of their backupserver. Use the following command to configure those:


You’ll be asked for your account details and the name of your backupserver:

Configurator Utility

User Configuration file not found
Create a new Configuration file

Login Name: martin
Password: *******************
Backup Server URL: your.backup.provider.com
Which Protocol ? (1) Http (2) Https : 2
Use proxy ? (Y)es or (N)o : n

After configuring these, you can exit the configuration utility via the exit option in the menu. For the next step, you’ll need a web browser; you don’t have to run this on the computer you want to backup, any machine that can run a browser is fine. Log on to the backupserver with your webbrowser and configure a backupset. I’ve created a very simple one called “testbackup” to demonstrate the next steps; see this PDF for the exact settings I used.

Once you created the backup set(s), you’ll need to enter some encryption settings. Since all backups are encrypted on your machine, you’ll need to set these up on the commandline. Start the configurator again; this time it will only ask you for your login and password, and will recognize the new backup configuration. Set up the encryption according to your wishes:

Configurator Utility

Login name: martin
Password: *******************

Found new backup set ‘testbackup’
Please enter the following values for this backup set:

Encrypting Algorithm ? (1) Twofish (2) AES (3) Triple DES (4) No encryption : 2
Encrypting Key: *******************
Re-Enter Encrypting Key: *******************
Encrypting Mode ? (1) ECB (2) CBC : 2
Run scheduled backup on this computer ? (Y)es or (N)o : Y

After you’ve entered the settings for all your backupsets, you’ll get back to the main menu for the configurator. Choose the Exit option.

Step three: Run your first backup

The scheduler should automatically start the backup at the time you specified, but I always like to run my first backup manually. My first backupset is called “testbackup”, so I enter this command:

fs2:~# $OBM_DIR/bin/RunBackupSet.sh testbackup

This will give a short summary of the default options and then appear to hang. Don’t worry: the backup is running, and your command prompt will return once it’s finished. This is the default output:

Using APP_HOME: : /usr/local/obm
Using BACKUP_SET : testbackup

There are two ways to get more info about what is happening. The first is to have a look at the logfile for this backupset; you’ll find that in your homedir (~/.obm/log/). Another way to get more info is to set the DEBUG_MODE in the RunBackupSet.sh script before starting this. You can run this script at any time; it will simple start an extra, unscheduled backup.

Last step: Restoring files

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. 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
testbackup [1219921792927]

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
fs2:/usr/local/obm/bin# ./RestoreTest.sh
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
[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.