Using MyBook as a Rsnapshot-based backup server

This page describes the main steps to setup rsnapshot for systematically backing up data to MyBook.

The main reference to rsnapshot is the rsnapshot HOWTO.

Rsnapshot runs on MyBook, pulling the data from a PC. It uses rsync (typically over ssh) for communication. Pushing the data to MyBook (i.e. running rsnapshot at the computer to be backed-up) is not so straightforward. The original rsnapshot FAQ precludes it:
There are some recent work-arounds to it — see the thread
but the "push" approach is not so straightforward and we have not tested it.

Main steps I have followed in the rsnapshot setup procedure:

  1. Installed rsnapshot and its dependencies in MyBook using ipkg:
    • /opt/bin/ipkg install rsnapshot
    • Had to manually add the dir containing to /etc/ld.conf and then run ldconfig
  2. Had to setup public-key based, non-interactive ssh authentication, following
  3. The older version of rsync (/usr/bin/rsync, v. 2.6.8) already installed in MyBook needs lots of memory when transferring big number of files, see here, making it necessary to allocate extra swap space (I added 256 MB; backing-up many small files might require more). For this follow
  4. Alternatively, install a newer (>= 3.0) version of rsync in both client and server. This is much more memory friendly, see here. This is easy for MyBook:
    • /opt/bin/ipkg install rsync
    • Then use this newer rsync binary (/opt/bin/rsync, v. 3.0.5). Make sure to set "cmd_rsync" to "/opt/bin/rsync" in your rsnapshot.conf, see attached rsnapshot.conf. Do not forget to install a new version of rsync in the client machine too! This way the backup becomes much faster (no memory swapping) and you will only need to allocate extra swap space if you need to backup clients with old rsync binaries which you cannot update.
  5. The backup procedure can be automated using cron jobs, as described in the rsnapshot HOWTO.

Backup options can be adjusted by editing the rsnapshot configuration file
The conf's parameters are described in detail in the rsnapshot HOWTO.
An example rsnapshot.conf is attached rsnapshot.conf.

excludes can be specified per remote host as follows:

backup user@remote:/home/user/ remotebackup/ exclude=temp,exclude=media

the conf file wants tabs, not spaces between parameters. fortunately, the error message when you use spaces tells you exactly that…

My Book World Edition with White Light update:

This tutorial works great with the latest MBWE (with a white LED).

The following part of step 1:

Had to manually add the dir containing to /etc/ld.conf and then run ldconfig

is unecessary though, as well as step 3.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License