meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:rsync [2024/11/25 19:25] – niziak | linux:rsync [2025/03/30 19:56] (current) – niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== rsync ====== | ====== rsync ====== | ||
| + | |||
| + | ===== get changes to separate dir ===== | ||
| + | |||
| + | Option '' | ||
| + | > If DIR is a relative path, it is relative to the destination directory | ||
| + | |||
| + | So to restore changes between remote DST and current folder '' | ||
| + | restored files in '' | ||
| + | <code bash> | ||
| + | rsync --dry-run -v -ra -P -i --compare-dest=.. ${DSTHOST}:/ | ||
| + | </ | ||
| ===== print why ===== | ===== print why ===== | ||
| Line 5: | Line 16: | ||
| rsync want to transfer - add '' | rsync want to transfer - add '' | ||
| + | ===== local replication ===== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | <code bash> | ||
| + | rsync -avxHAXS --numeric-ids --info=progress2 / /new-disk/ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | -a  : all files, with permissions, | ||
| + | -v : verbose, mention files | ||
| + | -x : stay on one file system | ||
| + | -H : preserve hard links (not included with -a) | ||
| + | -A  : preserve ACLs/ | ||
| + | -X : preserve extended attributes (not included with -a) | ||
| + | -S, --sparse  | ||
| + | |||
| + | To improve the copy speed, add -W (--whole-file), | ||
| + | </ | ||
| ===== between two remotes ===== | ===== between two remotes ===== | ||