Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

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

1 Answer 1

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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