My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Sunday, October 12, 2008

sbackup without GUI

I recently wanted to install and run sbackup without using the GUI interface (this was on my mythbuntu system and I didn't want to interrupt my show). Not that the sbackup package unfortunately requires X11 and Gnome, so you can't use it on a lean server system.

Start by installing it:

# apt-get install sbackup

The configuration is in /etc/sbackup.conf, edit this file. Basically you want to set your target and then under [dirconfig] set what paths you want backed up.

# cp /etc/sbackup.conf /etc/sbackup.conf.orig
# vi /etc/sbackup.conf
# diff /etc/sbackup.conf.orig /etc/sbackup.conf
< target=/var/backup
< #target=ssh://
> #target=/var/backup
> target=ssh://casey-backup@file-server/mnt/backups/casey
< /usr/local/=1
< /var/=1
> /usr/local/=0
> /var/=0

You can test your configuration by running /usr/sbin/sbackupd (this returns nothing for me, which apparently indicates success):
# /usr/sbin/sbackupd

Now install a cron job to run it (this one runs it every night at 12:30):
# cat /etc/cron.d/sbackup
30 12 * * * root test -x /usr/sbin/sbackupd && /usr/sbin/sbackupd
Post a Comment