Server Fault is a question and answer site for system and network administrators. 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 know you can use -a or --archive to activate archive mode when using rsync. Unfortunately, I have no idea what archive mode is supposed to do, and the man page is not at all explicit about what this is:

equals -rlptgoD (no -H,-A,-X)

Can you explain what those options (rlptgoD) mean and what's the behaviour of rsync when I use them?

share|improve this question
We could probably do without all the "reminds me...", which are completely irrelevant. – John Gardeniers May 14 '10 at 4:46

It's all of these:

-r, --recursive recurse into directories

-l, --links copy symlinks as symlinks

-p, --perms preserve permissions

-t, --times preserve modification times

-g, --group preserve group

-o, --owner preserve owner (super-user only)

-D same as --devices --specials

--devices preserve device files (super-user only)

--specials preserve special files

It excludes:

-H, --hard-links preserve hard links

-A, --acls preserve ACLs (implies -p)

-X, --xattrs preserve extended attributes

It's perfect for backups. My "default" set of switches is -avzP - archive mode, be verbose, use compression, preserve partial files, display progress.

share|improve this answer
+1 - yes, it's in the man page, but it's also nice to see it here with the answer for easy reference – cwd Dec 21 '14 at 5:43
easier than looking in the man page :P ? – Salami Oct 12 '15 at 5:39
+1 for sharing the option combination for backups (-avzP). – RoboAlex Mar 3 at 5:48
yeah somewhere along the way, lmgtfy became easier than man rsync. – Stu Mar 17 at 13:40

The archive switch is just a shortcut to skip having to enter a bunch of switches that you'll normally use if you're using rsync to make backups (a common task).

It's the same as typing:

rsync -r -l -p -t -g -o -D

And it's much easier to remember. You can find definitions for all of those switches in the man page.

(The hyphens are optional when you're combining multiple single-letter switches.)

share|improve this answer
thanks, but I think you're missing my point. Can you please explain what combining all those options does without having me read 7 different parts of the man page, which probably refer to other parts of the man page? – allyourcode May 14 '10 at 3:40
I think you're missing the point that it's important to read the man page to know exactly what you're doing. rsync has some very powerful options, including a way to delete files! It's like your asking for help on using a table saw because you don't like reading instruction manuals. – David M May 14 '10 at 3:53

It make sure the permission, attributes, etc. is same at the both side. rsync only works in that way... if you want to synchronising files, you have to use -a parameter.

This is because rsync compare these permission, attribute, etc. at both side to determining if they are the SAME FILE and decide if it should be updated. if you use rsync -r xxx yyy instead rsync -a xxx yyy, some files will be copy again and again, coz, permission, attribute not be synchronised, and miss matched at both side...

share|improve this answer

Your Answer


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.