On Sunday 23 November 2003 18:13 pm, Tom Nielsen wrote:
Original poster here. I failed to mention that I want to backup my whole hard drive including my root and home directories to another drive on my computer. this is a stand alone machine. I was going to go with a RAID1 setup but found that's really not what I wanted to accomplish since if I screw up one system, the other will go too.
Will the below command still do what I want? It sounds like it. How would I setup my second drive? Any special partitions? Should I dd the disk first then use rsync or just rsync to begin with?
To essentially 'mirror' your first drive, you should: 1)Set up the 2nd drive with the same partitions (and size of partitions) as the first. 2) Make duplicate (but different) mount point in your root directory. Like /home2 to be a copy of /home, /root2 to be a copy of '/' etc. 3) Format those partitions with the filesystem of your choice. 4) Mount them to their proper mount points. (and add entries to /etc/ fstab so that they get mounted at boot time. 5) Run your first rsync to each partition. 6) Make a cron job to do it automatically. Be ware that yes, if you are sync'ing every 24 hours and you make a screwup that you don't catch within those 24 hours, you are going to sync the screwup to your backup drives... but no scheme can prevent that unless you can have multiple generations of backups.
Thanks, Tom
On Sun, 2003-11-23 at 09:32, Bruce Marshall wrote:
On Sunday 23 November 2003 12:09 pm, Bernd wrote:
I've been seeing the responses on this thread, yet I wonder if I would also have success with rsync.
I'm on a standalone, using 9.0 pro. I would like to backup modified and new files to a seperate partition. Rsync appears to be for 'sync'ing files over a network.
Would it work for me, or is there something better?
I think rsync is just what you want. Let's assume you want to keep a backup of the /home/foo/ directory. So you make a directory (hopefully on another drive but for the sake of this example) at /usr/ local/foo2/
Then run the command:
rsync -auvzr --delete /foo/ /usr/local/foo2/
This is exactly what I use between machines or locally. If to another machine I add the parm: -e ssh to use ssh to do the connection.
The above, run every <once in awhile> will keep /foo2/ in sync with / foo/, and it would only copy the new and updated files once you made your initial run at it.
The --delete will delete from /foo2/ anything you have deleted from / foo/
Note the use of the trailing slash. It's important when using rsync to copy directories...
By the way, if you add an 'n' to the mix (-auvzrn) it will show you the files that it WOULD copy but it won't actually copy them. For testing.
man rsync is your friend.
-- +------------------------------------------------------------------- --------- + + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 11/23/03 12:28 + +------------------------------------------------------------------- --------- + 'If truth is beauty, how come no one has their hair' 'done in the library?' -- Lily Tomlin
-- +---------------------------------------------------------------------------- + + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 11/23/03 19:10 + +---------------------------------------------------------------------------- + "He is winding the watch of his wit; by and by it will strike." - William Shakespeare