File and folder synchronization with rsync: Difference between revisions
From WickyWiki
Created page with "201103 Bash, Command-line * https://help.ubuntu.com/community/rsync Todo: examples" |
m 8 revisions |
||
| (7 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
201103 | [[Category:Ubuntu]] | ||
[[Category:Bash]] | |||
[[Category:201103]] | |||
* https://help.ubuntu.com/community/rsync | * https://help.ubuntu.com/community/rsync | ||
<syntaxhighlight lang=bash> | |||
rsync -r -t -l -v --size-only --modify-window=1 | |||
-i --log-file="/home/userx/rsync.log" | |||
-b --backup-dir="/home/userx/backup_dir/" | |||
--delete-after "/home/userx/from_dir/" "/home/userx/to_dir/" | |||
</syntaxhighlight> | |||
Options: | |||
<syntaxhighlight lang=xml> | |||
-n dry run only, no changes will be made | |||
-r recursive subfolders | |||
-t with timestamps | |||
-l symbolic links as symbolic links | |||
-v verbose | |||
--size-only compare size/date/time only (fast) | |||
--modify-window=1 compare time with mswindows accuracy | |||
-b --backup-dir backup modified and deleted files in backup-dir | |||
--delete-after delete destination files after sync is done (needs space) | |||
-i --log-file specify logfile | |||
--exclude exclude certain files (like "*.sqlite") and folders (like "Cache/") | |||
--max-size=1.5g skip files larger than 1.5Gb | |||
</syntaxhighlight> | |||
Latest revision as of 07:25, 5 July 2013
rsync -r -t -l -v --size-only --modify-window=1 -i --log-file="/home/userx/rsync.log" -b --backup-dir="/home/userx/backup_dir/" --delete-after "/home/userx/from_dir/" "/home/userx/to_dir/"
Options:
-n dry run only, no changes will be made -r recursive subfolders -t with timestamps -l symbolic links as symbolic links -v verbose --size-only compare size/date/time only (fast) --modify-window=1 compare time with mswindows accuracy -b --backup-dir backup modified and deleted files in backup-dir --delete-after delete destination files after sync is done (needs space) -i --log-file specify logfile --exclude exclude certain files (like "*.sqlite") and folders (like "Cache/") --max-size=1.5g skip files larger than 1.5Gb