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. -- Bob Smits bob@rsmits.ca A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 23 October 2007 21:39:09 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. Probably. I've never used it, but others have recommended a tool called unison.
Am I going to have file permission problems doing it this way? (My home partition has the same name on each computer). You might have UID/GID issues if they are different on different computers.
Bob. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
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
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.
rsync does all of this and much more, but imho this is a bit complicated. I would do it like this, derived from practical life: Install Unison on your laptop and on any computer that you want to sync in one or an other way, either to or from your laptop. Configure profiles in Unison on your laptop that do the different syncs to and from other computers. Rationale behind this: Your laptop is the only PC that is not permanently available on your home network, so it makes sense to control the sync actions that involve the laptop from this machine, i.e. when it is available or when someone uses it at home. You can also easily automate these sync task on your laptop via the unison text mode client that does the same like the GUI, just in the console and sriptable. The remaining task(s), as I understand, are the backup job(s) to your usb drive. For this I would use rsnapshot to facilitate an easy multi generation backup. If, some day, you decide to backup more machines or more data to your usb_disk, this also is dead easy with rsnapshot, since it works on top of rsync, just more easy and more intelligent. This is also very easy to have done automagically, via cron, for example. I hope I understood your targets correctly. kind regards Eberhard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue October 23 2007 22:39, Robert Smits wrote:
I have a number of systems I'd like to regularly back up with rsync. Let me describe them.
I created these two scripts, which allow me to synchronize things between office, home desktop and laptop, in any direction I want, only updating what is newer under a parent directory and only deleting files after asking for confirmation. I found that sometimes I forgot that I created a new file in the office, say under Projects/ABC/, and when I work from home and I want to "syncsend Projects", it asks if I want to delete that new file. I then say "no" and subsequently run "syncget Projects" to bring that file to my desktop at home. You want to save these scripts in your ~/bin/ directory and make them executable (right-click/Properties or chmod ug+x sync*). Edit the files to have your own default destination and maybe adapt the default exclusions. You also want to enter the option "--dry-run" at the prompt when you run it the first time, just to make sure the scripts do what you want, before it really counts. Enjoy! -- Carlos FL Who is General Failure, and why is he reading my disk?
participants (5)
-
Carlos F Lange
-
David C. Rankin J.D. P.E.
-
Eberhard Roloff
-
Jim Cunning
-
Robert Smits