Rsync: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<pre>rsync -a -h --stats -v /src/ /dst/
<pre>
rsync -a --stats /src/ /dst/


is the standard.
-a = -r (recursive), -l, -p (permissions), -t (times), -g, -o, -D


-a = archive flag, which implies -r (recursive), -t (preserve filetimes), -p (permissions), -l, -g -o -D.
other usefull options:
 
Usefull to throw in:


-n = trial run
-n = trial run
--stats = show some statistics
-h = human readable output
-h = human readable output
--progress (shows progression)
-i = itemised change list
-i = itemised change list
-vv = extra information whilst running
-v = verbose
-vv = extra verbose
-u = update: only overwrite files with older mtimes


To use --exclude-file=filename
To use


in filename (which has to be in the dir you're running the command from) you can put
--exclude-from=filename
filename has to be in the same directory as where the command is run and needs  the following lines


---
-------
- Directory1/
- dir1/
- Directory2/
- dir2/
----
----


which will exclude:
which will exclude processing of /src/dir1/ and /src/dir2/
/src/Directory1/
/src/Directory2/  
 
Troubleshoot this with -vv


troubleshoot this with
-vv


=======</pre>
==================
</pre>
run from 192.168.1.6 (192.168.1.8 was rsync server)
run from 192.168.1.6 (192.168.1.8 was rsync server)



Revision as of 09:48, 25 June 2008

rsync -a --stats /src/ /dst/

-a = -r (recursive), -l, -p (permissions), -t (times), -g, -o, -D

other usefull options:

-n = trial run
-h = human readable output
--progress (shows progression)
-i = itemised change list
-v = verbose
-vv = extra verbose
-u = update: only overwrite files with older mtimes

To use

--exclude-from=filename
filename has to be in the same directory as where the command is run and needs  the following lines

-------
- dir1/
- dir2/
----

which will exclude processing of /src/dir1/ and /src/dir2/

troubleshoot this with 
-vv

==================

run from 192.168.1.6 (192.168.1.8 was rsync server)

rsync -caRvuz --stats -e ssh --delete /usr/store/ razor@192.168.1.8:wipstore

run from 192.168.1.8 (192.168.1.6 was rsync server)

rsync -caRvuz --stats -e ssh root@192.168.1.6::wipstore /import/wipstore/


files /etc/rsyncd.conf