
# rdiff-backup rdiff-backup is a simple backup tool which can be used locally and remotely, on Linux and Windows, and even cross-platform between both. Users have reported using it successfully on FreeBSD and MacOS X. Beside its ease of use, one of the main advantages of rdiff-backup is that it does use the same efficient protocol as rsync to transfer and store data. Because rdiff-backup only stores the differences from the previous backup to the next one (a so called [reverse incremental backup](https://en.wikipedia.org/wiki/Incremental_backup#Reverse_incremental)), the latest backup is always a full backup, making it easiest and fastest to restore the most recent backups, combining the space advantages of incremental backups while keeping the speed advantages of full backups (at least for recent ones). If the optional dependencies pylibacl and pyxattr are installed, rdiff-backup will support [Access Control Lists](https://en.wikipedia.org/wiki/Access-control_list#Filesystem_ACLs) and [Extended Attributes](https://en.wikipedia.org/wiki/Extended_file_attributes) provided the file system(s) also support these features. ## INSTALLATION In older Linux distributions the rdiff-backup versions are of the 1.x series, which is not recommended for new installs anymore. Follow the instructions below to install the latest 2.x release of rdiff-backup. ### Ubuntu Focal or Debian Bullseye or newer (has 2.0) ``` sudo apt install rdiff-backup ``` ### Ubuntu backports for older versions (needs a backported 2.0) ``` sudo apt install software-properties-common sudo add-apt-repository ppa:rdiff-backup/rdiff-backup-backports sudo apt update sudo apt install rdiff-backup ``` ### CentOS and RHEL 7 (From COPR) ``` sudo yum install yum-plugin-copr epel-release sudo yum copr enable frankcrawford/rdiff-backup sudo yum install rdiff-backup sudo yum install py3libacl pyxattr ``` > **NOTE:** the last line is optional to get ACLs and EAs support. ### CentOS and RHEL 8 (From COPR) ``` sudo dnf install dnf-plugins-core epel-release sudo dnf copr enable frankcrawford/rdiff-backup sudo dnf --enablerepo=PowerTools install rdiff-backup ``` > **NOTE:** you can add the option `--setopt=install_weak_deps=False` to the last line if you don't need ACLs and EAs support. You can install `python3-pylibacl` and `python3-pyxattr` also separately. Under RHEL, the repo to enable is [codeready-builder-for-rhel-8-x86_64-rpms](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/package_manifest/codereadylinuxbuilder-repository) in order to get access to pyxattr, instead of PowerTools. ### Fedora 32+ ``` sudo dnf install rdiff-backup ``` > **NOTE:** for earlier versions, see the COPR instructions below. ### Debian and derivatives, Raspbian, etc. (from PyPi) ``` sudo apt install python3-pip python3-setuptools python3-pylibacl python3-pyxattr sudo pip3 install rdiff-backup ``` > **NOTE:** If your platform is not i386 or amd64, e.g. ARM/MIPS/etc, you may need the build dependencies `build-essentials`, `librsync-dev`. ### CentOS and RHEL 6 (from PyPi) ``` sudo yum install centos-release-scl sudo yum install rh-python36 gcc libacl-devel scl enable rh-python36 bash sudo pip install rdiff-backup pyxattr pylibacl echo 'exec scl enable rh-python36 -- rdiff-backup "$@"' | sudo tee /usr/bin/rdiff-backup sudo chmod +x /usr/bin/rdiff-backup ``` ### Fedora and derivatives (from PyPI) ``` sudo dnf install python3-pip python3-setuptools py3libacl python3-pyxattr sudo pip3 install rdiff-backup ``` > **NOTE:** If your platform is not i386 or amd64, e.g. ARM/MIPS/PowerPC/etc, you may need the build dependencies `python3-devel`, `librsync-dev`. ### Other Linux (From PyPi) You need to make sure that the following requirements are met: * Python 3.5 or higher * librsync 1.0.0 * pylibacl (optional, to support ACLs) * pyxattr (optional, to support extended attributes) - the xattr library (without py) isn't regularly tested but should work and you will be helped * SSH for remote operations ``` curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py sudo python3 get-pip.py sudo pip3 install rdiff-backup ``` ### Windows Just download and unpack the file `rdiff-backup-VERSION.win32exe.zip` available as _asset_ attached to one of the releases available in the [releases section](https://github.com/rdiff-backup/rdiff-backup/releases) and drop the binary `rdiff-backup.exe` somewhere in your PATH and it should work, as it comes with all dependencies included. For remote operations, you will need to have an SSH package installed. We recommand using OpenSSH from http://www.mls-software.com/opensshd.html ## BASIC USAGE Creating your first backup is as easy as calling `rdiff-backup