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" |
No edit summary |
||
| Line 2: | Line 2: | ||
* 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=bash> | |||
-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 | |||
-i --log-file specify logfile | |||
--exclude exclude certain files (like "*.sqlite") and folders (like "Cache/") | |||
</syntaxhighlight> | |||
Revision as of 07:20, 2 November 2011
201103 Bash, Command-line
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 -i --log-file specify logfile --exclude exclude certain files (like "*.sqlite") and folders (like "Cache/")