[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 |
Hello,
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.
INSTALLATION INSTRUCTIONS
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
http://rtime.felk.cvut.cz/~sojka/rdiff-backup/python/python-2.5.2-arm.tar.gz
http://rtime.felk.cvut.cz/~sojka/rdiff-backup/rdiff-backup-1.2.1-arm.tar.gz
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
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.
DETAILED INFORMATION
The build of python was based on these resources:
http://www.synology.com/enu/support/3rd-party_application_integration.php
http://whatschrisdoing.com/blog/2006/10/06/howto-cross-compile-python-25
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 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
http://rtime.felk.cvut.cz/~sojka/rdiff-backup/.
Best regards
Michal
0001-Added-include-to-support-building-against-cross-co.patch
Description: Text Data
0002-TempFile-renamed-to-RTempFile-to-avoid-ambiguity-on.patch
Description: Text Data
0003-Time-renamed-to-RTime-to-avoid-ambiguity-on-case-ins.patch
Description: Text Data
- [rdiff-backup-users] rdiff-backup for Synology ARM based NAS,
Michal Sojka <=