![]() |
rsnapshot is a great replacement for the built-in backup script the NSLU2 provides. As well as providing a copy of the data in some other place (probably another drive), it also provides versioning of your data so you can recover from an accidental file deletion, corruption, or unwanted change. Commercial products refer to these version as snapshots(approve sites). rsnapshot can also be used to make backups of remote machines via SSH. 1. Install the required packages in the following order: ipkg update ipkg install unslung-feeds ipkg update ipkg install perl ipkg install rsync ipkg install coreutils ipkg install make (OpenSlug doesn't require 2. Download and extract rsnapshot from the http://www.rsnapshot.org site [choose the Generic Linux version] 3. Change into the directory you extracted rsnapshot into and run the following. ./configure \ (for OpenSlug, just 4. Ignore any warnings/errors about missing tr/cmp if they occur, otherwise try to figure out what went wrong. 5. Complete the install: /opt/bin/make install 6. Fix a small bug with the du feature in rsnapshot 1.1.7: sed -ie 's/system("du/system("\/opt\/bin\/du/' /opt/bin/rsnapshot
(the rsnapshot 1.2.1 version has a 7. Copy the defaults file to your own: cp /opt/etc/rsnapshot.conf.default /opt/etc/rsnapshot.conf (OpenSlug: if you didn't tell 8. Edit your
If you are lucky enough to have 2 physical drives then I'd recommend setting your 9. Test whether your configuration file is valid. It should return "Syntax OK" /opt/bin/rsnapshot configtest 10. If you got errors about your 11. Follow the instructions on HowTo.EnableLoggingInCron - at a minimum install the 12. Once you are happy with your configuration, you've added the 5 9-22 * * * root /opt/bin/cronlogger /opt/bin/rsnapshot hourly &>/dev/null 13. Repeat the above for any /etc/rc.d/rc.crond 14. Either wait until your next scheduled run or start one manually: /opt/bin/rsnapshot hourly 15. Your first snapshot may take a long time to run. If you enabled logging then check your log file occasionally as it may be telling you that there is a problem and since the 16. You can have multiple different configuration files that allow you to have totally different configurations for certain backups. Again, read the rsnapshot documentation. Update: if you install the unslung-feeds ipkg, rsnapshot 1.2.0 is now available prebuilt, depracating the requirement to build it from source on the NSLU2. simply issue the following commands: ipkg install unslung-feeds ipkg update ipkg install rsnapshot then configure as described above, from step 7 down. Update: rsnapshot 1.1.6 and 1.2.0 had security problems, which were fixed in versions 1.1.7 and 1.2.1. Please do not use the earlier versions, as they are vulnerable. See http://www.rsnapshot.org details. Update! rsnapshot doesn't seem to work properly when the link_dest option is configured! I installed rsnapshot 1.2.9-1 using ipkg following above instructions on unslung 6.8beta. Each time it ran, it seemed to take a constant amount of time and according to du, each hourly snapshot was taking up new space. After setting the link_dest parameter in rsnapshot.conf to zero (it defaulted to 1 in the package) rsnapshot began to behave as expected - 1st run was slow then subsequent runs took time proportional to what had been changed, so usually very fast. Also, the unnecessary space consumption problem appeared to go away.
view ·
edit ·
print ·
history ·
Last edited by Matthew.
Based on work by Matthew, JimmyFergus, tman, HannesReich, Nathan, Blaise at geeky dot net, paulhar, uSURPER, and rwhitby. Originally by uSURPER. Page last modified on April 09, 2007, at 04:32 AM
|