From c54c632ca10af309488fff18f176830fc0051a55 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 2 Jul 2017 10:47:03 +0200 Subject: [PATCH] s3 migrate layout: Force old layout for rename --- src/restic/migrations/s3_layout.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/restic/migrations/s3_layout.go b/src/restic/migrations/s3_layout.go index 75a83b885..c70df3218 100644 --- a/src/restic/migrations/s3_layout.go +++ b/src/restic/migrations/s3_layout.go @@ -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,