diff --git a/ChangeLog b/ChangeLog index 859decf..d46e242 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ btrbk-current * Bugfix: fix sprintf used by config option "timestamp_format long" when using perl-5.22.0 (close: #57). * Added "clean" command (close: #61). + * Added "-n, --dry-run" option. btrbk-0.21.0 diff --git a/btrbk b/btrbk index d3618ce..1975783 100755 --- a/btrbk +++ b/btrbk @@ -205,6 +205,7 @@ sub HELP_MESSAGE print STDERR " -h, --help display this help message\n"; print STDERR " --version display version information\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 " -r, --resume-only resume only (do not create new snapshots, only resume\n"; print STDERR " missing backups)\n"; @@ -2137,6 +2138,7 @@ MAIN: 'help|h' => sub { VERSION_MESSAGE(); HELP_MESSAGE(0); exit 0; }, 'version' => sub { VERSION_MESSAGE(); exit 0; }, 'config|c=s' => \$config_cmdline, + 'dry-run|n' => \$dryrun, 'preserve|p' => \$preserve_backups, 'resume-only|r' => \$resume_only, 'quiet|q' => \$quiet, diff --git a/doc/btrbk.1 b/doc/btrbk.1 index 2103aac..3ef455c 100644 --- a/doc/btrbk.1 +++ b/doc/btrbk.1 @@ -8,7 +8,7 @@ btrbk \- backup tool for btrfs volumes .SH SYNOPSIS .nf \fBbtrbk\fR [\-h|\-\-help] [\-\-version] [\-c|\-\-config ] - [\-p|\-\-preserve] [\-r|\-\-resume\-only] + [\-n|\-\-dry\-run] [\-p|\-\-preserve] [\-r|\-\-resume\-only] [\-v|\-\-verbose] [\-q|\-\-quiet] [\-l|\-\-loglevel ] [\-t|\-\-table] [\-\-format ] [\-\-progress] @@ -46,6 +46,14 @@ Prints the synopsis and a list of the commands. Prints the btrbk version. .RE .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 .RS 4 Read the configuration from . @@ -138,10 +146,10 @@ different output formats. .B dryrun [filter...] .RS 4 -Don't run btrfs commands, just show the snapshots and backup -subvolumes that would be created/deleted by the \fBrun\fR command. Use -in conjunction with \fI\-l debug\fR to see the btrfs commands that -would be executed. +Don't run any btrfs commands that would alter the filesystem, just +show the snapshots and backup subvolumes that would be created/deleted +by the \fBrun\fR command. Use in conjunction with \fI\-l debug\fR to +see the btrfs commands that would be executed. .RE .PP .B list