Difference between revisions of "Restic for OpenWRT"

Wiki.TerraBase.info
Jump to navigation Jump to search
m
m
 
Line 5: Line 5:
restic forget WhatEverID -r WhatEverRepository
restic forget WhatEverID -r WhatEverRepository


This will remove most snapshots (not all but one, like it implies): restic -r "/mnt/sdb2/RESTIC/WRT3200ACM/" forget --keep-last 1<syntaxhighlight lang="text">
This will remove most snapshots (not all but one, like it implies): restic -r WhatEverRepository forget --keep-last 1<syntaxhighlight lang="text">
For safety reasons, restic refuses to act on an “empty” policy. For example, if one were to specify --keep-last 0 to forget all snapshots in the repository, restic will respond that no snapshots will be removed. To delete all snapshots, use --keep-last 1 and then finally remove the last snapshot ID manually (by passing the ID to forget).
For safety reasons, restic refuses to act on an “empty” policy. For example, if one were to specify --keep-last 0 to forget all snapshots in the repository, restic will respond that no snapshots will be removed. To delete all snapshots, use --keep-last 1 and then finally remove the last snapshot ID manually (by passing the ID to forget).
</syntaxhighlight>
</syntaxhighlight>
Then run this to reduce the repository size: restic prune -r WhatEverRepository
Then run this to reduce the repository size: restic prune -r WhatEverRepository
restic -r WhatEverRepository check (possibly with --no-cache option)
restic -r WhatEverRepository rebuild-index
For information about the repository: restic -r WhatEverRepository stats





Latest revision as of 15:08, 6 March 2021

The Restic Repository can get quite large. Two commands to reduce the size are;

...but first, make a backup of the full repository, just in case.

restic forget WhatEverID -r WhatEverRepository

This will remove most snapshots (not all but one, like it implies): restic -r WhatEverRepository forget --keep-last 1

For safety reasons, restic refuses to act on an “empty” policy. For example, if one were to specify --keep-last 0 to forget all snapshots in the repository, restic will respond that no snapshots will be removed. To delete all snapshots, use --keep-last 1 and then finally remove the last snapshot ID manually (by passing the ID to forget).

Then run this to reduce the repository size: restic prune -r WhatEverRepository

restic -r WhatEverRepository check (possibly with --no-cache option)

restic -r WhatEverRepository rebuild-index

For information about the repository: restic -r WhatEverRepository stats


If one gets the "repository is already locked" error message with a PID that doesn't exist, even after rebooting the router, then use this command: restic unlock -r WhatEverReposity

Apparently Retic will forever remember a lock. Even if it happened years ago.