Installations

From RdiffBackupWiki

Jump to: navigation, search

Contents

Linux (Most Common Distro's)

rdiff-backup pkgs are available for most Linux Distros like: Debian, Gentoo, and PLD distributions of GNU/Linux so for those distributions, you need only use the package manager to install it.

e.g. for Ubuntu / Debian

sudo apt-get install rdiff-backup

Linux Fedora/RedHat/CentOS

Some sad news... DON'T USE the EPEL Repositories

The people and community for Fedora/RedHat/CentOS are wonderful, REALLY - I'm not kidding.

I use more than half of the top 10 Linux Distro's like: OpenSuSE, Ubuntu, Debian etc - but >80% of my 'servers' are running RHEL/OEL & CentOS.

Almost every Distro I use has a special/cool thing that fits the project I working on perfectly.

but...

Somehow the people managing the Extra Packages for Enterprise Linux (EPEL) repository have decided to 'freeze' rdiff-backup at version 1.0.5 :(

There are some good reasons 'why': https://bugzilla.redhat.com/show_bug.cgi?id=466720 https://bugzilla.redhat.com/show_bug.cgi?id=537852

But, when you read and understand that the rdiff-backup project has decided to NOT provide version compatibility: http://www.nongnu.org/rdiff-backup/FAQ.html#compatible

Then, the bug report noted above - is simply NOT A BUG and EPEL should just continue to publish 'current' rdiff-backup pkgs (IMHO).

Yes, that would force end-users to avoid situations that might stop them from being able to read/restore backups made by older rdiff-backup versions; so if you want to 'archive' your backups for YEARS and YEARS - maybe you need to think about using another BACKUP TOOL for 'archiving your data' FOREVER.

The possibilities are endless... so the discussion is pointless; we need to move on folks.

OK, Let's Install it using ANOTHER Repository

Here's how I did my install using rpmforge

Example A: This example is ONLY for (32bit) Architectures running RHEL5.x /CentOS5.x

#! GET/DOWNLOAD RPMFORGE REPO
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
#! Test and Install Repo
# rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm
# rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm
#! Install rdiff-backup
# yum -y update rdiff-backup

Example B: This example is ONLY for (64bit) Architectures running RHEL5.x /CentOS5.x

#! GET/DOWNLOAD RPMFORGE REPO
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
#! Test and Install Repo
# rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm
# rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm
#! Install rdiff-backup
# yum -y update rdiff-backup

Now if you're a sysadmin (like me) and don't want your RHEL5 server to get 'updates' for any other pkgs from rpmforge You can REMOVE this repository and clean up YUM:

# rm -rf *.rpm
# rm -rf /etc/yum.repos.d/*rpmforge*
# yum clean all
# yum repolist all

Downloading & Installing from RPMs

Ok, if you want a cleaner / easier method... just download and install it.

PROs: This will avoid issues with rdiff-backup getting automatically 'updated' from a repo like rpmforge and breaking your backups/restores as noted in the bug report https://bugzilla.redhat.com/show_bug.cgi?id=466720 that isn't (really) never should've been a bug report (IMHO).

CONs: Installing from a repo (as shown above) will most likely handle any missing pkg dependencies for you 'automatically'. You may need to manually find and install other pkgs like librsync BEFORE you can install rdiff-backup (as shown below).

Example A: This example is ONLY for (32bit) Architectures running RHEL5.x /CentOS5.x

#! GET/DOWNLOAD RPM
wget http://packages.sw.be/rdiff-backup/rdiff-backup-1.2.8-1.el5.rf.i386.rpm
#! Test and Install Repo
# rpm -K rdiff-backup*.rpm
# rpm -ivh rdiff-backup*.rpm

Example A: This example is ONLY for (64bit) Architectures running RHEL5.x /CentOS5.x

#! GET/DOWNLOAD RPM
wget http://www.lfarkas.org/linux/packages/redhat/5/x86_64/other/rdiff-backup-1.2.8-1.x86_64.rpm
#! Test and Install Repo
# rpm -K rdiff-backup*.rpm
# rpm -ivh rdiff-backup*.rpm

Linux SuSE

For SuSE, do the following:

  1. Install python-devel and librsync packages using YaST
  2. Follow the 2-step directions that come with the rdiff-backup source.

For SuSE 9.2 (and possibly other recent versions), librsync is not available on the SuSE media as an RPM. Have no fear! Download the librsync source tarball from the link on the rdiff-backup home page, then do the following as root:

cd /usr/local/src/
tar -xzf {somepath/}librsync-{someversion}.tgz
cd librsync-{someversion}/
./configure
make
make install
ldconfig

I found that I had to say "make AM_CFLAGS=-fPIC" instead of plain "make" Dhoworth 02:04, 19 January 2007 (EST)

In the above, {somepath/} is (optionally) the temporary directory where you put the librsync source archive (.tgz), and {someversion} is the version number of the librsync you are installing.

Now librsync is installed, though RPM will not realize this. You could override that dependency with "--nodeps" when installing rdiff-backup from RPM, but it's just as easy to install rdiff-backup from source. Just extract the rdiff-backup source code and use its setup.py installation as described above for other SuSE versions.

(Note: It seems to work best if you do not try to use the --prefix option on the installation of rdiff-backup.) (Further note: For example, if you use --prefix /usr/local, it not only moves the executable script under /usr/local but all the modules as well and python cannot find them. I had to move them by hand Dhoworth)

If you don't want to compile librsync yourself you could try to find a librsync rpm. I used http://rpm.pbone.net to find librsync-0.9.7-0.guru.suse101.x86_64. The platform x86_64 must of course match your operating system. The versionnumber 101 seems to be important too. I used this rpm with SLES10SP2 on x64 platform but release 106 didn't work (- but I could have made something wrong too.)

Build on [Debian GNU/Linux] from source

When RPMs and .debs aren't configured quite right, use the source, Luke

Windows

Using native win32

Download the win32 binary from http://www.nongnu.org/rdiff-backup

To use rdiff-backup with remote hosts additional steps must be completed found in BackupFromWindowsToLinux

Using cygwin

Install Cygwin. When presented with the list of packages, opt to install gcc, make and Python in addition to all the packages installed by default.

Download, uncompress, compile and install librsync. Then download, uncompress and install rdiff-backup. Use the latest version (1.1.15). The stable version (1.0.5) has many bugs that makes it misbehave under Windows.

Use the task scheduler to run your backup regularly. Since rdiff-backup is a hash-bang file it will not execute directly from the Windows shell. You have to invoke it via Python:

  python c:\cygwin\bin\rdiff-backup . c:\backup

Be careful, the file name matching and globbing mechanisms for inclusions and exclusions are buggy under Windows.

* File name matching is case sensitive, even though the file system is not,
* it only works with relative paths,
* it insists on Cygwin-style forward slashes,
* it is confused by fully blank lines
* and it requires unix-style line endings (use dos2unix to do the conversion).


Mac OS X

Simplest:

If you have [Darwin Ports] installed, simply run the following command:

   sudo port install py-xattr
   sudo port install rdiff-backup

This will install all dependencies as well, including librsync, python, and py-xattr for Mac OS X. Note, you'll need to have the X11 SDK packages from the Xcode Developer Tools installed to run Mac Ports.

If the install of py-xattr fails during the installation of db44, try this solution from the macports-users mailing list:

   sudo port install apr-util +no_bdb
   sudo port install subversion +no_bdb +tools
   sudo port install py-xattr
   sudo port install rdiff-backup

To install the development branch of rdiff, run:

   sudo port install rdiff-backup-devel

Manual approach (latest version, best features):

  1. Make and install [librsync]
  2. Download and install [python]
  3. Download and install [[|http://undefined.org/python/#xattr py-xattr]]
  4. Download and install rdiff-backup from CVS (i.e., version 1.1.6 or newer).

librsync, python, and py-xattr can be installed via [Fink], for example:

   sudo fink install librsync
   sudo fink install librsync-shlibs
   sudo fink install python24
   sudo fink install python24-shlibs
   sudo fink install xattr-py24

Compatibility:

  • CVS as of November 4, 2006 adds support for creation dates, extended

attributes (when py-xattr is used), and symlink modes. This corresponds to version 1.1.6.

  • Recent 1.x versions work quite well on Mac OS X
  • Version 0.12.6 seems to work fine on Mac OS X 10.2.8.
  • Version 0.13.4 is broken on Mac OS X

Solaris

Using gcc instead of Solaris's CC can produce much better results, both when compiling librsync and rdiff-backup's modules. If Python is compiling rdiff-backup's C and _librsync modules with the 'pycc' command, simply add
CC=gcc
to your environment variables.

Also, you may need to compile librsync with -fPIC so that python can load it. I use:

        ./configure
        make AM_CFLAGS=-fPIC
        make install

A bug in librsync-0.9.6 (fixed in 0.9.7) causes the following run-time error often, but not always:

   ERROR: (rs''file''copy_cb) seek failed: Invalid argument

This is fixed in the CVS version, but the following minimal patch suffices:

diff -u -r1.1 buf.c
--- buf.c       2004/03/23 02:54:34     1.1
+++ buf.c       2004/03/23 02:54:48
@@ -40,8 +40,8 @@
  */


-#include <sys/types.h>
 #include <config.h>
+#include <sys/types.h>

 #include <assert.h>
 #include <stdlib.h>

Also, rdiff-backup version 0.12.6 compiles but fails at run-time with an undefined symbol:

        ... ld.so.1: ... C.so: symbol major: referenced symbol not found

This is fixed in 0.13.4, which I what I am using on my solaris-8-sparc gcc-3.3-2 platform, successfully so far.

FreeBSD

Installing rdiff-backup is very simple because it is available in the FreeBSD Ports Collection.

To install the precompiled package just run e.g.

pkg_add ~ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/All
/rdiff-backup-0.12.7.tgz

For more information about using ports, see the "Installing Applications: Packages and Ports" section of the FreeBSD Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html.

OpenBSD

No major problems building 0.12.7 from source on OpenBSD 3.6, nor on 3.9 on 2007-04-15:

librsync 0.9.7 builds without problems with the usual commands:

   * ./configure
   * make all check
   * make install

librsync installs in /usr/local by default, so build rdiff-backup with

   * python setup.py --librsync-dir=/usr/local build

and install with

   * python setup.py install --prefix=/usr/local

A minor annoyance is that the man page gets installed in /usr/local/share/man. Either add this path to /etc/man.conf, or copy /usr/local/share/man/man1/rdiff-backup.1 to /usr/local/man/man1.

HP-UX

The following installation of rdiff-backup-1.0.2 is based on use of GCC on HP-UX 11i:

 * GNU tools were installed mostly in /usr/local for my system - 

important for ease of library installs.

 * Install zlib: add the '-s' option to ./configure (shared library)
 * Install librsync: add --with-pic and --enable-shared to ./configure 

(shared library, position-independent)

 * Install python from source.
 * Install rdiff-backup with --librsync-dir3D/usr/local.  (If you did 

not make shared libraries for librsync, this will fail)

 * Make sure rdiff-backup is in sshd's command path.
 * rdiff-backup will fail at runtime if zlib was not properly installed.

Note: be sure to exclude /dev/shm or you will get a severe Python dump (when you hit the rdiff-backup image).

Amazon AWS

Amazon Web Services are a collection of remote computing services (also called web services) offered over the Internet by Amazon.com. Using AWS, you can run a remote rdiff-backup server with flexible persistent storage for off-site backups. See here for further details.


Installing rdiff-backup using a user account with limited rights

People in this category include those with web hosting accounts, or those who would like to keep all their rdiff-backup related files in one place. There are a few tricks that apply in this case, mostly related to applying the correct path settings. It may seem simple, but it took a heck of a long time for me to figure out

BACKGROUND

The standard install instructions assume that you're doing a system-wide install of rdiff-backup and associated files -- i.e., into places like /usr/bin, etc. Those of us who want to do an install in our user directories have a bit more work to do.

The common error associated with path problems is the dreaded "No module named rdiff_backup.Main". It's been covered several times on the rdiff-backup-users list, namely: http://lists.gnu.org/archive/html/rdiff-backup-users/2002-12/msg00025.html

But this is only part of the story. I ran into lots of other errors for which no specific solution has been posted to the list, for example: http://www.nongnu.org/rdiff-backup/old-list-archive/2002-June/000446.html

The value you need to set for PYTHONPATH is actually a very specific and non-obvious place. Also, it seems to be sensitive to where you set the build directory. We'll cover these settings in this guide.

NOTE: this guide assumes you have Python and the usual build tools (gcc, etc.) already installed.

CREATE A DESTINATION DIRECTORY

  1. Create a directory somewhere in your user-writeable space (usually, your home directory). We'll call this <outputdir> in the instructions from now on.

It may be tempting to assign <outputdir> to the same place you unpacked rdiff-backup and/or librsync, but DON'T do this. A bunch of directories will get created in <outputdir> and they need to be kept separate from the ones already present in the archive, otherwise things will be messed up.


BUILDING LIBRSYNC

  1. Download and unpack librsync.
  2. Change to the librsync directory.
  3. Run ./configure --prefix=<outputdir> --exec-prefix=<outputdir>
  4. Run make all check. Confirm that all tests pass.
  5. Run make install. This should put a bunch of things in <outputdir>/bin and <outputdir>/lib.

If you receive an error message when running make install then delete the librsync directory that got made when you unpacked the tar. Then, do the following:

  1. Re-unpack librsync
  2. Change to the librsync directory
  3. ./autogen.sh
  4. ./configure --prefix=<outputdir> --exec-prefix=<outputdir>
  5. make AM_CFLAGS=-fPIC
  6. make install

BUILDING RDIFF-BACKUP

  1. Download and unpack rdiff-backup.
  2. Run python setup.py install --prefix=<outputdir> --librsync-dir=<outputdir>

Note this assumes that you're putting rdiff-backup and librsync in the same place, which is OK.

  1. Set the environment variable PYTHONPATH to the site-packages directory. In bash, type export PYTHONPATH=<outputdir>/lib/python2.3/site-packages. If your server is running a 64-bit version of Linux, then you will have to use export PYTHONPATH=<outputdir>/lib64/python2.3/site-packages instead.
  2. Change to your <outputdir>/bin_ directory.
  3. Run ./rdiff-backup -V. Confirm that this displays the version information.

ImportError: No module named rdiff_backup.Main

The recommendation in the section above (see "Installing rdiff-backup using a user account with limited rights") is spot on (i.e. specifying the PYTHONPATH). However, in my case, it wasn't until I copied the necessary libraries from the build folder to the PYTHONPATH did it actually work. So to recap:

1. Follow the instructions as above (i.e. build librsync and rdiff-backup)

2. If you get the ImportError: No module named rdiff_backup.Main message, run python and check your python paths.

[root@server bin]# ./rdiff-backup -V
Traceback (most recent call last):
  File "./rdiff-backup", line 20, in <module>
    import rdiff_backup.Main
ImportError: No module named rdiff_backup.Main
[root@server bin]#

In my case, I was looking for PYTHONPATH=<outputdir>/lib64/python2.3/site-packages

[root@server bin]# python
Python 2.5.1 (r251:54863, Jul 10 2008, 17:25:56)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib64/python25.zip', '/usr/lib64/python2.5', '/usr/lib64/python2.5/plat-linux2', '/usr/lib64/python2.5/lib-tk', 
'/usr/lib64/python2.5/lib-dynload', '/usr/lib64/python2.5/site-packages', '/usr/lib64/python2.5/site-packages/Numeric', 
'/usr/lib64/python2.5/site-packages/gtk-2.0', '/usr/lib/python2.5/site-packages']
>>>

3. Once you've determined the path, check to see if the rdiff_backup directory exists (i.e. ls -l $PYTHONPATH)

[root@server rdiff_backup]# ls -l /usr/lib64/python2.5/site-packages/rdiff*
ls: cannot access /usr/lib64/python2.5/site-packages/rdiff*: No such file or directory

4. If its not there, navigate to your build directory on mine it was on (/home/myuser/rdiff-backup-1.2.8/build/lib.linux-x86_64-2.5)

5. Copy the entire rdiff_backup folder to $PYTHONPATH

[root@server lib.linux-x86_64-2.5]# cp -r rdiff_backup/ $PYTHONPATH

6. Re-run your version check

[root@server lib.linux-x86_64-2.5]# /usr/local/bin/rdiff-backup -V
rdiff-backup 1.2.8
[root@server lib.linux-x86_64-2.5]# uname -an
Linux server.somedomain.com 2.6.26.8-57.fc8 #1 SMP Thu Dec 18 18:59:49 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

-- JM 3/7/2010

SETTING UP THE CLIENT/SERVER PARTS

  1. Repeat the above procedure on the other computer(s) you're using
  2. On the computer being used as the server, you'll need to make sure the

path assignents are made before rdiff-backup is run. Do the following:

   * If your shell is bash, edit the .bashrc file.  Note that 

.bash_profile, which is where you'd normally do this, won't work because when rdiff-backup invokes the server, it does so as "not a tty", thus bypassing .bash_profile.

   * Put the following lines in your .bashrc file:
       export PATH=3D$PATH:<outputdir>/bin%%%
       export PYTHONPATH=3D<outputdir>/lib/python2.3/site-packages
  1. Run a simple backup to test to make sure everything works.
   For example, _./rdiff-backup --print-statistics <source> 

<user>@<host>::<dest>_


FINE-TUNING AND POLISHING

  1. You'll probably want to follow the SSH key exchange instructions on the

"unattended rdiff-backup page" linked from the documentation page. (currently at http://arctic.org/~dean/rdiff-backup/unattended.html). I had trouble with this part, too. SSH doesn't like it when your home directory is group-writable, for instance -- you can correct this by using chmod g-w ~

  1. Setting up rdiff-backup to run as a cron job can also be a challenge for

those of us on user accounts. You'll probably have to make the same PATH and PYTHONPATH settings described above on your client computer, as well. Also, if stuff fails, try using absolute paths in the stuff you run using cron.

Hope that helps --- Joseph Luk, March 2006

Edited by Zian Choy on September 2008

NAS

This section contains contains instruction how to install and use rdiff-backup with NAS (Network-attached storage) devices.

Synology RS407 (maybe also CS407, DS207+, DS107+)

Synology RS407 is a Linux based NAS with ARM CPU.

First I suggest to upgrade to latest firmware, as SSH access is supported there. Now, I'm using Version: DSM 2.0-0722; Build Date: 2008/09/20

Then download:

Copy the files to the NAS, log there via SSH and untar the files:

ssh root@<your.nas.ip>
cd /
tar xzf /valume1/NetBackup/python/python-2.5.2-arm.tar.gz
tar xzf /valume1/NetBackup/python/rdiff-backup-1.2.1-arm.tar.gz

Then unpack and install patched version of rdiff-backup on the box where you want to backup (see README for details).

wget http://rtime.felk.cvut.cz/~sojka/rdiff-backup/rdiff-backup-1.2.1.patched-src.tar.gz
tar xf rdiff-backup-1.2.1.patched-src.tar.gz
cd rdiff-backup-1.2.1.p
python setup.py install

Alternatively, you can patch the sources yourself. The patches are available at http://rtime.felk.cvut.cz/~sojka/rdiff-backup/

Then you can use this command to do backups:

rdiff-backup --remote-schema "ssh -C %s /usr/local/bin/rdiff-backup --server"\
    <source> <user>@<your.nas.ip>::/volume1/NetBackup/<destination>

In my case, I wanted to use different user than root and I had to manually modify /etc/passwd to allow SSH logins for that user from:

   <user>:x:1028:100:<comment>:/:/bin/csh

to:

   <user>:x:1028:100:<comment>:/volume1/<some_home_directory>:/bin/ash

Note the change of shell from csh to ash! Then, it was also possible to create /volume1/<some_home_directory>/.ssh/authorized_keys and log in without typing password.

Details

The build of python was based on these resources:

My patch to python and makefile (xcompile.mk) can be downloaded from http://rtime.felk.cvut.cz/~sojka/rdiff-backup/python/.

Porting of rdiff-backup for this NAS was a little bit trickier. The problem was that Synology uses a patched kernel, where ext3 filesystem is case insensitive (see this and this). This is problem for rdiff-backup, because is contains modules called Time.py and TempFile.py, which were confused with the python modules time.py and tempfile.py. I've solved this by renaming the rdiff-backup modules. See the attached patched 0002 and 0003.

The last patch (or first :) 0001 only modifies the setup.py to allow building rdiff-backup against different (cross-compiled) python.

All the patches as well as Makefile to produce my binaries are available from http://rtime.felk.cvut.cz/~sojka/rdiff-backup/.

Linksys NAS200

See this email.

(Note: This installation is no longer being supported. The NAS200 proved to difficult and time consuming to be able to be maintained effectively. The NAS200 also has a fatal flaw in that, besides being woefully underpowered, doesn't have enough memory to be able to fsck large partitions. As a result, file system corruptions cannot be fixed without reformatting the disk.)

Concurrent installation of different versions of rdiff-backup

In my job at a school district I have inherited a number of servers running different versions of rdiff-backup. Some, like v1.0.4 and v1.0.5 will talk to each other; while others, like v1.1.15 will not, because it's from a different branch (1.1 vs 1.0). So I needed a way to concurrently install both v1.0.4 and v1.1.15 on the backup server to support the backups from servers with different versions. The following material all comes from a discussion I've been having with Andrew Ferguson about how to go about doing this.

The key is that you can use the PYTHONPATH environment variable to point Python at a different location for the rdiff_backup folder with the *.py files. Just build the source files to generate the libraries, but don't install them into the Python site-packages folder. The Installing Python Modules guide explains all of this: http://docs.python.org/install/index.html. Andrew also was kind enough to provide the following instructions and scripts/snips:

$ mkdir /home/<your user name>/rdiff-backup/
$ cd /home/<your user name>/rdiff-backup/
$ wget http://download.savannah.nongnu.org/releases/rdiff-backup/rdiff-backup-1.1.15.tar.gz
$ tar xzf rdiff-backup-1.1.15.tar.gz
$ cd rdiff-backup-1.1.15
$ python setup.py build

If this is the first time building rdiff from the source, you will probably need the python-dev and librsync-dev packages installed on your system as well. Not having them will generate errors when you issue the 'build' command above.

Now you will have a build directory, containing directories called: "lib.*", "temp.*" and "scripts*". We care about the lib and scripts dirs.

In my case, these are:

lib.macosx-10.5-i386-2.5
scripts-2.5

pay attention to the name of these directories, and change my names to your names, as appropriate in the script below!

Next, create a file 'rdiff-backup-1.1.15' somewhere in your $PATH. (For me, I like to keep scripts in ~/bin/, and I have ~/bin/ in all of my $PATH).

The file should look like this:

=== BEGIN rdiff-backup-1.1.15 ===
#!/bin/sh

RDB_LIBS="/home/<your user name>/rdiff-backup/rdiff-backup-1.1.15/build/lib.macosx-10.5-i386-2.5"
RDB_SCRIPTS="/home/<your user name>/rdiff-backup/rdiff-backup-1.1.15/build/scripts-2.5"

PYTHONPATH="$RDB_LIBS" "$RDB_SCRIPTS"/rdiff-backup "$@"
=== END rdiff-backup-1.1.15 ===

do a chmod a+x on that file, and you'll be good to go.

Test it by doing:

$ rdiff-backup-1.1.15 --version

Once you have confirmed that the script is working, you can then invoke the new installation by adding the following option to your rdiff-backup command(s):

--remote-schema "ssh -C %s rdiff-backup-1.1.15 --server"

It's possible to test that you have it working by doing:

rdiff-backup --remote-schema "ssh -C %s rdiff-backup-1.1.15 --server" --test-server root@<destination [backup] server name>::/home/backups/<remote [origin] 
server name
>

Mine returned:

Testing server started by:  ssh -C root@<destination [backup] server name> rdiff-backup-1.1.15 --server
Server OK 

I run this command on the remote (or origin server - I 'push' rdiff-backups from the remote machines to the destination [backup] server). Command would be different if you 'pull' the backups, i.e. run rdiff-backup from the backup [destination] server. In my script, I call rdiff-backup twice, as follows: (note that you need to add the --remote-schema option to both rdiff-backup commands for it to work)

# backup.sh
## This will backup /home and most important config files and remove diffs older than 2 months


rdiff-backup --remote-schema "ssh -C %s rdiff-backup-1.1.15 --server" --print-statistics --include /etc --include /home --include /var --include /root --exclude / / 
root@<destination [backup] server name>::/home/backups/<remote [origin] server name> rdiff-backup --remote-schema "ssh -C %s rdiff-backup-1.1.15 --server" --remove-older-than 2M root@<destination [backup] server name>::/home/backups/<remote [origin]
server name
>

External Links

Find out how to backup mac, and other useful information and how-to articles about Mac OS.

Personal tools