From 0773a384dd360f8d8d425ae7052b3346904f1840 Mon Sep 17 00:00:00 2001 From: Fuxino Date: Sun, 8 Nov 2026 14:35:59 +0100 Subject: [PATCH] Fix stale man page options and sample config comments --- man/simple_backup.1 | 67 ++++++++++++++++++-------------- simple_backup/simple_backup.conf | 5 ++- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/man/simple_backup.1 b/man/simple_backup.1 index c2f2fec..09a6085 100644 --- a/man/simple_backup.1 +++ b/man/simple_backup.1 @@ -2,30 +2,33 @@ .SH NAME simple_backup \- Backup files and folders using rsync .SH SYNOPSIS -.B simple_backup -\-h, \-\-help -.PD 0 -.P -.PD -.B simple_backup -[\-c, \-\-config FILE] -[\-i, \-\-input INPUT [INPUT...]] -[\-o, \-\-output DIR] -.PD 0 -.P -.PD -.RS 14 [\-e, \-\-exclude FILE|DIR|PATTERN [FILE|...]] -[\-k, \-\-keep N] -[\-\-ssh\-host HOSTNAME] -[\-\-ssh\-user USERNAME] -[\-\-keyfile FILE] -.PD 0 -.P -.PD -[\-s, \-\-checksum] -[\-z, \-\-compress] +.SY simple_backup +\-h,\~\-\-help +.YS +.SY simple_backup +\-\-last\-backup +[\-u,\~\-\-user\~USERNAME] +.YS +.SY simple_backup +[\-v,\~\-\-verbose] +[\-c,\~\-\-config\~FILE] +[\-i,\~\-\-inputs\~INPUT\~[INPUT...]] +[\-o,\~\-\-output\~DIR] +[\-e,\~\-\-exclude\~FILE|DIR|PATTERN\~[FILE|...]] +[\-k,\~\-\-keep\~N] +[\-u,\~\-\-user\~USERNAME] +[\-\-ssh\-host\~HOSTNAME] +[\-\-ssh\-user\~USERNAME] +[\-\-keyfile\~FILE] +[\-\-remote\-sudo] +[\-\-numeric\-ids] +[\-s,\~\-\-checksum] +[\-z,\~\-\-compress] +[\-\-rsync\-options\~OPTION\~[OPTION...]] [\-\-remove\-before\-backup] -.RE +[\-\-no\-syslog] +[\-\-no\-progress] +.YS .SH DESCRIPTION .B simple_backup is a python script for performing backup of files and folders. @@ -36,15 +39,20 @@ in a configuration file (default location $HOME/.config/simple_backup/simple_bac or directly on the command line. .P Parameters specified on the command line will override those in the configuration file. +The exceptions are remote_sudo and numeric_ids: if enabled in the configuration file, they +can\(aqt be disabled on the command line. .SH OPTIONS .TP .B \-h, \-\-help Print a short help message and exit. .TP +.B \-v, \-\-verbose +More verbose output. +.TP .B \-c, \-\-config FILE Specify the configuration file, useful to specify a different one from the default. .TP -.B \-i, \-\-input INPUT [INPUT...] +.B \-i, \-\-inputs INPUT [INPUT...] Specify the files and directories to backup. Multiple inputs can be specified, just separate them with a space. If filenames or paths contain spaces, don't forget to escape them, or to use single or double quotes around them. @@ -64,7 +72,7 @@ not preserved either. .TP .B \-e, \-\-exclude FILE|DIR|PATTERN [FILE|...]] Specify files, directories or patterns to exclude from the backup. Matching files and directories -will not be copied. Multiple elements can be specified, in the same way as for the \-\-input option. +will not be copied. Multiple elements can be specified, in the same way as for the \-\-inputs option. .TP .B \-k, \-\-keep N Specify how many old backups (so excluding the current one) will be kept. The default behavior @@ -84,15 +92,15 @@ Hostname of the server where to copy the files in case of remote backup through Username for connecting to the server in case of remote backup. .TP .B \-\-keyfile FILE -Location of the SSH key for server authentication. +Location of the SSH key for server authentication. .TP -.B \-s, \-\-checksums +.B \-s, \-\-checksum Same as rsync option \(aq\-\-checksum\(aq, use checksums instead of mod\-time and size to skip files. .TP .B \-z, \-\-compress Compress data during transfer (rsync \(aq\-\-compress\(aq option). Useful for remote backup -if saving bandwith is needed. +if saving bandwidth is needed. .TP .B \-\-remove\-before\-backup Remove old backups (if necessary) before creating the new backup. Useful to free some space @@ -148,7 +156,8 @@ needs to be allowed to run without password in the same way. Use rsync \-\-numeric\-ids option. This causes rsync to use numeric uid/gid instead of trying to map uid/gid names from the local machine to the server. .TP .B \-\-last\-backup -Print the date and directory of the last successful backup, then exit. The exit status is 0, or 1 +Print the date of the last successful backup and how long ago it was made (for example +\(aqLast backup: 2026\-10\-25 14:03 (2 days ago)\(aq), then exit. The exit status is 0, or 1 if no backup has been recorded yet or the state file can\(aqt be read (see .BR FILES ). .SH CONFIGURATION diff --git a/simple_backup/simple_backup.conf b/simple_backup/simple_backup.conf index 1cd91b0..1d10b7d 100644 --- a/simple_backup/simple_backup.conf +++ b/simple_backup/simple_backup.conf @@ -1,7 +1,7 @@ # Example config file for simple_backup [backup] -# Files and directories to backup. Multiple items can be separated using a comma (','). It is possible to use wildcards (i.e. '*' to match multiple characters and '~' for the user's home directory). +# Files and directories to backup. Multiple items can be separated using a comma (','). It is possible to use wildcards (e.g. '*' to match multiple characters) and '~' for the user's home directory. inputs=/home/user # Output directory. For remote backups, this is a path on the server ('~' and relative paths refer to the home directory on the server). @@ -13,7 +13,8 @@ exclude=*.bak # Number of old backups (i.e. excluding the one that's being created) to keep (use -1 to keep all) keep=-1 -# Uncomment the following section to enable backup to remote server through ssh +# Uncomment the following section to enable backup to remote server through ssh. +# ssh_host can be an alias from ~/.ssh/config (its HostName, Port and IdentityFile are used) # [server] # ssh_host= # ssh_user=