Cleanup older than X days

Hi,

Is there a way to have rclone cleanup remove versions of a file that are older than X days? Meaning, I want to keep the current version no matter what, but older versions should be removed up to a threshold.

Specifically, I want this for B2. I saw Best way to delete backups older than x days on remote but it doesn’t seem to answer my question.

Thanks,
Gili

Have you seen the b2 lifecycle rules? I think that is probably exactly what you want.

Thanks for the response. Is this safe for encrypted volumes? In order words, is there a one-to-one correspondence between encrypted and decrypted filenames, and will multiple versions of a file retain the same encrypted filename?

Thanks,
Gili

This should work fine for encrypted volumes. There is a 1:1 correspondence between encrypted and decrypted file names, and multiple versions retain the same name.

1 Like