Skip to content
Snippets Groups Projects
Commit 0a99dd92 authored by Axel Hahn's avatar Axel Hahn
Browse files

updat docs

parent da7dab7a
Branches
No related tags found
1 merge request!75Prune and verify
......@@ -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
......@@ -38,4 +38,3 @@ OPTIONS:
-i, --inc force incrmenental backup
```
```
# ./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)
```
## 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'
```
## 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment