meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
linux:backup:duply [2018/03/08 07:31] – niziak | linux:backup:duply [2021/05/10 11:53] – niziak | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Duply ====== | ||
+ | |||
====== Installation ====== | ====== Installation ====== | ||
<code bash> | <code bash> | ||
Line 68: | Line 70: | ||
Sometimes it is good to check whether incremental backups are meaningful (it depends on type of data stored). If command | Sometimes it is good to check whether incremental backups are meaningful (it depends on type of data stored). If command | ||
- | <code bash> | + | <code bash> |
can be short e.g. MAX_FULLBKP_AGE=7D | can be short e.g. MAX_FULLBKP_AGE=7D | ||
Line 85: | Line 87: | ||
<file bash> | <file bash> | ||
- | duply gitlab backup | + | #!/bin/bash -ue |
- | duply gitlab purge --force | + | set -o pipefail |
- | duply gitlab-to-grinnux purgeIncr --force | + | trap " |
- | duply gitlab-to-grinnux purgeFull --force | + | |
- | duply gitlab cleanup --extra-clean --force > / | + | duply gitlab backup |
+ | duply gitlab purge --force # list outdated backup archives and delete them | ||
+ | duply gitlab-to-grinnux purgeIncr --force | ||
+ | duply gitlab-to-grinnux purgeFull --force | ||
+ | duply gitlab cleanup --extra-clean --force > /dev/null # list broken backup files and delete them | ||
+ | banner ALL OK | ||
</ | </ | ||
===== shell function ===== | ===== shell function ===== | ||
<code bash> | <code bash> | ||
- | function | + | #!/bin/bash -ueE |
- | duply ${1} backup | + | set -o pipefail |
+ | trap " | ||
+ | |||
+ | run_duply() { | ||
+ | echo " | ||
+ | duply ${1} backup | ||
echo " | echo " | ||
- | duply ${1} purge --force | + | |
- | duply ${1} purgeIncr --force | + | |
- | duply ${1} purgeFull --force | + | duply ${1} purgeIncr --force |
+ | duply ${1} purgeFull --force | ||
echo " | echo " | ||
- | duply ${1} cleanup --extra-clean --force > / | + | duply ${1} cleanup --extra-clean --force > /dev/null |
+ | echo " | ||
+ | | ||
} | } | ||
</ | </ |