mirror of https://github.com/digint/btrbk
btrbk: add "prune" command
parent
2809dc54c5
commit
5bdc3e527b
|
@ -6,6 +6,7 @@ btrbk-current
|
|||
* Add "resume" command, replacement for "-r, --resume-only" command
|
||||
line option (which is now deprecated).
|
||||
* Add "snapshot" command (close #150).
|
||||
* Add "prune" command.
|
||||
* Add "--preserve-snapshots" and "--preserve-backups" options.
|
||||
* Change raw backup format (sidecar file instead of uuid in file).
|
||||
* Honor target_preserve for raw targets (delete raw targets).
|
||||
|
|
8
btrbk
8
btrbk
|
@ -315,6 +315,7 @@ sub HELP_MESSAGE
|
|||
print STDERR " dryrun don't run btrfs commands; show what would be executed\n";
|
||||
print STDERR " snapshot run snapshot operations only\n";
|
||||
print STDERR " resume run backup operations, and delete snapshots\n";
|
||||
print STDERR " prune only delete snapshots and backups\n";
|
||||
print STDERR " stats print snapshot/backup statistics\n";
|
||||
print STDERR " list <subcommand> available subcommands are:\n";
|
||||
print STDERR " backups all backups and corresponding snapshots\n";
|
||||
|
@ -4226,6 +4227,13 @@ MAIN:
|
|||
$args_allow_group = 1;
|
||||
@filter_args = @ARGV;
|
||||
}
|
||||
elsif($command eq "prune") {
|
||||
$action_run = 1;
|
||||
$skip_snapshots = 1;
|
||||
$skip_backups = 1;
|
||||
$args_allow_group = 1;
|
||||
@filter_args = @ARGV;
|
||||
}
|
||||
elsif ($command eq "clean") {
|
||||
$action_clean = 1;
|
||||
@filter_args = @ARGV;
|
||||
|
|
11
doc/btrbk.1
11
doc/btrbk.1
|
@ -223,6 +223,17 @@ retention policy. Use in conjunction with \-p, \-\-preserve,
|
|||
backup and/or snapshot deletion (steps 3, 4).
|
||||
.RE
|
||||
.PP
|
||||
.B prune
|
||||
[filter...]
|
||||
.RS 4
|
||||
Prune snapshots and backups: skips snapshot and backup creation (steps
|
||||
1, 2), only deletes snapshots and backups in order to satisfy their
|
||||
configured retention policy. Useful for cleaning the disk after
|
||||
changing the retention policy. Use in conjunction with
|
||||
\-\-preserve\-backups, \-\-preserve\-snapshots if you want to skip
|
||||
backup or snapshot deletion (steps 3, 4).
|
||||
.RE
|
||||
.PP
|
||||
.B archive
|
||||
<source> <target>
|
||||
.I *experimental*
|
||||
|
|
Loading…
Reference in New Issue