diff --git a/docs/30_Configuration/50_File_transfer.job.md b/docs/30_Configuration/50_File_transfer.job.md index 42cd1d45ad67257b6504a035651a059aebcfa882..42368f6a709d343b857a88d9a1fb032ebea790d6 100644 --- a/docs/30_Configuration/50_File_transfer.job.md +++ b/docs/30_Configuration/50_File_transfer.job.md @@ -107,6 +107,14 @@ sambashares = 1 restore-path = /restore +# ---------------------------------------------------------------------- +# automatic tasks on each backup run +# ---------------------------------------------------------------------- + +# number of days when to prune and verify backup. +# set it to 0 to run prune and verify in each backup run. +prune-after = 3 +verify-after = 7 # ---------------------------------------------------------------------- # @@ -239,6 +247,15 @@ restore any data anymore. `passphrase = EnterYourSecretHere` +## Prune-after + +You can define how often to prune old data. +Set an integer for age in days here. If it is 0 then it will be executed on each backup run. + +`prune-after = 3` + +Remark: You can force the prune functionality by executing `transfer.sh prune` + ## restic_* Variables that are specific for restic. They will be used when you set @@ -334,3 +351,11 @@ Duplicity supports 2 modes. see also **bin** +## Verify-after + +You can define how often to verify integrity of the backup repoitory data. +Set an integer for age in days here. If it is 0 then it will be executed on each backup run. + +`verify-after = 3` + +Remark: You can force the verify functionality by executing `transfer.sh verify` \ No newline at end of file diff --git a/docs/40_Usage/10_Backup.md b/docs/40_Usage/10_Backup.md index 1ffc77487d329a22be36f816854f116c45916210..290950dbb39c2b5a4d3e88ef3ff0ceee23808e11 100644 --- a/docs/40_Usage/10_Backup.md +++ b/docs/40_Usage/10_Backup.md @@ -38,4 +38,3 @@ OPTIONS: -i, --inc force incrmenental backup ``` - diff --git a/docs/40_Usage/30_Filetransfer.md b/docs/40_Usage/30_Filetransfer.md index 80202c4ab6bde06aede89ea4c5f5ec1a2ec3a75c..aeac6cc4a32a8091e62ea983f9b069dbfa73752b 100644 --- a/docs/40_Usage/30_Filetransfer.md +++ b/docs/40_Usage/30_Filetransfer.md @@ -1,5 +1,5 @@ ``` -# ./transfer.sh -? +> ./transfer.sh -h ___ ___ ___ ___ _______ __ | | Y | | | _ .---.-.----| |--.--.--.-----. @@ -20,14 +20,14 @@ HELP: Transfer local files to a backup target. - target sftp://imlbackup@storage-connector.iml.unibe.ch//netshare/restic-backup + target rest:https://backup:**********@mysynology.dsmynas.net:8000/linux-pc backup tool restic PARAMETERS: - transfer.sh - incremental backup - transfer.sh full - full backup - transfer.sh dumps - transfer local dumps only - transfer.sh prune - cleanup backup data only (no backup) - transfer.sh help - show this help (works with -h and -? too) - + transfer.sh - incremental backup + transfer.sh full - full backup (Duplicity only) + transfer.sh dumps - transfer local dumps only + transfer.sh prune - cleanup backup data only (no backup) + transfer.sh verify - verify backup data (no backup) + transfer.sh help - show this help (works with -h and -? too) ``` diff --git a/docs/40_Usage/40_Cronjob.md b/docs/40_Usage/40_Cronjob.md index b17489c2de4fc62255802a1053b14ad9eb57fb98..3e71eb40a5fc770f1fc4142f9ed28a971e0929ef 100644 --- a/docs/40_Usage/40_Cronjob.md +++ b/docs/40_Usage/40_Cronjob.md @@ -1,3 +1,5 @@ +## Backup + To start a daily backup at 23:03: ```shell @@ -7,7 +9,8 @@ $ cat /etc/cron.d/client-backup ... or with using the cronwrapper -see <https://github.com/axelhahn/cronwrapper> +see ๐ <https://www.axel-hahn.de/docs/cronwrapper/> +๐งพ <https://github.com/axelhahn/cronwrapper> TTL is 1440 for 1440 min = 1d @@ -15,3 +18,29 @@ TTL is 1440 for 1440 min = 1d $ cat /etc/cron.d/client-backup 3 23 * * * root /usr/local/bin/cronwrapper.sh 1440 /opt/imlbackup/client/backup.sh 'iml-backup' ``` + +## Prune and verify + +By default prune and verify are executed on each backup run. This is a safe way. A very safe way. + +BUT: By doing this the backup with Restic is running for a few seconds and prune + verify take a much-much longer time. In many cases it is a good idea to split backup and prune + verify. + +**Example:** + +You want to start a daily (or hourly) backup. Pruning and verify shall run on Saturday and Sunday. + +In jobs/transfer.job set a limit greater 7 days: + +```txt +prune-after = 14 +verify-after = 14 +``` + +Then define your weekly yobs on Saturday and Sunday. + +```shell +$ cat /etc/cron.d/client-backup +3 23 * * * root /usr/local/bin/cronwrapper.sh 1440 /opt/imlbackup/client/backup.sh 'iml-backup' +7 18 * * 6 root /usr/local/bin/cronwrapper.sh 1440 /opt/imlbackup/client/prune.sh 'iml-backup-prune' +7 18 * * 0 root /usr/local/bin/cronwrapper.sh 1440 /opt/imlbackup/client/verify.sh 'iml-backup-verify' +``` diff --git a/docs/99_Glossary.md b/docs/99_Glossary.md new file mode 100644 index 0000000000000000000000000000000000000000..b95f767472eb69bf81ebef6e303b9ad48ccf1b43 --- /dev/null +++ b/docs/99_Glossary.md @@ -0,0 +1,19 @@ +## Explaination of some words + +* **backup** = save current data "somewhare".<br>Store your backup outside the local system to have a copy you can access if the system is damaged. + +* **cronjob** = start a command in a defined cycle. ie. eve3ry hour, every day, once a week and so on + +* **database dump** = backup a database / scheme into a single file + +* **full backup** = backup of all data of the local system. + +* **incremental backup** = backup of data that have changed since the last backup. + +* **prune** = delete old backup sets and thin data in the backup repository. <br>As an example: You can make an hourly backup and define to keep all of them for a week, daily backups for 90 days and monthly backups starting from 1 to 36 monthes (=3 years). The prune actions removes data in the backup storage to thin out your backup data. + +* **restore** = copy data back from a made backup to the local system. + +* **ttl** = time to live<br>Definition how long an information is valid before it needs to be updated again. + +* **verify** = check the integrity of backup data \ No newline at end of file