s4cmd
s4cmd copied to clipboard
Do not throw exception if file exists
Version from pip3 - 2.1.0 - crashes when a file already exists in the bucket:
(s4cmd) $ s4cmd put bla.zip s3://bla/bla/
[Runtime Failure] File already exists: s3://bla/bla/bla.zip
Exception in thread Thread-1:ead(s)]
Traceback (most recent call last):
[Thread Failure] File already exists: s3://bla/bla/bla.zip
I wonder if an exception is unavoidable or if s3 can return an error to evaluate. I also think the exception needs to be caught and treated.
@ralphholz did you find any work arounds for this?
Found the workaround...
For those who stumble on this issue, the workaround is to use the --force flag when performing put operation, this flag makes sure that the command succeeds even if the file already exists
https://github.com/bloomreach/s4cmd#s4cmd-put-source-target