Difference between revisions of "Backup: aws cli, rsync"
From Wasya Wiki
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | |||
| + | = rsync = | ||
| + | |||
| + | |||
| + | == Which is the rsync command to “smartly” merge two folders? == | ||
| + | * From :https://superuser.com/questions/547282/which-is-the-rsync-command-to-smartly-merge-two-folders | ||
| + | |||
| + | rsync -ruvi src/ dest/ | ||
| + | |||
| + | The options are: | ||
| + | <pre> | ||
| + | -i turns on the itemized format, which shows more information than the default format | ||
| + | -b makes rsync backup files that exist in both folders, appending ~ to the old file. You can control this suffix with --suffix .suf | ||
| + | -u makes rsync transfer skip files which are newer in dest than in src | ||
| + | -z turns on compression, which is useful when transferring easily-compressible files over slow links | ||
| + | -P turns on --partial and --progress | ||
| + | --partial makes rsync keep partially transferred files if the transfer is interrupted | ||
| + | --progress shows a progress bar for each transfer, useful if you transfer big files | ||
| + | </pre> | ||
| + | |||
| + | == rsync, other == | ||
Manpage: https://download.samba.org/pub/rsync/rsync.1#opt--itemize-changes | Manpage: https://download.samba.org/pub/rsync/rsync.1#opt--itemize-changes | ||
| Line 18: | Line 39: | ||
</pre> | </pre> | ||
| − | == | + | = aws cli, backup = |
| − | + | ||
| − | + | aws s3 sync /local/folder s3://my-bucket/path/ --delete | |
| − | + | aws s3 sync assets2d-3 s3://ish-lib-2/assets2d-3 --delete | |
| − | + | aws s3 sync assets1d-1 s3://ish-lib-2/assets1d-1 --delete | |
| − | + | aws s3 sync assets3d-3 s3://ish-lib-2/assets3d-3 --delete | |
| − | - | + | |
| − | - | + | |
| − | - | + | |
| − | - | + | |
| − | - | + | |
| − | -- | + | |
| − | -- | + | |
| − | + | ||
Latest revision as of 15:59, 15 February 2026
Contents
rsync
Which is the rsync command to “smartly” merge two folders?
- From :https://superuser.com/questions/547282/which-is-the-rsync-command-to-smartly-merge-two-folders
rsync -ruvi src/ dest/
The options are:
-i turns on the itemized format, which shows more information than the default format -b makes rsync backup files that exist in both folders, appending ~ to the old file. You can control this suffix with --suffix .suf -u makes rsync transfer skip files which are newer in dest than in src -z turns on compression, which is useful when transferring easily-compressible files over slow links -P turns on --partial and --progress --partial makes rsync keep partially transferred files if the transfer is interrupted --progress shows a progress bar for each transfer, useful if you transfer big files
rsync, other
Manpage: https://download.samba.org/pub/rsync/rsync.1#opt--itemize-changes
rsync -avxHAWX --numeric-ids --progress / mnt/ > ~/rsync.out
rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /root/bigfile.txt 198.211.117.129:/root/
The options are:
-a : all files, with permissions, etc.. -r : recursive -v : verbose, mention files -x : stay on one file system -H : preserve hard links (not included with -a) -A : preserve ACLs/permissions (not included with -a) -X : preserve extended attributes (not included with -a) -W : whole files
aws cli, backup
aws s3 sync /local/folder s3://my-bucket/path/ --delete aws s3 sync assets2d-3 s3://ish-lib-2/assets2d-3 --delete aws s3 sync assets1d-1 s3://ish-lib-2/assets1d-1 --delete aws s3 sync assets3d-3 s3://ish-lib-2/assets3d-3 --delete