summaryrefslogtreecommitdiffstats
path: root/cleanup.d
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2020-03-11 14:30:34 -0700
committerThomas Groman <tgroman@nuegia.net>2020-03-11 14:30:34 -0700
commit753ad76f5f32ace36a7686936b76caf296c7ff65 (patch)
treedc1c94387e370e362117eeda5c634ed383e3020e /cleanup.d
downloadrestic_bootsrap-753ad76f5f32ace36a7686936b76caf296c7ff65.tar
restic_bootsrap-753ad76f5f32ace36a7686936b76caf296c7ff65.tar.gz
restic_bootsrap-753ad76f5f32ace36a7686936b76caf296c7ff65.tar.lz
restic_bootsrap-753ad76f5f32ace36a7686936b76caf296c7ff65.tar.xz
restic_bootsrap-753ad76f5f32ace36a7686936b76caf296c7ff65.zip
initial commit
Diffstat (limited to 'cleanup.d')
-rwxr-xr-xcleanup.d/backblaze.conf15
-rwxr-xr-xcleanup.d/linode.conf15
2 files changed, 30 insertions, 0 deletions
diff --git a/cleanup.d/backblaze.conf b/cleanup.d/backblaze.conf
new file mode 100755
index 0000000..c7f006e
--- /dev/null
+++ b/cleanup.d/backblaze.conf
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# This script is used by the CRON Daemon to prune backups via the Restic backup utility
+
+# Load restic varibles
+source /etc/restic.d/backblaze.conf
+
+# Delete backups according to policy
+restic forget \
+ "$RESTIC_COMMON_OPTS" \
+ --prune \
+ --keep-daily 30 \
+ --keep-weekly 52 \
+ --keep-monthly 3 \
+ --keep-yearly 4
diff --git a/cleanup.d/linode.conf b/cleanup.d/linode.conf
new file mode 100755
index 0000000..0035a24
--- /dev/null
+++ b/cleanup.d/linode.conf
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# This script is used by the CRON Daemon to prune backups via the Restic backup utility
+
+# Load restic varibles
+source /etc/restic.d/linode.conf
+
+# Delete backups according to policy
+restic forget \
+ "$RESTIC_COMMON_OPTS" \
+ --prune \
+ --keep-daily 30 \
+ --keep-weekly 52 \
+ --keep-monthly 3 \
+ --keep-yearly 4