mirror of https://github.com/digint/btrbk
btrbk: add "-n, --dry-run" option
parent
3624a8fba0
commit
9718ad1460
|
@ -4,6 +4,7 @@ btrbk-current
|
||||||
* Bugfix: fix sprintf used by config option "timestamp_format long"
|
* Bugfix: fix sprintf used by config option "timestamp_format long"
|
||||||
when using perl-5.22.0 (close: #57).
|
when using perl-5.22.0 (close: #57).
|
||||||
* Added "clean" command (close: #61).
|
* Added "clean" command (close: #61).
|
||||||
|
* Added "-n, --dry-run" option.
|
||||||
|
|
||||||
btrbk-0.21.0
|
btrbk-0.21.0
|
||||||
|
|
||||||
|
|
2
btrbk
2
btrbk
|
@ -205,6 +205,7 @@ sub HELP_MESSAGE
|
||||||
print STDERR " -h, --help display this help message\n";
|
print STDERR " -h, --help display this help message\n";
|
||||||
print STDERR " --version display version information\n";
|
print STDERR " --version display version information\n";
|
||||||
print STDERR " -c, --config=FILE specify configuration file\n";
|
print STDERR " -c, --config=FILE specify configuration file\n";
|
||||||
|
print STDERR " -n, --dry-run perform a trial run with no changes made\n";
|
||||||
print STDERR " -p, --preserve preserve all backups (do not delete any old targets)\n";
|
print STDERR " -p, --preserve preserve all backups (do not delete any old targets)\n";
|
||||||
print STDERR " -r, --resume-only resume only (do not create new snapshots, only resume\n";
|
print STDERR " -r, --resume-only resume only (do not create new snapshots, only resume\n";
|
||||||
print STDERR " missing backups)\n";
|
print STDERR " missing backups)\n";
|
||||||
|
@ -2137,6 +2138,7 @@ MAIN:
|
||||||
'help|h' => sub { VERSION_MESSAGE(); HELP_MESSAGE(0); exit 0; },
|
'help|h' => sub { VERSION_MESSAGE(); HELP_MESSAGE(0); exit 0; },
|
||||||
'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,
|
||||||
'preserve|p' => \$preserve_backups,
|
'preserve|p' => \$preserve_backups,
|
||||||
'resume-only|r' => \$resume_only,
|
'resume-only|r' => \$resume_only,
|
||||||
'quiet|q' => \$quiet,
|
'quiet|q' => \$quiet,
|
||||||
|
|
18
doc/btrbk.1
18
doc/btrbk.1
|
@ -8,7 +8,7 @@ btrbk \- backup tool for btrfs volumes
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
\fBbtrbk\fR [\-h|\-\-help] [\-\-version] [\-c|\-\-config <file>]
|
\fBbtrbk\fR [\-h|\-\-help] [\-\-version] [\-c|\-\-config <file>]
|
||||||
[\-p|\-\-preserve] [\-r|\-\-resume\-only]
|
[\-n|\-\-dry\-run] [\-p|\-\-preserve] [\-r|\-\-resume\-only]
|
||||||
[\-v|\-\-verbose] [\-q|\-\-quiet] [\-l|\-\-loglevel <level>]
|
[\-v|\-\-verbose] [\-q|\-\-quiet] [\-l|\-\-loglevel <level>]
|
||||||
[\-t|\-\-table] [\-\-format <output\-format>]
|
[\-t|\-\-table] [\-\-format <output\-format>]
|
||||||
[\-\-progress]
|
[\-\-progress]
|
||||||
|
@ -46,6 +46,14 @@ Prints the synopsis and a list of the commands.
|
||||||
Prints the btrbk version.
|
Prints the btrbk version.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-n, \-\-dry\-run
|
||||||
|
.RS 4
|
||||||
|
Don't run anything that would alter the filesystem, just show the
|
||||||
|
snapshots and backup subvolumes that would be created/deleted by the
|
||||||
|
\fBrun\fR and \fBclean\fR commands. Use in conjunction with \fI\-l
|
||||||
|
debug\fR to see the btrfs commands that would be executed.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-c, \-\-config <file>
|
\-c, \-\-config <file>
|
||||||
.RS 4
|
.RS 4
|
||||||
Read the configuration from <file>.
|
Read the configuration from <file>.
|
||||||
|
@ -138,10 +146,10 @@ different output formats.
|
||||||
.B dryrun
|
.B dryrun
|
||||||
[filter...]
|
[filter...]
|
||||||
.RS 4
|
.RS 4
|
||||||
Don't run btrfs commands, just show the snapshots and backup
|
Don't run any btrfs commands that would alter the filesystem, just
|
||||||
subvolumes that would be created/deleted by the \fBrun\fR command. Use
|
show the snapshots and backup subvolumes that would be created/deleted
|
||||||
in conjunction with \fI\-l debug\fR to see the btrfs commands that
|
by the \fBrun\fR command. Use in conjunction with \fI\-l debug\fR to
|
||||||
would be executed.
|
see the btrfs commands that would be executed.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.B list
|
.B list
|
||||||
|
|
Loading…
Reference in New Issue