From Surf Wiki (app.surf) — the open knowledge base
Rdiff-backup
Backup software
Backup software
| Field | Value |
|---|---|
| name | rdiff-backup |
| screenshot | |
| author | Ben Escoto (2001–2005) |
| Dean Gaudet, Andrew Ferguson, Edward Ned Harvey (2005–2016) | |
| Eric Lavarde, Otto Kekäläinen, Patrik Dufresne (Python 3 rewrite beginning in 2019) | |
| released | 2001 |
| latest release version | |
| latest release date | |
| programming language | Python |
| platform | Unix-like systems, MacOS, Windows |
| genre | backup software |
| license | GPL-2.0-or-later |
| website |
Dean Gaudet, Andrew Ferguson, Edward Ned Harvey (2005–2016) Eric Lavarde, Otto Kekäläinen, Patrik Dufresne (Python 3 rewrite beginning in 2019) rdiff-backup is a backup software written in Python that creates reverse incremental backups. The most recent backup is thus directly accessible, while earlier backups will be reconstructed from diff files by rdiff-backup.
As the name implies, rdiff-backup uses the rdiff method (more exactly, the reimplementation of rsync within librsync) to compute the differences between file versions. rdiff-backup is able to back up files across different machines via ssh.
Usage
Beginning with version 2.2, the flags passed to rdiff-backup are either general, or specific to the operation. For example, disabling fsync (see below) is an option that is general, and thus comes after rdiff-backup. --no-compression is specific to the backup mode, and thus comes after backup.
Backup
Normal operation is rdiff-backup backup . gzip compression of increment files can be disabled with --no-compression after the backup flag. The options -v 5 and --print-statistics show the backup's progress and some statistics.
Specifying --no-fsync will disable fsync and write the backup to RAM instead of directly to the physical disk, causing a significant speedup. This comes with an elevated risk of data loss, though.
Restoration of files or directories
rdiff-backup --restore-as-of will restore to the entire backup, a single file or a sub-directory. can be specified in one of several ways:
- as a date, for example "2020-02-14" (which will be interpreted as midnight of the day in question), or as a datetime string like "2020-02-14T12:26:53+02:00" (which can be found by running
rdiff-backup --list-incrementsfirst) - as a time span, for example "1M" will restore the files as they were one month ago
- as a number of backups, so "10B" will restore the 10th most-recent version
- or "now", which will restore the most recent backup.
It is also possible to find the relevant time-stamped file in the rdiff-backup-data/increments directory, and run rdiff-backup .
Simpler (but not always correctly, as the file permissions might not be properly restored), the most recent backup can also be restored by copying a backed-up file or directory with cp -a or rsync -a. A deleted file – recognizable by the suffix snapshot.gz – can also be restored by retrieving it in the rdiff-backup-data/increments directory, copying it to the source directory, and unpacking with gzip.
Deleting old backups
Only the oldest backups can be removed, with rdiff-backup --remove-older-than . The ability to delete the oldest versions of specific files (or directories) is scheduled to appear in version 2.2.
When deleting old versions, `` takes the same arguments as when restoring files or directories (see above).
Problems
rdiff-backup does not work under Linux with SSHFS and exFAT file systems, though FAT and NTFS do work. This is mostly due to their implementation as FUSE module, causing delays in certain operations, making it probably unfit for backup purposes. No file system is explicitly supported or unsupported, but rdiff-backup does tests before starting a backup, and refuses to progress on file systems deemed unfit. Regarding exFAT, by using the newer in-kernel exFAT-driver, this limitation should be overcome.
rdiff-backup cannot backup to a SFTP destination.
rdiff-backup recognizes changed files only by file size as well as modification time (mtime). To make sure all changed files have been backed-up, running rdiff-backup --compare-hash (or rdiff-backup --compare-full for a byte-wise comparison) will display all changed files. Then, using touch, the modification time of all problematic files can be reset to now, and thus, they will be included during the next rdiff-backup run.
References
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Rdiff-backup — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report