Closed ximon18 closed 4 years ago
rfc8181_repo
is the directory name mentioned in the Krill v0.5.0 source code, so presumably in this case it simply didn't yet get created by Krill and we should not fail if it does not exist?
Testing s3cmd sync
with non-existing source directories indeed fails with:
# s3cmd sync -r --skip-existing /tmp/s2 s3://some-bucket/deleteme/
ERROR: Parameter problem: Invalid source: '/tmp/s2' is not an existing file or directory
One workaround is to use regular expression includes, e.g.:
Source directory missing:
# s3cmd sync -r --skip-existing --rexclude '.+' --rinclude '^s2/.+' /tmp/ s3://bucket-name/deleteme/
Source directory present but empty:
# mkdir /tmp/s2
# s3cmd sync -r --skip-existing --rexclude '.+' --rinclude '^s2/.+' /tmp/ s3://bucket-name/deleteme/
Source directory present and contains a file:
# echo blah > /tmp/s2/blah.txt
# s3cmd sync -r --skip-existing --rexclude '.+' --rinclude '^s2/.+' /tmp/ s3://bucket-name/deleteme/
upload: '/tmp/s2/blah.txt' -> 's3://bucket-name/deleteme/s2/blah.txt' [1 of 1]
5 of 5 100% in 0s 155.33 B/s done
Done. Uploaded 5 bytes in 1.0 seconds, 5.00 B/s.
Destination verification:
# s3cmd ls -r s3://bucket-name/deleteme/
2020-04-20 11:53 5 s3://bucket-name/deleteme/s2/blah.txt
Testing was successful:
With:
Why did it fail, and what is the right way to being to this the attention if the administrator? Detect the error with FluentD and send an email/other notification? Expose Prometheus metrics for Krill manager including rfc trail upload error stats?