Skip to content

Commit

Permalink
Update recover_no_free_space_error.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome authored Sep 7, 2023
1 parent 3bd72b7 commit 2045b94
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions src/commands/forget/recover_no_free_space_error.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,15 @@ such a way that a repository remains usable no matter at which point the command
is interrupted. However, this also means that `prune` requires some scratch
space to work.

In most cases it is sufficient to instruct `prune` to use as little scratch
space as possible by running it as `prune --max-repack-size 0`. Note that for
rustic versions before 0.13.0 `prune --max-repack-size 1` must be used.
In most cases it is sufficient to instruct `prune` to remove all packs marked for
removal and use as little scratch space as possible.
Note that packs marked for removal are automatically removed by a prune run once
they are old enough. If you can guarantee that the repository is not used by parallel
processes, you can also use `rustic prune --instant-delete`.

To use as little scratch space as possibe, run `rustic prune --max-repack-size 0`.
This removes all unneeded packs without repacking partly used packs.
Obviously, this can only work if several snapshots have been removed using
`forget` before. This then allows the `prune` command to actually remove data
from the repository. If the command succeeds, but there is still little free
space, then remove a few more snapshots and run `prune` again.

If `prune` fails to complete, then
`prune --unsafe-recover-no-free-space SOME-ID` is available as a method of last
resort. It allows prune to work with little to no free space. However, a
**failed** `prune` run can cause the repository to become **temporarily
unusable**. Therefore, make sure that you have a stable connection to the
repository storage, before running this command. In case the command fails, it
may become necessary to manually remove all files from the `index/` folder of
the repository and run `rebuild-index` afterwards.

To prevent accidental usages of the `--unsafe-recover-no-free-space` option it
is necessary to first run `prune --unsafe-recover-no-free-space SOME-ID` and
then replace `SOME-ID` with the requested ID.

0 comments on commit 2045b94

Please sign in to comment.