Difference between revisions of "Rsync"
Jump to navigation
Jump to search
m |
m |
||
| Line 1: | Line 1: | ||
| + | Rsync may be used for various purposes and you should check around for proper documentation. <br> | ||
| + | <B>This page is a memo sheet for us here, where rsync is used to create a mirror copy of a disk or a directory, i.e. we use it for backup</b> | ||
| + | |||
*for some reason first directory (SOURCE) should be written with a trailing slash and second (TARGET) without (?) | *for some reason first directory (SOURCE) should be written with a trailing slash and second (TARGET) without (?) | ||
*use -n for 'dry run', especially if usign --del (to check what is to be _deleted_ on destination (TARGET)) | *use -n for 'dry run', especially if usign --del (to check what is to be _deleted_ on destination (TARGET)) | ||
*do delete <i>.Trash .. Recycled</i> and similar stuff before copying, or exclude it | *do delete <i>.Trash .. Recycled</i> and similar stuff before copying, or exclude it | ||
*delete or exclude large files worthy of deleting (boring divx movies) beforehand, as large files slow the whole affair | *delete or exclude large files worthy of deleting (boring divx movies) beforehand, as large files slow the whole affair | ||
| − | |||
| − | rsync -avrin --del SOURCE/ TARGET | + | rsync -avrin <b>--del</b> SOURCE/ TARGET |
| − | if all seems fine then run (logging does not happen with -n) | + | if all seems fine then run (logging does not happen with -n)<br> |
| + | maybe you do not need <b>--del</b> after all? | ||
| − | rsync -avri --del --log-file=logname.txt SOURCE/ TARGET | + | rsync -avri <b>--del</b> --log-file=logname.txt SOURCE/ TARGET |
-a archive mode<br> | -a archive mode<br> | ||
Revision as of 08:41, 28 May 2009
Rsync may be used for various purposes and you should check around for proper documentation.
This page is a memo sheet for us here, where rsync is used to create a mirror copy of a disk or a directory, i.e. we use it for backup
- for some reason first directory (SOURCE) should be written with a trailing slash and second (TARGET) without (?)
- use -n for 'dry run', especially if usign --del (to check what is to be _deleted_ on destination (TARGET))
- do delete .Trash .. Recycled and similar stuff before copying, or exclude it
- delete or exclude large files worthy of deleting (boring divx movies) beforehand, as large files slow the whole affair
rsync -avrin --del SOURCE/ TARGET
if all seems fine then run (logging does not happen with -n)
maybe you do not need --del after all?
rsync -avri --del --log-file=logname.txt SOURCE/ TARGET
-a archive mode
-v verbose
-r recursive
-i output summary (may not need -v verbose then?)
links
- http://lists.samba.org/archive/rsync/ mailing list / forum
- google "man rsync"