Simple Linux backup solution?
July 6, 2007 6:31 AM   Subscribe

Is there such a thing as a simple unattended backup solution for a Linux box? I'm using Bacula right now but it's total overkill for my situation.

I've got a small server running Ubuntu Edgy. I have a need to backup a couple of directories (not an entire filesystem) on a regular basis. The box has a CD/DVD writer. The Bacula version I have handles DVDs but the Ubuntu package seems to lack any CD-R support. I know I can cobble up something using cdbackup/cdrecord along with tar or cpio but I was hoping for something that could deal with incremental backup/restore. Is there a simpler solution than Bacula that can do this? Right now I have it backing up to a disk file that I can than write to CD-R, but the CD write has to be done by hand. Switching to DVD is impractical for me at this point, though not impossible. Thanks!
posted by tommasz to Computers & Internet (10 answers total) 6 users marked this as a favorite
So you want something like rsync'ing the diff to a new folder, then burning that folder to a multisession cd? (then maybe getting rid of that temporary folder) Is that correct?
posted by a robot made out of meat at 7:32 AM on July 6, 2007

rsnapshot is an excellent rsync-based incremental backup tool. It's based around backup to another hard drive, though, not CD-R.
posted by Nelson at 7:37 AM on July 6, 2007

seconding rsnapshot. It's fantastic.

I actually think you are better off buying a second HD and connecting it either internally or via a USB enclosure and backing up that way. By doing that, you won't have to make any decision about what to backup--BACK IT ALL UP! Yes, HDs go bad, but the chances of your primary and secondary going bad at the same time are very low (this is the same principle that makes RAID attractive to some).

I do this HD->HD backup daily (rsnapshot can keep several snapshots without much extra space) and then periodically burn some mission-critical data (pics, website, etc.) to a DVD-R.
posted by mcstayinskool at 7:54 AM on July 6, 2007

Looking some more, you say "tar or cpio but I was hoping for something that could deal with incremental backup/restore" and I want to point out that tar definitely does do incrementals. Examples 1 2

Dar does the same thing. Kdar is a GUI with all the features you need, I think, but I haven't used it myself.

Alternatively, if the files aren't too big (as I suspect from using CD-Rs) then you could use one of the many disk-based backups and just cron the cdrecord command.

Some people have written scripts for just this here, but I'm always careful about other people's scripts.
posted by a robot made out of meat at 8:11 AM on July 6, 2007

We use Backup-Manager and some custom scripting to get the archives off the machine, it takes a little elbow grease to setup (the way you have to define paths to be backed up is a little baroque), but we're happy with it.
posted by Skorgu at 9:29 AM on July 6, 2007

If the server is connected to the public internet, and you have another computer somewhere, you can use rsync to backup over the network to a remote system.

It's pretty easy to do and the rsync manual gives you all the examples you need. You could just write a little shellscript that backs up to a remote system every night at 2AM (via cron), and then emails you the output. I have a backup strategy like this and it's very nice.

Only thing it doesn't do is any sort of versioning/rotation. You can either code that into the shell script yourself (make a script on the remote machine that compresses and moves the old backups every night, a few hours after the backup goes through), or you can use something like rsnapshot, which I think will work over a network.

One of the nicest things about rsync is that it's secure (it does it's thing over SSH) and doesn't require anything besides rsync and SSH installed on the remote machine. It doesn't even require you to run a daemon, just leave port 22 open.
posted by Kadin2048 at 10:31 AM on July 6, 2007

The box is on the company network so I'm limited to my desktop PC as far as remote destinations go. I was thinking about using CD-R because I have the writer and because the media comes out of a general office fund and don't have to be expensed (I have this server only because I assured the powers-that-be it wouldn't cost them anything). I'll definitely look at KDar (although I'm running Gnome) and rsnapshot, thanks for the tips.
posted by tommasz at 11:15 AM on July 6, 2007

Personally, I have an external USB drive (as well as a RAID array on the machine itself), and use a couple of scripted commands to mount the drive, rsync key directories (like family photos) and unmount again.

I bring home the external drive on Monday nights, sync it, then take it back to work on Tuesday mornings, so that if my house burns down I'll still have the kid's pics.

This works really, really well for me, and it's trivial to set up; about the worst part was setting up the initial mount command and properly-permissioned directories on the external drive.
posted by davejay at 2:53 PM on July 6, 2007

Nth-ing rsnapshot. I backup a six host mixed-OS network using it, and it Just Works.
posted by genehack at 9:06 AM on July 8, 2007

Thanks to all for your input. I ended up using rsnapshot for regular on disk backups of the directories I'm worried about and dar for doing full system backups that get written to CD-R immediately. If I decide to get an external drive some day, it won't take much to convert to using it.
posted by tommasz at 9:54 AM on July 18, 2007

« Older Text and Audible ebook combined?   |   Where did metallica f*** up? Newer »
This thread is closed to new comments.