From 05cbdc409dd5e4ef1c1d32dcaf15c6baa77e865d Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 24 Oct 2016 14:30:55 +0200 Subject: [PATCH] Unify and enhance usage information and script descriptions --- README.md | 19 +++++++++++++++---- bin/backup-audit | 8 +++++++- bin/backup-script | 4 ++-- bin/backup-status | 12 +++++++----- 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ef3ee97..f1c1e6b 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,19 @@ Usage: `backup-script-wrapper []` Show information about backups. -Usage: `backup-status [-q] [ [ [...]]]` +Usage: + +- `backup-status [--errors|--latest] [--quick] [ [ [...]]]` +- `backup-status --running` Options: -- `-q`: *quick mode*, don't calculate backup sizes. +- `-e`, `--errors`: only show current backups with errors (implies `--latest`). +- `-l`, `--latest`: only show latest backup generations. +- `-q`, `--quick`: *quick mode*, don't calculate backup sizes. +- `-r`, `--running`: check if an `backup-script` task is currently running. + +When no *job* is given, all defined jobs are listed. ### backup-audit @@ -46,8 +54,11 @@ Usage: `backup-audit [-q] [-v] [ [ [...]]]` Options: -- `-q`: *quiet mode*, don't show jobs without "relevant" changes. -- `-v`: *verbose mode*, show all checks that are run. +- `-d`, `--dirs`: compare two backup directories (not jobs). +- `-q`, `--quiet`: *quite mode*, only list jobs with changes or errors. +- `-v`, `--verbose`: *verbose mode*, show all checks that are run. + +When no *job* is given, all defined jobs are checked. ## Configuration diff --git a/bin/backup-audit b/bin/backup-audit index 6785adc..4f33586 100755 --- a/bin/backup-audit +++ b/bin/backup-audit @@ -42,9 +42,15 @@ for conf in \ done Usage() { - echo "Usage: $NAME [-q|--quiet] [-v|--verbose] [ [ [...]]]" + echo "Usage: $NAME [-q|--quiet] [-v|--verbose] [ [ [...]]]" echo " $NAME <-d|--dirs> " echo + echo " -d, --dirs Compare two backup directories (not jobs)." + echo " -q, --quiet Quite mode, only list jobs with changes or errors." + echo " -v, --verbose Verbose mode, show all checks that are run." + echo + echo "When no is given, all defined jobs are checked." + echo exit 2 } diff --git a/bin/backup-script b/bin/backup-script index 70173f0..9530410 100755 --- a/bin/backup-script +++ b/bin/backup-script @@ -54,14 +54,14 @@ default_job_post_exec="" default_tags="" Usage() { - echo "Usage: $NAME [] [ [ [...]]]" + echo "Usage: $NAME [] [ [ [...]]]" echo echo " -n, --dry-run Test run only, don't copy any data." echo " -p, --progress Show progress, see rsync(1)." echo " -t TAG, --tag TAG Only run jobs with tag TAG." echo " -x, --no-exec Don't run global pre-/post-exec commands." echo - echo "When no is given, all defined systems are used." + echo "When no is given, all defined systems are used." echo # shellcheck disable=SC2086 echo -e $config_info diff --git a/bin/backup-status b/bin/backup-status index a871c96..1ed1b71 100755 --- a/bin/backup-status +++ b/bin/backup-status @@ -43,13 +43,15 @@ for conf in \ done Usage() { - echo "Usage: $NAME [--errors|--latest] [--quick] [ [ [...]]]" + echo "Usage: $NAME [--errors|--latest] [--quick] [ [ [...]]]" echo " $NAME --running" echo - echo " --errors, -e Only show current backups with errors (implies \"--latest\")." - echo " --latest, -l Only show latest backup generations." - echo " --quick, -q Don't calculate backup sizes." - echo " --running, -r Check if an \"backup-script\" task is currently running." + echo " -e, --errors Only show current backups with errors (implies \"--latest\")." + echo " -l, --latest Only show latest backup generations." + echo " -q, --quick Don't calculate backup sizes." + echo " -r, --running Check if an \"backup-script\" task is currently running." + echo + echo "When no is given, all defined jobs are listed." echo exit 2 } -- 2.39.2