Rsync
Jump to navigation
Jump to search
Cron Server
- /etc/rsyncd.conf
max connections = 2 log file = /var/log/rsync.log timeout = 300 hosts allow = 192.168.0.0/24 [disney] comment = Disney Movies path = /var/local/storage/Disney Movies/ read only = yes list = yes uid = nobody gid = nogroup auth users = username secrets file = /etc/rsyncd.secrets
- /etc/rsyncd.secrets
chmod 600 /etc/rsyncd.secrets
username:password
Connect from Client
From client machine:
- cd /home/username/Movies/
rsync -o -g rsync://username@servername/disney/* /home/username/Movies/
SSH based Rsync
This is a picture directory backup
Create /usr/local/sbin/rsync-pix-dh.sh
rsync -av --bwlimit=384 -e ssh --exclude ".*" --exclude "._*" --exclude=Wallpapers --exclude="*.zip" /var/local/storage/Pictures/ username@hurlster.com:~/pictures/
{-av}
archive, recursive
Cron Script
# Daily at 10:00PM # Picture Backups to Dreamhost 0 20 * * * /usr/local/sbin/rsync-pix-dh.sh > /var/log/rsync-pix-dh.log 2>$1