Updated manual
All checks were successful
backup.sh / bash (push) Successful in 11s

This commit is contained in:
Marco Cetica 2024-04-04 11:57:19 +02:00
parent 08e790a13b
commit ae78d9fd87
Signed by: marco
GPG Key ID: 45060A949E90D0FD

View File

@ -14,7 +14,7 @@
. ftr VB CB . ftr VB CB
. ftr VBI CBI . ftr VBI CBI
.\} .\}
.TH "backup.sh" "1" "April 3, 2024" "Marco Cetica" "General Commands Manual" .TH "backup.sh" "1" "April 4, 2024" "Marco Cetica" "General Commands Manual"
.hy .hy
.SH NAME .SH NAME
.PP .PP
@ -166,7 +166,7 @@ You can also use \f[V]backup.sh\f[R] from a crontab rule:
.nf .nf
\f[C] \f[C]
$> sudo crontab -e $> sudo crontab -e
30 03 * * 6 EKEY=$(cat /home/john/.ekey) sh -c \[aq]/usr/local/bin/backup.sh -b /usr/local/etc/sources.bk /home/john $EKEY\[aq] > /dev/null 2>&1 30 03 * * 6 EKEY=$(cat /home/john/.ekey) bash -c \[aq]/usr/local/bin/backup.sh -b /usr/local/etc/sources.bk /home/john $EKEY\[aq] > /dev/null 2>&1
\f[R] \f[R]
.fi .fi
.PP .PP
@ -178,8 +178,8 @@ You can also adopt this practice while using the \f[V]--extract\f[R]
option to avoid password leaking in shell history. option to avoid password leaking in shell history.
.SS Backup extraction .SS Backup extraction
.PP .PP
\f[B]backup.sh\f[R] can also be used to extract the encrypted backup as \f[B]backup.sh\f[R] can also be used to extract and to verify the
well to verify the integrity of the backup data. encrypted backup.
To do so, use the following commands: To do so, use the following commands:
.IP .IP
.nf .nf
@ -209,11 +209,11 @@ backup-ssh-<YYYYMMDD>
\f[R] \f[R]
.fi .fi
.PP .PP
\f[B]note:\f[R]: be sure to rename any directory with that name to avoid \f[B]note\f[R]: be sure to rename any directory with that name to avoid
collisions. collisions.
.PP .PP
Instead, if you also want to verify the integrity of the backup data, If you also want to verify the integrity of the backup data, use the
use the following commands: following commands:
.IP .IP
.nf .nf
\f[C] \f[C]
@ -225,12 +225,9 @@ For instance:
.IP .IP
.nf .nf
\f[C] \f[C]
$> ./backup.sh --checksum --extract backup-<hostname>-<YYYYMMDD>.tar.gz.enc badpw1234 $PWD/backup-<hostname>-<YYYYMMDD>.sha256 $> ./backup.sh --checksum --extract backup-<hostname>-<YYYYMMDD>.tar.gz.enc badpw1234 backup-<hostname>-<YYYYMMDD>.sha256
\f[R] \f[R]
.fi .fi
.PP
\f[B]note:\f[R] be sure to provide the ABSOLUTE PATH of the checksum
file.
.SS How does backup.sh work? .SS How does backup.sh work?
.PP .PP
\f[B]backup.sh\f[R] uses \f[I]rsync\f[R] to copy the files, \f[B]backup.sh\f[R] uses \f[I]rsync\f[R] to copy the files,