[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[rdiff-backup-users] rdiff-backup for Synology ARM based NAS

From: Michal Sojka
Subject: [rdiff-backup-users] rdiff-backup for Synology ARM based NAS
Date: Fri, 10 Oct 2008 18:11:16 +0200
User-agent: KMail/1.9.9


after several days of unsuccessful attempts to setup rdiff-backup to work with 
Synology's RS407 NAS over CIFS or NFS, I decided to compile rdiff-backup to 
run as server on this NAS. Fortunately, it was not so hard. In this mail, 
I'll describe what I've done so others can benefit from it.


I have RS407 (http://www.synology.com/enu/products/RS407/index.php), but my 
binaries should also work with CS/RS407, DS207+, DS107+.

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).
tar xf rdiff-backup-1.2.1.patched-src.tar.gz
cd rdiff-backup-1.2.1.p
python setup.py install

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:

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.


The build of python was based on these resources:

My patch to python and makefile (xcompile.mk) can be downloaded from 

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 http://www.synology.com/enu/forum/viewtopic.php?f=51&t=3647 
and  http://www.synology.com/enu/forum/viewtopic.php?f=3&p=45501).
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

Best regards

Attachment: 0001-Added-include-to-support-building-against-cross-co.patch
Description: Text Data

Attachment: 0002-TempFile-renamed-to-RTempFile-to-avoid-ambiguity-on.patch
Description: Text Data

Attachment: 0003-Time-renamed-to-RTime-to-avoid-ambiguity-on-case-ins.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]