[Borgbackup] Borg 1.1.6: The consequences of interrupting a 'borg prune' command

Thomas Waldmann tw at waldmann-edv.de
Tue Jul 31 13:28:01 EDT 2018


> What would happen if I did a 'Ctrl - C' command on a 'borg prune'?

It depends a bit on when you do that.

For all currently released borg versions 1.0.x and 1.1.x, prune (and all
other repo-writing commands) are 2 steps:

1. do things (e.g. delete archives accordings to pruning policy), commit.

2. compact segments (so space is freed when objects from non-compact
segment files are moved to new compact segment files), final commit.
additionally to the final commit, compact_segments will also do
intermediate commits frequently.

if you ctrl-c before first commit, it is like you did not run the
command. the next time you run borg, it will remove all uncommitted data.

if you ctrl-c before second final commit, prune will have already
deleted the archives, but has not yet freed all space.

> Can I resume the prune action later?

borg never really resumes.

but as it avoids doing same stuff twice (e.g. it does not store data
blocks it already has), it often feels like resuming.

so, you'ld just start prune again and it should work.

> Am I prevented from backing up my
> system until I resume it? What are the consequences in general?

It should work no matter what you do.

borg >= 1.2 will work a bit different:

compact segments will never be done implicitly, only when you call the
"borg compact" command. this can be done less frequently (as long as you
have space) and also it can be invoked from the repo server (does not
need a key).


-- 

GPG ID: 9F88FB52FAF7B393
GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393



More information about the Borgbackup mailing list