Removing Restic Backup Snapshots

Each restic backup by default is stored on your object storage container for 90 days.

To remove previous snapshots, only two commands are required to be ran, “forget” and “prune” the details of how to do so are below –

As with any interaction with Restic, you must first initialize the repo to perform actions within restic, to do so follow this guide.

Using the above example, there are 2 backups, to remove a snapshot you simply need to know the ID of the snapshot, which is the first item in the available snapshots above.

In this example, we will be removing the second snapshot, which has the ID of b923eed6

Next, you will need to run restic prune, this removes the data referenced in the snapshot that was removed from the restic repository, cleaning up unreferenced data.

An example of this can be seen below –

It is advised to run restic check after you prune, to ensure you are aware if there are any internal data structures of the repository damaged.

The command being ran, and its output would be similar of that below –

Now, when you view your backup’s snapshots, the entry you have removed will no longer be listed.




Leave a Reply