I've Ubuntu 9.10 cloud servers running. I'll be using server administering gui tool 'webmin' for backing up resources like apache configuration files, mysql, cvs, the directory /var/www, and the entire webmin configuration files. Sometimes these are not backed up and I will check them with their date of modification.

Is there a best way to backup all the above resources without any flaw with any other tool or from command line?


My vote here for backupninja.

alt text

I think this should handle all your needs here.

This application is "a silent flower blossom death strike to lost data", and based off of rdiff-backup.

Runs quietly in the background, as any good ninja should. Has a very useful and easy setup daemon called ninjahelper.

From the Description page:

Backupninja allows you to coordinate system backups by dropping a few simple configuration files into /etc/backup.d/. Most programs you might use for making backups don't have their own configuration file format. Backupninja provides a centralized way to configure and coordinate many different backup utilities.


  • easy to read ini style configuration files.
  • you can drop in scripts to handle new types of backups.
  • backup actions can be scheduled.
  • you can choose when status report emails are mailed to you (always, on warning, on error, never).
  • console-based wizard (ninjahelper) makes it easy to create backup action configuration files.
  • passwords are never sent via the command line to helper programs.
  • in order to backup a db or sql database, you cannot simply copy database files. backupninja helps you safely export the data to a format which you can backup.
  • works with Linux-Vservers.

Backup types include:

  • secure, remote, incremental filesytem backup (via rdiff-backup). incremental data is compressed. permissions are retained even with an unpriviledged backup user.
  • basic system and hardware information.
  • encrypted remote backups (via duplicity).
  • safe backup of MySQL, PostgreSQL, OpenLDAP, and subversion databases.
  • burn CD/DVDs or create ISOs.

... I think this is going to be a lot easier for getting started than writing a custom script from scratch, though you may have to work some to get the MySQL databases.

(Plus, come on, what an awesome name?)

Screenshot of the "ninjahelper" configuration screen:

alt text

| improve this answer | |
  • Sounds really great. If it's for servers it's good and I will get here back again after checking this tool. – user3215 Oct 16 '10 at 16:20
  • cheers, hope you'll report back on your progress here. – emf Oct 17 '10 at 4:22
  • It's definitely intended for servers, as it doesn't require a GUI so you can run this remotely on a headless box. – emf Oct 18 '10 at 19:20
  • New location: labs.riseup.net/code/projects/backupninja – Fr0zenFyr Apr 7 '16 at 8:58

There is a package called etckeeper that can transparently keep your /etc configurations files in version control so you can easily back them up, rollback, etc.

You can then script this with whatever version control system you use to back it up wherever you want so you not only have backups of the files, but a history of every change made to them.

| improve this answer | |

You could use rsnapshot. I use rsnapshot to automate remote backups of a production server, following this guide.

| improve this answer | |

I tend to write a cron job which creates a date-stamped folder, I write a SQL dump, then rsync all config files or anything else I want backed-up.

Then every week, I have another cron task which scp's this to another machine, so I have an offline copy just incase the hard-drive fails.

I have yet another cron task for deleting backups which are more than 3 months old.

You can write stdout to a log file in /var/log or use sendmail to a notify a local account if it fails. That way, when you log in you'll get a notification. (You could also use a twitter/IM bot script to provide notifications.. I use Prosody and an IM bot I wrote [about 150 lines of python] for notifications for one customer's system).

Hope that helps!

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.