mirror of
https://github.com/octoleo/restic.git
synced 2024-11-02 11:46:36 +00:00
s3 migrate layout: Ignore already renamed files
This commit is contained in:
parent
2bcd3a3acc
commit
993e370f92
@ -462,6 +462,11 @@ func (be *Backend) Rename(h restic.Handle, l backend.Layout) error {
|
|||||||
|
|
||||||
coreClient := minio.Core{Client: be.client}
|
coreClient := minio.Core{Client: be.client}
|
||||||
err := coreClient.CopyObject(be.cfg.Bucket, newname, path.Join(be.cfg.Bucket, oldname), minio.CopyConditions{})
|
err := coreClient.CopyObject(be.cfg.Bucket, newname, path.Join(be.cfg.Bucket, oldname), minio.CopyConditions{})
|
||||||
|
if err != nil && be.IsNotExist(err) {
|
||||||
|
debug.Log("copy failed: %v, seems to already have been renamed", err)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
debug.Log("copy failed: %v", err)
|
debug.Log("copy failed: %v", err)
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user