Robert Smits wrote:
I have a number of systems I'd like to regularly back up with rsync. Let me describe them.
Computer 1 is my main desktop at home. It runs 24-7 and has a 500 GB USB SATA drive to do back ups on. It uses OpenSuse 10.2. It is networked to all other computers in the house with nfs.
Computer 2 is my laptop, which goes everywhere. At home it is networked to Computer 1 and 3 with nfs. At work it is networked to my work computer (also running nfs). It runs OpenSuse 10.3.
Computer 3 is my wife's desktop at home. It uses OpenSuse 10.2 and is networked to computers 1 and 2.
Computer 4 is my work computer, a desktop running OpenSuse 10.2 and networked to my laptop with nfs when I am there.
What I'd like to do is regularly make backups of: 1. my files on my desktop to my USB drive. 2. my files on my laptop, which are a subset of the files on my desktop, to my desktop. 3. my files on my work computer to my laptop.
Am I going to have file permission problems doing it this way? (My home partition has the same name on each computer).
Other suggestions about how to organize this are gratefully received.
Bob.
Yes, That will work, that is basically the way I do it. For the subsets of files you want to backup, rsync's --files-from option comes in handy. Below is an example of the script I use to backup work to home as well as the --files-from file to show you the format. You can strip out all of the fluff and get the idea. rsync is tailor made for what you want to do. Cheers. david@nemesis:~/Documents/scripts> cat rsyncwork #!/bin/bash DATE=`date` echo $DATE >> /home/david/rsync.log echo --- starting backup of workfiles >> /home/david/rsync.log echo --- the work files to be backed up are: >> /home/david/rsync.log cat /home/david/Documents/scripts/workfiles >> /home/david/rsync.log if /usr/bin/rsync -rze ssh --delete --files-from=/home/david/Documents/scripts/workfiles user@rbpllc.com:/home/samba/ /home/samba/law then echo .... Rankin Law Firm backup ------------- [OK] >> /home/david/rsync.log DATE=`date` echo .... Backup completed at $DATE >> /home/david/rsync.log # echo Backup complete at `date` on nemesis | mail -s "backup complete on `date`" david@nemesis else echo .... Rankin Law Firm backup ------------- [Failed] >> /home/david/rsync.log DATE=`date` echo .... Backup failed at $DATE >> /home/david/rsync.log # echo Backup failed at `date` on nemesis | mail -s "backup failed on `date`" david@nemesis fi echo --- starting backup of work web site files >> /home/david/rsync.log echo --- the web site files to be backed up are: >> /home/david/rsync.log cat /home/david/Documents/scripts/workwebfiles >> /home/david/rsync.log if /usr/bin/rsync -rze ssh --delete --files-from=/home/david/Documents/scripts/workwebfiles user@rbpllc.com:/var/www/vhosts/ /home/david/Documents/bonza_backup/var/www/vhosts then echo .... Web Site backup ------------- [OK] >> /home/david/rsync.log DATE=`date` echo .... Backup completed at $DATE >> /home/david/rsync.log # echo Backup complete at `date` on nemesis | mail -s "backup complete on `date`" david@nemesis else echo .... Web Site backup ------------- [Failed] >> /home/david/rsync.log DATE=`date` echo .... Backup failed at $DATE >> /home/david/rsync.log # echo Backup failed at `date` on nemesis | mail -s "backup failed on `date`" david@nemesis fi echo --- starting backup of david/Mail >> /home/david/rsync.log if /usr/bin/rsync -rze ssh --delete user@rbpllc.com:/home/david/Mail/ /home/david/Documents/bonza_backup/Mail then echo .... david/Mail backup ------------- [OK] >> /home/david/rsync.log DATE=`date` echo .... Backup completed at $DATE >> /home/david/rsync.log # echo Backup complete at `date` on nemesis | mail -s "backup complete on `date`" david@nemesis else echo .... david/Mail backup ------------- [Failed] >> /home/david/rsync.log DATE=`date` echo .... Backup failed at $DATE >> /home/david/rsync.log # echo Backup failed at `date` on nemesis | mail -s "backup failed on `date`" david@nemesis fi david@nemesis:~/Documents/scripts> cat workfiles office rankin joint/rankinguillory joint/rankinbertin joint/rankinallen joint/rga forms computer/hardware computer/software closed/rankin closed/rb closed/rg egwfiles/backup egwfiles/mydms scans -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org