![Forrest logo](/images/logo.png)
restic:tldr:d1f1d
The command restic forget --keep-last 1 --prune
is used in the restic
backup tool to manage backups and clean up unnecessary data.
Here is a breakdown of the command and its options:
-
restic
: It is the command-line tool used to interact with therestic
backup system. -
forget
: It is a command withinrestic
used to control the retention of backups. It allows you to specify rules for keeping or forgetting backups. -
--keep-last 1
: This option specifies that only the most recent backup should be kept. In other words,restic
will remove all but the latest backup, regardless of other rules. -
--prune
: This option tellsrestic
to perform a cleanup operation after forgetting backups. Theprune
command removes data that is no longer referenced by any backup. It helps to reclaim disk space by permanently deleting unreferenced data.
To summarize, the restic forget --keep-last 1 --prune
command is used to forget all backups except the latest one and then clean up any unreferenced data to optimize disk space usage.