Restic to GCP with bucket retention?

Hi,

I’d like to create and maintain a restic repo in GCP where the bucket has a 365 days retention period.

I started some experiments and now I question if it’s even possible.

Here’s what I’ve done so far:

restic init -r gs:... -p ... --no-lock
restic backup -r gs:... -p ... --files-from <file with list of smaller directories> --no-lock

So far so good, however, when I add a larger directory with many small files, I get a context canceled after around 15 minutes and although I chose –no-lock I have many-many lock files in the bucket now.

Does anyone know how to solve it?

Using restic alongside another system’s retention policy may cause conflicts. For example, if the other system deletes older restic backup files when its retention policy runs, it can corrupt the repository. It’s better to let restic manage data retention itself, using restic forget with retention policies and prune to remove unused data.

Ref: