Ubuntu Backup – Autorotating Incremental Backups with Cron

backupcronincremental-backupUbuntu

i need a backup script (or tool) for my Ubuntu Server. Simple packing a folder into a tar.gz cron.d is quite easy to do.

But the problem is, with every update there are several 100 MB of data. So I tought of having a incremental backup, with a daily, weekly and monthly rotation.

More concrete requirement:
1. On Sunday do full backup
2. On Monday, Tuesday, Wednesday, Thurstday, Friday and Saturday do incremental/differential backups only
3. On next sunday do either full backup or just backup the differentiate between this and last week (not sure yet what's better here. Data don't change that often other than the mail folder, latter one would significantly save disk space, but result in more work rolling the data back to a certain point). Rotate the last 4 weeks
4. On every 1st of a month, do a full backup. Keep rotates of the last 3 months

Either one (a script for cron.d or a application of it's own) is welcome. Would be preffered if it can be installed via the OS' package manager without having to compile yourself too much.

The system in question is an Ubuntu 8.04 LTS (newer not available due to virtualization and the virtualisation software being bound to that kernel)

Best Answer

You may want to try rsnapshot: http://rsnapshot.org/ It makes use of rsync and hardlinks to achieve system snapshots, which is basically what you need. It also comes in the repositories of Ubuntu.

Related Topic