Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .