I'm attempting to use aws s3 sync
to push a bunch of backup files from my Windows server to an s3 bucket. The problem that I'm running into is that it appears to be picking up the Recycle Bin and System Volume Information. Unfortunately, it's unable to traverse into those directories and so ultimately the command exits with a non-zero status.
Here's what I'm trying as my command line:
aws s3 sync X:\Backup\ s3://«my bucket name» --exclude '*\$RECYCLE.BIN\*' --exclude "System Volume Information\*" --exclude '*.trn' --include '*.bak'
I've tried several variations of the --exclude
parameter but to no avail.
Assuming you have dropped to a DOS shell to run that command, single quotes are not recognized as parameter wrappers. Using double quotes worked for me.