rdiff-backup: making effective and incremental backups

Last update on November 8, 2009 09:14 AM by jak58
Published by jak58

rdiff-backup: making effective and incremental backups






Intro:


rdiff-backup is a backup software. It allows you to create an image copy from one directory to another in the same way like rsync or as a simple cp command.
In addition, it retains the old versions of files, so you can restore a file as it was earlier and allows recovery of deleted files.
rdiff-backup allows you to make a backup to / from a local directory or to/from a server ssh.
rdiff-backup transmit only the modified parts of files. It is therefore optimize the use of disk space and bandwidth.
The syntax is simple and allows you to filter the files to be saved.
rdiff-backup can also make backups to systems that do not support Unix/Linux rights management.

Installing rdiff-backup


Under Debian based system:
sudo aptitude install rdiff-backup

Making a Backup


rdiff-backup /source /backups

The backup of the latest version of your files is available in / backups.
The directory / backups / rdiff-backup-data contains the different older versions of files.

Listing available backups


rdiff-backup -l /backups


list-increment-sizes to see the place occupied by each backup.

Deleting old backups


For example, eliminate all backups older than 8 days:
rdiff-backup --remove-older-than 8D --force /backups

Restoring files


For example, to retrieve your /source/myfile.txt file as it was 3 days ago

rdiff-backup -r 3D /backups/myfile.txt /source/ancien.txt


-R stands for "restore" and 3D = 3 Days. You can also specify in hours, minutes, or even a specific date

Miscellaneous options


There are many other options allowin you to filter files (name, path, size ...), directories to restore full, with specific dates, make backups through ssh,
just make a man rdiff-backup to list the options.

Setting up default backup options


Here's is a simple example on how to set up a daily backup of personnal directories (/home) to /var/rdiff.backups/home, keeping 30 days of historical files. We exclude files larger than 50 MB

Set up as root and create /etc/cron/rdiff_backup_home file containing:

#!/bin/bash
test -x /usr/bin/rdiff-backup || exit 0
logger "rdiff_backup_home: delete old backups (>30 jours)"
/usr/bin/rdiff-backup --remove-older-than 30D --force /var/rdiff.backups/home
logger "rdiff_backup_home:  backup directory /home (files <50Mo only)."
/usr/bin/rdiff-backup --max-file-size 50000000 /home /var/rdiff.backups/home
logger "rdiff_backup_home: end back up."


Make the following file executable: chmod 755 rdiff_backup_home

Once procedure completed, the directories / home will be saved daily.
rdiff-backup will retrieve old versions of files up to 30 days back while minimizing the disk space used.

To force a backup, type: sudo /etc/cron.daily/rdiff_backup_home
To list the backups done, type: sudo rdiff-backup -l /var/rdiff.backups/home
To restore a file: sudo rdiff-backup -r 3D /var/rdiff.backups/home/toto/myfile.txt /home/toto/ancien.txt

You can check out back up status by looking in the /var/log/syslog. Type in: rdiff /var/log/syslog
Best answers for « rdiff backup: making effective and incremental backups » in :
ACER PC Restore to factory settings Show ACER PC Restore to factory settings Run Acer eRecovery Management Copy the Acer factory default backup disk Image Create backup of the system Create a complete backup Creating an incremental backup Erase a backup point Using the option...
Download Cobian Backup Show Cobian Backup is a multitask application allowing to plan an automatic maintenance of files or directories towards a destination in place or on a distant machine. The maintenance of site FTP is also possible, in both directions! This program can be...
Making a backup of your drivers using DriverMax Show Making a backup of your drivers using DriverMax It happens that for some reasons you want to reinstall your OS and that no driver CD are available or for some hardware (integrated GPU or sound card), it is very difficult to find the proper...
Making a backup of your registry ShowMaking a backup of your registry Export/ Import Making a backup and restoring your registry using the Windows Recovery Console Here below you should two simple methods on how to make a backup and to restore your registry. Export/...
Incremental backup of data with .BAT (Batch) ShowIncremental backup of data with .BAT (Batch) Use of incremental back up Example Use of incremental back up Incremental back up can be used to save your important data before you format your computer. During the first batch launch,...
Make an ISO image ShowMake an ISO image What is an ISO image? How to create an ISO image How to burn an ISO file to a CD-ROM/DVD-ROM What is an ISO image? An ISO image is created by a particular software and is the replica of an existing file system. This...
Download Automatic Backup ShowWhen you lose your data, it is not necessary to persuade your that to possess an effective saving program is the best solution. Automatic Backup is a program which will not only protect your data, but it will also keep the former versions of your...
Download ABC Backup Pro ShowThis program allows you to create backups at various levels of compression. It can make automatic backups of data from remote or local planner, the network drives and ftp servers. Advantage It also supports the following media: CDR, CDRW, DVD-R,...
Download Handy Backup DVD ShowDVD Handy Backup is a powerful tool for automatic backup. The program supports many types of storage media: DVD, CD-R/-RW, Blu-ray, HD DVD, USB, Flash, FireWire, FTP, LAN, hard disk. Advantage It can also make complete or incremental backups and...
Backup ShowBackup Setting up a redundant architecture ensures that system data will be available but does not protect the data against user-introduced errors or against natural disasters such as fires, floods or even earthquakes. Therefore it is necessary to...