3 liens privés
Pour synchroniser un répertoire et son distant sans le git :
rsync -avirzh --exclude '.git' . <destserver>:~/path/to/dest
rsync -avirzh -e 'ssh -p 2222' . root@IP.IP.IP.IP:~/path/to/dest
With partial, progressive a restart on error :
rsync -Pavirzh -e 'ssh -p 2222' . root@IP.IP.IP.IP:~/path/to/dest
Short explanation :
-P : retry a long transfer that may be interrupted.
-a, --archive : a quick way of saying you want recursion and want to preserve almost everything (also include -r)
-v, --verbose
-i, --itemize-changes : show changes
o A < means that a file is being transferred to the remote host (sent).
o A > means that a file is being transferred to the local host (receive).
o A c means that a local change/creation is occurring for the item
o A h means that the item is a hard link to another item (requires --hard-links).
o A . means that the item is not being updated
o A * means that the rest of the itemized-output area contains a message (e.g. "deleting").
o A s means the size of a regular file is different and will be updated by the file transfer.
o A t means the modification time is different and is being updated to the sender’s value
(requires --times).
o A p means the permissions are different and are being updated to the sender’s value
(requires --perms).
o An o means the owner is different and is being updated to the sender’s value (requires
--owner and super-user privileges).
o A g means the group is different and is being updated to the sender’s value (requires
--group and the authority to set the group).
o The u slot is reserved for future use.
o The a means that the ACL information changed.
o The x means that the extended attribute information changed.
-r, --recursive
-z, --compress
-h, --human-readable