Fix stale man page options and sample config comments

This commit is contained in:
Fuxino
2026-11-08 14:35:59 +01:00
parent 4bce0edba5
commit 0773a384dd
2 changed files with 41 additions and 31 deletions
+38 -29
View File
@@ -2,30 +2,33 @@
.SH NAME .SH NAME
simple_backup \- Backup files and folders using rsync simple_backup \- Backup files and folders using rsync
.SH SYNOPSIS .SH SYNOPSIS
.B simple_backup .SY simple_backup
\-h, \-\-help \-h,\~\-\-help
.PD 0 .YS
.P .SY simple_backup
.PD \-\-last\-backup
.B simple_backup [\-u,\~\-\-user\~USERNAME]
[\-c, \-\-config FILE] .YS
[\-i, \-\-input INPUT [INPUT...]] .SY simple_backup
[\-o, \-\-output DIR] [\-v,\~\-\-verbose]
.PD 0 [\-c,\~\-\-config\~FILE]
.P [\-i,\~\-\-inputs\~INPUT\~[INPUT...]]
.PD [\-o,\~\-\-output\~DIR]
.RS 14 [\-e, \-\-exclude FILE|DIR|PATTERN [FILE|...]] [\-e,\~\-\-exclude\~FILE|DIR|PATTERN\~[FILE|...]]
[\-k, \-\-keep N] [\-k,\~\-\-keep\~N]
[\-\-ssh\-host HOSTNAME] [\-u,\~\-\-user\~USERNAME]
[\-\-ssh\-user USERNAME] [\-\-ssh\-host\~HOSTNAME]
[\-\-keyfile FILE] [\-\-ssh\-user\~USERNAME]
.PD 0 [\-\-keyfile\~FILE]
.P [\-\-remote\-sudo]
.PD [\-\-numeric\-ids]
[\-s, \-\-checksum] [\-s,\~\-\-checksum]
[\-z, \-\-compress] [\-z,\~\-\-compress]
[\-\-rsync\-options\~OPTION\~[OPTION...]]
[\-\-remove\-before\-backup] [\-\-remove\-before\-backup]
.RE [\-\-no\-syslog]
[\-\-no\-progress]
.YS
.SH DESCRIPTION .SH DESCRIPTION
.B simple_backup .B simple_backup
is a python script for performing backup of files and folders. 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. or directly on the command line.
.P .P
Parameters specified on the command line will override those in the configuration file. 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 .SH OPTIONS
.TP .TP
.B \-h, \-\-help .B \-h, \-\-help
Print a short help message and exit. Print a short help message and exit.
.TP .TP
.B \-v, \-\-verbose
More verbose output.
.TP
.B \-c, \-\-config FILE .B \-c, \-\-config FILE
Specify the configuration file, useful to specify a different one from the default. Specify the configuration file, useful to specify a different one from the default.
.TP .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 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, 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. or to use single or double quotes around them.
@@ -64,7 +72,7 @@ not preserved either.
.TP .TP
.B \-e, \-\-exclude FILE|DIR|PATTERN [FILE|...]] .B \-e, \-\-exclude FILE|DIR|PATTERN [FILE|...]]
Specify files, directories or patterns to exclude from the backup. Matching files and directories 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 .TP
.B \-k, \-\-keep N .B \-k, \-\-keep N
Specify how many old backups (so excluding the current one) will be kept. The default behavior 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. Username for connecting to the server in case of remote backup.
.TP .TP
.B \-\-keyfile FILE .B \-\-keyfile FILE
Location of the SSH key for server authentication. Location of the SSH key for server authentication.
.TP .TP
.B \-s, \-\-checksums .B \-s, \-\-checksum
Same as rsync option \(aq\-\-checksum\(aq, use checksums instead of mod\-time and size Same as rsync option \(aq\-\-checksum\(aq, use checksums instead of mod\-time and size
to skip files. to skip files.
.TP .TP
.B \-z, \-\-compress .B \-z, \-\-compress
Compress data during transfer (rsync \(aq\-\-compress\(aq option). Useful for remote backup Compress data during transfer (rsync \(aq\-\-compress\(aq option). Useful for remote backup
if saving bandwith is needed. if saving bandwidth is needed.
.TP .TP
.B \-\-remove\-before\-backup .B \-\-remove\-before\-backup
Remove old backups (if necessary) before creating the new backup. Useful to free some space 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. 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 .TP
.B \-\-last\-backup .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 if no backup has been recorded yet or the state file can\(aqt be read (see
.BR FILES ). .BR FILES ).
.SH CONFIGURATION .SH CONFIGURATION
+3 -2
View File
@@ -1,7 +1,7 @@
# Example config file for simple_backup # Example config file for simple_backup
[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 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). # 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) # Number of old backups (i.e. excluding the one that's being created) to keep (use -1 to keep all)
keep=-1 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] # [server]
# ssh_host= # ssh_host=
# ssh_user= # ssh_user=