Date: 2010jun7
OS: Linux
Product: rsync
Q. How can I send a backup to an rsync server?
A. ON THE SERVER SIDE.
Make a user to own the backup:
useradd backupuser
Set up the server in /etc/rsyncd.conf
for example:
[myphotos]
uid = backupuser
gid = backupuser
readonly = false
path = /backups/myphotos
comment = Photos I have taken myself
auth users = rsync
secrets file = /etc/rsyncd.secrets
Make the secrets file /etc/rsyncd.secrets
backupuser:myPASS
Start the server:
/bin/service rsync start
ON THE CLIENT SIDE.
Make a script, called for example /usr/local/bin/backup_myphotos
#!/bin/sh
export USER=backupuser
export RSYNC_PASSWORD=myPASS
rsync --archive --compress -v /home/myphotos/ myserver::myphotos
# The trailing slash after your source folder (/home/myphotos/)
# is important because it requests a backup of the cotents of the folder.
# I used to use the --checksum option but it became too slow.
Run your script with cron.
I've heard good things about rsnapshot but haven't tried it myself
https://github.com/rsnapshot/rsnapshot