Flux rss

rdiff-backup: making effective and incremental backups

Published by jak58, last update on Friday October 24, 2008 08:01:44 AM 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
Making a backup of your registry Making 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/... en.kioskea.net/faq/sujet-519-making-a-backup-of-your-registry
Making a backup of your drivers using DriverMax Making a backup of your drivers using DriverMax Intro Download Intro This freeware will allow you to make a backup of your drivers easily,without any CD support. Download Can be downloaded from:http://www.drivermax.com/download.htm... en.kioskea.net/faq/sujet-1216-making-a-backup-of-your-drivers-using-drivermax
Incremental backup of data with .BAT (Batch) Incremental 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, all... en.kioskea.net/faq/sujet-1049-incremental-backup-of-data-with-bat-batch
Vi/Vim - Avoid tabs when making a copy/paste[VI/VIM] Avoid tabs when making a copy/paste By default, when you make a copy and paste in vi or vim (through an remote SSH session), it adds incremented tabs at each line. To solve this problem,simply type: set paste in the window or add the... en.kioskea.net/faq/sujet-981-vi-vim-avoid-tabs-when-making-a-copy-paste
A dialect for C languageA dialect for C language Cyclone language Conclusion You want to do some C programming but the fact that C embedded automatic Garbage Collector will make debugging harder and is not quite effective when making system programming, such... en.kioskea.net/faq/sujet-463-a-dialect-for-c-language
Making calls from your computerIntroduction to VoIP Since the 21st century, the bell telephone first developed by Alexander Graham Bell has made a huge evolution. Nowadays people can even make voice calls from their computer. There are several ways for making calls throughout... en.kioskea.net/faq/sujet-242-making-calls-from-your-computer
Backup drive on iMac?Hello, Is it possible to: 1. Make a new partition on an iMac/leopard OS X 10.5 and install Windows XP on it 2. To backup the drive where the XP is installed (preferably a software like Acronis) 3. To write the image to other iMacs with the same... en.kioskea.net/forum/affich-27312-backup-drive-on-imac
Gta Vice City: Copy Protected CDsHello, I would like to make backup copies of my GTA VC CDs but they are copy protected. If i create an image with Alcohol and then mount the image and install, it says "data2: Data error (cyclic redundancy check)" and the same message appears if i try... en.kioskea.net/forum/affich-14581-gta-vice-city-copy-protected-cds
Forgotten vista admin password - helpHello, can't remember my administrator password in Vista. I did not make a backup disk. How can I reset the password for free. My laptop did not come with any disks. Says they are built in. Any suggestions? en.kioskea.net/forum/affich-18472-forgotten-vista-admin-password-help
Download Automatic BackupWhen 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... en.kioskea.net/telecharger/telecharger-1682-automatic-backup
Download LC ISO CreatorLC ISO Creator is very simple: it allows to create a .ISO file from your CD. Then, it allows you to burn these ISO files, to use CD emulation software (in order not to use any more the original CD) or to make a backup copy. The software is... en.kioskea.net/telecharger/telecharger-1398-lc-iso-creator
Download EruntErunt iis a tool which will allow you to make a complete backup of your register. An indispensable tool, it is capable of restoring whatever is the situation - therestoration program is automatically generated with every backup. - can be put... en.kioskea.net/telecharger/telecharger-1690-erunt
Toyota to make sure drivers awake at wheelThe Toyota logo. Toyota Motor Corp. said Tuesday it would soon equip vehicles with a system to verify that drivers' eyes are fully open to make sure they are not asleep at the wheel. Toyota Motor Corp. said Tuesday it would soon equip vehicles... en.kioskea.net/actualites/toyota-to-make-sure-drivers-awake-at-wheel-10009-actualite.php3
Blackberry maker to open research facility in GermanyA visitor walks past a display of Blackberry "Smart Phones." Blackberry maker Research in Motion (RIM) announced Wednesday it will soon open its first research facility outside of Canada in Bochum, in the North Rhine-Westphalia region of Germany.... en.kioskea.net/actualites/blackberry-maker-to-open-research-facility-in-germany-10316-actualite.php3
OECD ministers agree to make Internet safer, more widely usedSouth Koreans pass a display board of the 2008 OECD Ministerial Meeting in Seoul. Ministers and officials from leading industrial nations agreed Wednesday to make the Internet safer and more accessible, to strengthen its role as a driving force in... en.kioskea.net/actualites/oecd-ministers-agree-to-make-internet-safer-more-widely-used-10459-actualite.php3
Cryptography - Session keys Asymmetric algorithms (which come into play in public-key cryptosystems) make it possible to eliminate problems related to key sharing via a secure channel. However, they remain much less effective (in terms of calculation time) than symmetric... en.kioskea.net/crypto/cledesession.php3