Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
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 backupuserSet 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.secretsMake the secrets file /etc/rsyncd.secrets backupuser:myPASSStart the server:/bin/service rsync startON 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.
Add a commentSign in to add a comment