Extended backup removing policy
This commit is contained in:
parent
116cac7d6d
commit
6aeb19a0b9
2 changed files with 6 additions and 6 deletions
|
@ -17,11 +17,11 @@ function backup-directory() {
|
||||||
then
|
then
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files unlock --cleanup-cache
|
restic -v -r ${RESTIC_REPOSITORY}/files unlock --cleanup-cache
|
||||||
cd ${directory} && restic -v -r ${RESTIC_REPOSITORY}/files backup .
|
cd ${directory} && restic -v -r ${RESTIC_REPOSITORY}/files backup .
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --prune
|
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --keep-within-monthly ${RESTIC_MONTHS_TO_KEEP}m --prune
|
||||||
else
|
else
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files unlock --cleanup-cache --cacert ${CERTIFICATE_FILE}
|
restic -v -r ${RESTIC_REPOSITORY}/files unlock --cleanup-cache --cacert ${CERTIFICATE_FILE}
|
||||||
cd ${directory} && restic -v -r ${RESTIC_REPOSITORY}/files backup . --cacert ${CERTIFICATE_FILE}
|
cd ${directory} && restic -v -r ${RESTIC_REPOSITORY}/files backup . --cacert ${CERTIFICATE_FILE}
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --prune --cacert ${CERTIFICATE_FILE}
|
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --keep-within-monthly ${RESTIC_MONTHS_TO_KEEP}m --prune --cacert ${CERTIFICATE_FILE}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,11 +33,11 @@ function backup-fs-from-directory() {
|
||||||
then
|
then
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files unlock --cleanup-cache
|
restic -v -r ${RESTIC_REPOSITORY}/files unlock --cleanup-cache
|
||||||
cd ${directory} && restic -v -r ${RESTIC_REPOSITORY}/files backup $@
|
cd ${directory} && restic -v -r ${RESTIC_REPOSITORY}/files backup $@
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --prune
|
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --keep-within-monthly ${RESTIC_MONTHS_TO_KEEP}m --prune
|
||||||
else
|
else
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files unlock --cleanup-cache --cacert ${CERTIFICATE_FILE}
|
restic -v -r ${RESTIC_REPOSITORY}/files unlock --cleanup-cache --cacert ${CERTIFICATE_FILE}
|
||||||
cd ${directory} && restic -v -r ${RESTIC_REPOSITORY}/files backup $@ --cacert ${CERTIFICATE_FILE}
|
cd ${directory} && restic -v -r ${RESTIC_REPOSITORY}/files backup $@ --cacert ${CERTIFICATE_FILE}
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --prune --cacert ${CERTIFICATE_FILE}
|
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --keep-within-monthly ${RESTIC_MONTHS_TO_KEEP}m --prune --cacert ${CERTIFICATE_FILE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ function roles-unlock-command() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function roles-forget-command() {
|
function roles-forget-command() {
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/pg-role forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --prune $@
|
restic -v -r ${RESTIC_REPOSITORY}/pg-role forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --keep-within-monthly ${RESTIC_MONTHS_TO_KEEP}m --prune $@
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup-roles() {
|
function backup-roles() {
|
||||||
|
@ -72,7 +72,7 @@ function db-unlock-command() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function db-forget-command() {
|
function db-forget-command() {
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/pg-database forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --prune $@
|
restic -v -r ${RESTIC_REPOSITORY}/pg-database forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --keep-within-monthly ${RESTIC_MONTHS_TO_KEEP}m --prune $@
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup-db-dump() {
|
function backup-db-dump() {
|
||||||
|
|
Loading…
Reference in a new issue