mirror of
https://github.com/octoleo/restic.git
synced 2025-01-14 11:13:09 +00:00
s3 migrate layout: Force old layout for rename
This commit is contained in:
parent
28a4a35625
commit
c54c632ca1
@ -54,11 +54,18 @@ func (m *S3Layout) Apply(ctx context.Context, repo restic.Repository) error {
|
|||||||
return errors.New("backend is not s3")
|
return errors.New("backend is not s3")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
oldLayout := &backend.S3LegacyLayout{
|
||||||
|
Path: be.Path(),
|
||||||
|
Join: path.Join,
|
||||||
|
}
|
||||||
|
|
||||||
newLayout := &backend.DefaultLayout{
|
newLayout := &backend.DefaultLayout{
|
||||||
Path: be.Path(),
|
Path: be.Path(),
|
||||||
Join: path.Join,
|
Join: path.Join,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
be.Layout = oldLayout
|
||||||
|
|
||||||
for _, t := range []restic.FileType{
|
for _, t := range []restic.FileType{
|
||||||
restic.KeyFile,
|
restic.KeyFile,
|
||||||
restic.SnapshotFile,
|
restic.SnapshotFile,
|
||||||
|
Loading…
Reference in New Issue
Block a user