----- Original Message -----
From: "Bob S" <911@sanctum.com>
To:
On Tuesday 08 July 2008 06:35:10 am Brian K. White wrote:
----- Original Message ----- From: "Bob S" <911@sanctum.com> To:
Sent: Monday, July 07, 2008 8:13 PM Subject: [opensuse] Two simple rsync questions Hi SuSE people,
1 When I backup a direcory (home for instance) rsync copies everything UNDER that folder. How can I make it keep the title directory? "home"
2 How do YOU restore. A whole directory or just a few files for instance. Does it overwrite?
This is all covered in "man rsync" There are even sample rsync commands for common usage like that.
<snip instructions>
Wow Brian you sound like the man page, but lots more instructive. I read the man page several times and found it confusing for somebody who has never used the program. info man did give some examples.
This is all just what's convenient and sane for me, which is perhaps only true for me and/or only in the context of other factors particular to my operations. There are many many ways to use rsync because it has many features to cover many situations. If any of this doesn't fit in with your plans, well, that is why the man page exists to describe everything rsync can do.
I am simply preserving files and their structure to a USB hard drive. Some of those instructions sound a little scary to me. I will do a little experimentation with some innocuous stuff that isn't important. Thanks for being helpful.
Just for the record, even though I use rsync _all_ the time, all day every day numerous times on lots of boxes, aross several platforms etc... Even so, I routinely have to pore over the man-page to see if a particular option exists, or what it's exact behavior is supposed to be, and then I still have to do several trial&error test runs until I get the effect I want. Just today I finally got around to improving my main backup scripts to replicate leading paths automatically on the destination. Took many many false starts to get it to, for example, create a missing /etc directory on the far end and place passwd in it, without also copying all rest of /etc. I finally discovered that at least on very recent versions there is a -R option that does exactly what I want, and I don't have to try to do it the hard way using a specially arranged inclusion/exclusion list and --filter So I can have backup / server-mirror config files that have a nice simple list of file & directory names in them that even my co-workers have a reasonable chance of editing without breaking. And the directory structure will be replicated on the fly within a new empty backup directory on the backup server, greatly simplifying initial setup of each new server that wants to back up to the backup server. Granted much of this was working on enhancing other features of the script not just the rsync commands themselves, but it took me the last several hours to get it working just right and be robust and safe. And as I said, I use rsync all the time as casually as cp or ls, and I was only enhancing a script that was already written and tested and in heavy use on a lot of boxes, not even writing a new thing from scratch. So don't feel bad that it seems like a lot of reading and too much info to handle at once. It IS! But, thats the built-in and unavoidable price of great power. :) -- Brian K. White brian@aljex.com http://www.myspace.com/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org