Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

closed as primarily opinion-based by Braiam, Eric Carvalho, mikewhatever, waltinator, Avinash Raj Apr 20 at 1:36

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers 4

up vote 5 down vote accepted

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.

Features:

  • 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

share|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. –  e.m.fields 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. –  e.m.fields Oct 18 '10 at 19:20

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.

share|improve this answer

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

share|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!

share|improve this answer

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