Jump to content

rdiff-backup

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Keimzelle (talk | contribs) at 03:58, 14 May 2020. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


rdiff-backup
Original author(s)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)
Initial release2001
Repository
Written inPython 3 since version 1.9 (until 2019: Python 2)
PlatformUnix-like systems, MacOS, Windows (via CYGWIN)
Typebackup
LicenseGPLv3
Websitehttps://rdiff-backup.net/index.html

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 can be recreated.

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.

Usage

Backup

Normal operation is rdiff-backup <source directory> <backup directory>. gzip compression of increment files can be disabled with --no-compression. The options -v 5 --print-statistics show the backup's progress and some statistics.

Specifying --no-fsync will disable fsync, causing a significant speedup, with an elevated risk of data loss.

Restoration of files or directories

rdiff-backup --restore-as-of <date> <backup directory> <source directory> will restore the backup, while <date> can be specified in one of several formats:

  • as a date, for example "2020-13-20"
  • 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.

When restoring, both files and directories can be specified.

Simpler (but not always correctly, as the proper file permissions might not be properly restored), the most recent backup can also be restored by copying the source directory with cp or rsync.

Deleting old backups

Only the oldest backups can be removed, with rdiff-backup --remove-older-than <date><backup directory>. The ability to delete the oldest versions of specific files (or directories) is scheduled to appear in version 2.2.

When deleting old versions, <date> takes the same arguments as when restoring files or directories (see above).