Difference between revisions of "Rsync"

From Mesopoly 3.0
Jump to navigation Jump to search
m
m
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
*for some reason first directory should be with trailing slash and second (target) without (?)
+
Rsync may be used for various purposes and you should check around for proper documentation. <br>
*use -n for 'dry run' (to check what is to be _deleted_)
+
<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>
*do delete .Trash Recycled and similarly funky stuff
+
 
*delete movies ie. large files worthy of deleting beforehand, as it slows whole affair
+
*for some reason first directory (SOURCE) should be written with a trailing slash and second (TARGET) without (?)
*to keep backup on TARGET disk and have deleted files delete also on backup disk
+
*use -n for 'dry run', especially  if usign --del (to check what is to be _deleted_ on destination (TARGET))
  rsync -avr --del SOURCE/ TARGET
+
*do <b>delete <i>.Trash .. Recycled</i></b> 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 <b>--del</b> SOURCE/ TARGET > for_me_to_review_in_detail.txt
 +
 
 +
if all seems fine then run rsync as shown bellow (logging does not happen with -n)<br>
 +
maybe you do not need <b>--del</b> after all?
 +
 
 +
rsync -avri <b>--del</b> --log-file=logname.txt SOURCE/ TARGET
 +
 
 +
*with excluded directories it looks like
 +
 +
  rsync -avri --exclude /Recycled/ --exclude '/.Trash*' /<b>--del</b> --log-file=logname.txt SOURCE/ TARGET (to be tested)
 +
 
 +
-a archive mode<br>
 +
-v verbose<br>
 +
-r recursive<br>
 +
-i output summary (may not need -v verbose then?)
  
 
==links==
 
==links==
 
*http://lists.samba.org/archive/rsync/ mailing list / forum
 
*http://lists.samba.org/archive/rsync/ mailing list / forum
 
*google "man rsync"
 
*google "man rsync"

Latest revision as of 11:50, 4 October 2011

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 > for_me_to_review_in_detail.txt

if all seems fine then run rsync as shown bellow (logging does not happen with -n)
maybe you do not need --del after all?

rsync -avri --del --log-file=logname.txt SOURCE/ TARGET
  • with excluded directories it looks like
rsync -avri --exclude /Recycled/ --exclude '/.Trash*' /--del --log-file=logname.txt SOURCE/ TARGET (to be tested)

-a archive mode
-v verbose
-r recursive
-i output summary (may not need -v verbose then?)

links