mirror of https://github.com/digint/btrbk
btrbk: cosmetics: print (fix) reason why snapshots/backups are skipped/preserved
parent
9ae823a757
commit
09918bf5af
30
btrbk
30
btrbk
|
@ -4376,9 +4376,9 @@ MAIN:
|
||||||
'version' => sub { VERSION_MESSAGE(); exit 0; },
|
'version' => sub { VERSION_MESSAGE(); exit 0; },
|
||||||
'config|c=s' => \$config_cmdline,
|
'config|c=s' => \$config_cmdline,
|
||||||
'dry-run|n' => \$dryrun,
|
'dry-run|n' => \$dryrun,
|
||||||
'preserve|p' => sub { $preserve_snapshots = 1, $preserve_backups = 1 },
|
'preserve|p' => sub { $preserve_snapshots = "preserve", $preserve_backups = "preserve" },
|
||||||
'preserve-snapshots' => \$preserve_snapshots,
|
'preserve-snapshots' => sub { $preserve_snapshots = "preserve-snapshots" },
|
||||||
'preserve-backups' => \$preserve_backups,
|
'preserve-backups' => sub { $preserve_backups = "preserve-backups" },
|
||||||
'wipe' => \$wipe_snapshots,
|
'wipe' => \$wipe_snapshots,
|
||||||
'resume-only|r' => \$resume_only_DEPRECATED,
|
'resume-only|r' => \$resume_only_DEPRECATED,
|
||||||
'quiet|q' => \$quiet,
|
'quiet|q' => \$quiet,
|
||||||
|
@ -4416,9 +4416,9 @@ MAIN:
|
||||||
# DEPRECATED options
|
# DEPRECATED options
|
||||||
if($resume_only_DEPRECATED) {
|
if($resume_only_DEPRECATED) {
|
||||||
WARN "Found deprecated command line option \"-r, --resume-only\": Use \"btrbk resume --preserve\"";
|
WARN "Found deprecated command line option \"-r, --resume-only\": Use \"btrbk resume --preserve\"";
|
||||||
$skip_snapshots = 1;
|
$skip_snapshots = "resume-only";
|
||||||
$preserve_backups = 1;
|
$preserve_backups = "resume-only";
|
||||||
$preserve_snapshots = 1;
|
$preserve_snapshots = "resume-only";
|
||||||
}
|
}
|
||||||
|
|
||||||
# check command line options
|
# check command line options
|
||||||
|
@ -4439,21 +4439,21 @@ MAIN:
|
||||||
}
|
}
|
||||||
elsif($command eq "snapshot") {
|
elsif($command eq "snapshot") {
|
||||||
$action_run = 1;
|
$action_run = 1;
|
||||||
$skip_backups = 1;
|
$skip_backups = "snapshot";
|
||||||
$preserve_backups = 1;
|
$preserve_backups = "snapshot";
|
||||||
$args_allow_group = 1;
|
$args_allow_group = 1;
|
||||||
@filter_args = @ARGV;
|
@filter_args = @ARGV;
|
||||||
}
|
}
|
||||||
elsif($command eq "resume") {
|
elsif($command eq "resume") {
|
||||||
$action_run = 1;
|
$action_run = 1;
|
||||||
$skip_snapshots = 1;
|
$skip_snapshots = "resume";
|
||||||
$args_allow_group = 1;
|
$args_allow_group = 1;
|
||||||
@filter_args = @ARGV;
|
@filter_args = @ARGV;
|
||||||
}
|
}
|
||||||
elsif($command eq "prune") {
|
elsif($command eq "prune") {
|
||||||
$action_run = 1;
|
$action_run = 1;
|
||||||
$skip_snapshots = 1;
|
$skip_snapshots = "prune";
|
||||||
$skip_backups = 1;
|
$skip_backups = "prune";
|
||||||
$args_allow_group = 1;
|
$args_allow_group = 1;
|
||||||
@filter_args = @ARGV;
|
@filter_args = @ARGV;
|
||||||
}
|
}
|
||||||
|
@ -6085,10 +6085,10 @@ MAIN:
|
||||||
}
|
}
|
||||||
|
|
||||||
my @cmdline_options;
|
my @cmdline_options;
|
||||||
push @cmdline_options, "btrbk resume: No snapshots created" if($skip_snapshots);
|
push @cmdline_options, "$skip_snapshots: No snapshots created" if($skip_snapshots);
|
||||||
push @cmdline_options, "btrbk snapshot: No backups created" if($skip_backups);
|
push @cmdline_options, "$skip_backups: No backups created" if($skip_backups);
|
||||||
push @cmdline_options, "preserve-snapshots: Preserved all snapshots" if($preserve_snapshots);
|
push @cmdline_options, "$preserve_snapshots: Preserved all snapshots" if($preserve_snapshots);
|
||||||
push @cmdline_options, "preserve-backups: Preserved all backups" if($preserve_backups);
|
push @cmdline_options, "$preserve_backups: Preserved all backups" if($preserve_backups);
|
||||||
|
|
||||||
print_header(title => "Backup Summary",
|
print_header(title => "Backup Summary",
|
||||||
config => $config,
|
config => $config,
|
||||||
|
|
Loading…
Reference in New Issue