Friday 27 February 2009

Setting up rsnapshot backup tool on Linux + NFS

Since the Mac server is now sharing it's RAID device with NFS the Linux server can now backup to this share.

Hint:
I'm always struggling to get NFS going for some reason, using the command showmount -e
you will get a list of the NFS server's shares. That helps a lot!

I set up a seperate partition on the Mac server as an NFS share only to be accessed by one IP address, that is the IP of the Linux server.

The Linux server has an hourly cronjob to keep the NFS mounted, just to be sure. I placed this file in /etc/cron.hourly/MountNFS-Share Contents:
#!/bin/sh
mount 192.168.0.3:/Volumes/Jupiter-Backups /mnt/backup/

Next I added this following to /etc/crontab on the Linux server:
0 4 * * * root /usr/bin/rsnapshot hourly
50 23 * * * root /usr/bin/rsnapshot daily
40 23 1,8,15,22 * * root /usr/bin/rsnapshot weekly
30 23 1 * * root /usr/bin/rsnapshot monthly

This way the Linux server should backup itself incrementally to the Mac server's RAID device. Also, because the backup goes to the RAID device it will automaticaly be an extra off-site backup.


No comments: