Rdiff-backup Quick Introduction
GPL / GNU Tool for Backups
JD P
Algoloma Systems
My Knowledge About Rdiff-backup
- Use extensively for the last 5 yrs
- Client / Server Backups (versions must match)
- Pull and Push between servers
- ssh tunnels by default for remote connections
- Issues with larger files - librsync
Main Features
- Preserves permissions, ownership, ACL+ and EAs+
- Highly space efficient - diffs and gzipped
- Cross-platform (Win/Linux/Mac)
+ ex libs needed
Similar to rsync commands
$ rdiff-backup source_directory target_directory
$ rdiff-backup --remove-older-than 60D --force target_directory
$ rdiff-backup --list-increment-sizes target_directory
Simple Example
# rdiff-backup / user@server::/backups/${hostname}
Rsync-like Options
- Source and Target are specified in rsync format
- Special files, pipes, devices, sockets, symbolic-links
rdiff-backup Results
- Target directory/rdiff-backup-data/
- Target directory/rdiff-backup-data/increments/{directories}
- Latest backup appears like a mirror (cp to restore)
- Older versions are stored as incremental, compressed files
rdiff-backup Results
- default.2011-10-12T03:07:23-04:00.diff.gz
- default.2011-10-29T03:07:23-04:00.diff.gz
- default.2011-11-04T03:07:25-04:00.diff.gz
- Above are /etc/nginx/sites-available/default files
Restore Process
- To restore older versions (complete or a single file), use
$ rdiff-backup --restore-as-of {time} \
target_file_or_directory local_file_or_directory
- Can directly specify an specific file in the increments/ directory (no time spec needed)
Time Specified
- 2011-10-29T03:07:23-04:00
- YYYY/MM/DD, YYYY-MM-DD, MM/DD/YYYY, or MM-DD-YYYY,
- "B" - backup sessions - 0B = current; 5B = 5 sessions ago
Failures
- If the rdiff-backup fails, the next run will automatically roll-back
- Seen 2 failures in 5 yrs.
- Only 1 failure caused a corrupt DB and that was a few yrs ago
Current Backup Script
$ geany a10_rdiff_backup.script.txt
Check on Backups
$ geany a10_rdiff_backup.inc_sizes.txt
Backup Best Practices Checklist
- Efficient - compressed? Yes
- Secure / encrypted? Yes ssh, but no stored encrypted
- Versioned / not simple mirror? Yes
- Restoration Verified? Yes
Why Not?
- based on librsync - large files
- Client / Server means the versions need to match.
- 8.04 and 10.04 versions DO NOT WORK together
Warning: Local version 1.2.8 does not match remote version 1.1.15.
- Cross Platform for many, but not all
Questions?
Questions?
Please send feedback!
- email: jdp (at) algoloma [dot] com
- Website: http://algoloma.com
- Blog: http://blog.jdpfu.com
Thank you.
[any material that should appear in print but not on the slide]