In my scenario, I use rsync
to backup some files over network and from USB drives to a folder. Then use aws s3 mv
to send it to cloud storage in a continous loop; when it finishes, it look again for new files on this folder.
I'm thinking about making this process "safe". When rsync
is copying a file to folder I don't want aws s3 mv
to store a partial file, but if that file is complete, no problem, even if the whole folder are not in sync.
I couldn't find rsync partial file naming rules. Seems something like name.extension.randomcode
. I'm wondering to use aws s3 mv
with --exclude=*.part
, but rsync doesn't use a simple name like this.
How is the rsync partial file naming rule? Any other suggestions to filter?
mktemp(3)
, see that manual page for naming scheme.