I want to backup a computer directory over SSH using rsync, which I have on both hosts.

192.168.1.7 is my fileserver and here's what I'm going with:

sudo rsync -delete -avzpud / -e ssh jack@192.168.1.7:/mnt/data/Backups/Box

If I run the above command, will I mess up my system?

link|improve this question
why dont you just change the path (/) to another directory to test? – JT.WK Mar 3 '11 at 4:31
feedback

1 Answer

up vote 1 down vote accepted

Well, for starters, you need to spend some time reviewing the documentation for rsync because "-delete" probably won't do what you're probably expecting "--delete" to do.

Here's what the "-avzpud" options will do, according to the documentation (you should still review all the options in the documentation to figure out what suits your environment the best):

  -a     archive mode; equals -rlptgoD (no -H,-A,-X)
  -v     increase verbosity
  -z     compress file data during the transfer
  -p     preserve permissions
  -u     skip files that are newer on the receiver
  -d     transfer directories without recursing

The "--delete" option has the potential to be destructive, so you really need to test it first with dummy data in a directory (make sure you include a few levels of sub-directories with a few more files scattered throughout).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.