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? 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