2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-07 03:20:49 +00:00

s3 migrate layout: Force old layout for rename

This commit is contained in:
Alexander Neumann 2017-07-02 10:47:03 +02:00
parent 28a4a35625
commit c54c632ca1

View File

@ -54,11 +54,18 @@ func (m *S3Layout) Apply(ctx context.Context, repo restic.Repository) error {
return errors.New("backend is not s3")
}
oldLayout := &backend.S3LegacyLayout{
Path: be.Path(),
Join: path.Join,
}
newLayout := &backend.DefaultLayout{
Path: be.Path(),
Join: path.Join,
}
be.Layout = oldLayout
for _, t := range []restic.FileType{
restic.KeyFile,
restic.SnapshotFile,