Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
rsync --archive --delete --sparse --compress --verbose --progress /home/tempadmin/tmp/source /home/tempadmin/tmp/destination

--archive

Same as -rlptgoD (no -H) 

This is equivalent to recursive, links, perms, times, group, owner, specials. It is a quick way of saying you want recursion and want to preserve almost everything (with hard-links being a notable omission). The only exception to the above equivalence is when --files-from is specified, in which case -r is not implied.

--owner

This option causes rsync to set the owner of the destination file to be the same as the source file, but only if the receiving rsync is being run as the super-user (see also the --super option to force rsync to attempt super-user activities). Without this option, the owner is set to the invoking user on the receiving side.

The preservation of ownership will associate matching names by default, but may fall back to using the ID number in some circumstances (see also the --numeric-ids option for a full discussion).

--group

This option causes rsync to set the group of the destination file to be the same as the source file. If the receiving program is not running as the super-user (or if --no-super was specified), only groups that the invoking user on the receiving side is a member of will be preserved. Without this option, the group is set to the default group of the invoking user on the receiving side.

The preservation of group information will associate matching names by default, but may fall back to using the ID number in some circumstances (see also the --numeric-ids option for a full discussion).

Panel
If you plan to rsync to another system, you should align your owner and group names and uid's to match up. Otherwise, if names do not match it uses uid numbers. Still to test this and write down examples and understand repercussions with possible work arounds (ie, using command to save all attributes as text file to apply on restore).

--delete

Delete extraneous files from destination directories.

--sparse

Try to handle sparse files efficiently so they take up less space on the destination.  Conflicts with --inplace because  it's not possible to overwrite data in a sparse fashion. NOTE:  

Warning
Don't use this option when the destination is a Solaris "tmpfs" filesystem.

--compress

Compress files during transfer.

Panel
For images, media or any other already compressed files do not compress as you just slow things down.

Special Use

--whole-file

Use this for first time sync if you have lots of files. 

With this option the incremental rsync algorithm is not used and the  whole  file  is  sent  as-is instead. The transfer may be faster if this option is used when the bandwidth between the source and destination machines is higher than the bandwidth to disk (especially when the "disk" is actually a networked filesystem).  This is the default when both the source and destination are specified as local paths.

  --inplace

This option is useful for transfer of large files with block-based changes or appended data, and also on systems that are disk bound, not network bound.

Mac OS X to backup iPhoto

--extended-attributes

Copy extended attributes and resource forks.

...