Quick Adds
- Direction:
Pull - User:
inanimate - Remote module name
<mod>/<path>/* - Enabled
- Recursive
- Times (reconsider!)
- Archive
- Preserve Extended Attributes
- Delay Updates
-Pvihu --timeout=300 --chmod=ug=rwX,o=rX --ignore-missing-args- (test first!)
--dry-run - (if needed)
--ignore-existing - (if needed)
--log-file=/tmp/rsync.log - (if needed)
--size-only,--no-times
rsync \
--archive \
--xattrs \
--update \
--itemize-changes \
--delay-updates \
--partial \
--progress \
--human-readable \
--verbose \
--timeout=300 \
--chmod=ug=rwX,o=rX \
--dry-run
Optionally, add --ignore-existing if copying from NTFS to a "normal" filesystem.
I've added --ignore-missing-args as a needed flag to ensure when using a wildcard derp/* for the source, but which nothing exists inside of derp, rsync doesn't throw an error.
If the modification time of the source file has changed, rsync will re-transfer the file >f..t......
In example, if you copy data from one filesystem to another with a standard cp -r command, it will not preserve the modtimes. Hence when an rsync runs against the new location, it will trigger a transfer of the file again.
To avoid this, you can use --size-only to ensure rsync only considers the size of the file and NOT the modification time when considering if it should transfer. Rsync will still update the modtime on the destination though. This should only be used for certain circumstances so please consider your use case.
Note: rsync will still update the modtime on the destination files
.f..t......! To avoid this, use--no-times!!
In the future, consider using cp -a or a simple rsync -aHAX to transfer from one local filesystem to another.
Assuming you backups on the host itself, which its managing/trimming, etc..
Everything from the above but do the following:
- Leave out
--ignore-missing-args - Leave out
-u(update), see below - Consider leaving out the chmod, permissions don't really matter.
- Include
--delete-delayor at least-delete(tickbox) - depends on where trimming is being done!