Upgrade restic from 0.13.1 to latest

Hello Restic Community,

We are currently using Restic version 0.13.1 and have approximately 10TB backup data. Since Restic 0.14.0 introduced compression support, we initially held off on upgrading due to concerns about backward compatibility.

However, due to some recent challenges we’re facing, we now need to upgrade to a newer version. We would appreciate clarification on the following points before proceeding:

  • Is it recommended to upgrade to the latest Restic version even if we don’t migrate our v1 repositories?
  • Are there any specific best practices or recommendations for upgrading Restic? (We currently use the backup, restore, forget, and prune commands.)

Given the size of our repository, we are particularly concerned about ensuring data integrity and avoiding corruption during the upgrade process.

Thank you for your help!

The newest versions still perfectly work with uncompressed repositories. Just update the binary and use it.

3 Likes

I upgraded to repository version 2 with no problems at all. Compression has reduced the size of the repository. Can you perhaps take a backup of your v1 repository, somewhere like Amazon S3 glacier deep archive storage class, then do a repository upgrade?

1 Like

The upgrade process itself only replaces the config file to state “version: 2”. The actual upgrade happens incrementally during prune. Prune verifies all data before rewriting it thus it shouldn’t introduce data corruption. The repository format is also designed such that operations can be interrupted at arbitrary points in time without damaging the repository (the config file upgrade is an exception). It’s actually also possible to not upgrade the existing data files and only let restic compress new data files (this is the default behavior). The most immediate benefit is that the snapshot and index files will be a lot smaller than before.

Starting from restic 0.16.4 there are additional integrity checks that partially decode and verify a pack file before even trying to upload it.

2 Likes