From e921edd3e7486e9e014b9ef5f55dfc7d52bf75b6 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Tue, 20 Aug 2024 12:51:59 +0000 Subject: [PATCH] Remove redis and influxdb snapshots and add backups for rest --- cron/backup-dovecot/APKBUILD | 13 +++++++++++++ cron/backup-dovecot/hourly | 3 +++ cron/backup-gitea/APKBUILD | 13 +++++++++++++ cron/backup-gitea/hourly | 3 +++ cron/backup-postgresql/APKBUILD | 13 +++++++++++++ cron/backup-postgresql/hourly | 3 +++ cron/snapshot-influxdb/APKBUILD | 13 ------------- cron/snapshot-influxdb/daily | 3 --- cron/snapshot-redis/APKBUILD | 13 ------------- cron/snapshot-redis/daily | 3 --- 10 files changed, 48 insertions(+), 32 deletions(-) create mode 100644 cron/backup-dovecot/APKBUILD create mode 100644 cron/backup-dovecot/hourly create mode 100644 cron/backup-gitea/APKBUILD create mode 100644 cron/backup-gitea/hourly create mode 100644 cron/backup-postgresql/APKBUILD create mode 100644 cron/backup-postgresql/hourly delete mode 100644 cron/snapshot-influxdb/APKBUILD delete mode 100644 cron/snapshot-influxdb/daily delete mode 100644 cron/snapshot-redis/APKBUILD delete mode 100644 cron/snapshot-redis/daily diff --git a/cron/backup-dovecot/APKBUILD b/cron/backup-dovecot/APKBUILD new file mode 100644 index 0000000..81fd321 --- /dev/null +++ b/cron/backup-dovecot/APKBUILD @@ -0,0 +1,13 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes + +. ../APKBUILD-cron.template + +pkgrel=0 +depends="$depends btrfs-progs" +install_if="$install_if redxen-config-${_rx_pkgname#backup-}" +source="hourly" + +sha512sums=" +ad4023b8aef113195633efab00c56fba29b99b51afedd8a147f241cabbc597ae2a77953f5871a86c334a4800d63a631943ff45f5d094435f524eed53e2e32c5b hourly +" diff --git a/cron/backup-dovecot/hourly b/cron/backup-dovecot/hourly new file mode 100644 index 0000000..89abde5 --- /dev/null +++ b/cron/backup-dovecot/hourly @@ -0,0 +1,3 @@ +#!/bin/sh +mountpoint /var/backup/dovecot && \ +/usr/libexec/caskd/btrfs-subvolume-delta /var/mail /var/backup/dovecot diff --git a/cron/backup-gitea/APKBUILD b/cron/backup-gitea/APKBUILD new file mode 100644 index 0000000..140891b --- /dev/null +++ b/cron/backup-gitea/APKBUILD @@ -0,0 +1,13 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes + +. ../APKBUILD-cron.template + +pkgrel=0 +depends="$depends btrfs-progs" +install_if="$install_if redxen-config-${_rx_pkgname#backup-}" +source="hourly" + +sha512sums=" +7520dff0c1ed3dcc966e8dbfd8aba1d660fa3a9dc03b6aeef24f4eafddb2f9fff85e8e52d0d19a5674f8585d25509bf24d59eae1a0c259d57bbd864f117de861 hourly +" diff --git a/cron/backup-gitea/hourly b/cron/backup-gitea/hourly new file mode 100644 index 0000000..707053b --- /dev/null +++ b/cron/backup-gitea/hourly @@ -0,0 +1,3 @@ +#!/bin/sh +mountpoint /var/backup/gitea && \ +/usr/libexec/caskd/btrfs-subvolume-delta /var/lib/gitea /var/backup/gitea diff --git a/cron/backup-postgresql/APKBUILD b/cron/backup-postgresql/APKBUILD new file mode 100644 index 0000000..ed4b467 --- /dev/null +++ b/cron/backup-postgresql/APKBUILD @@ -0,0 +1,13 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes + +. ../APKBUILD-cron.template + +pkgrel=0 +depends="$depends btrfs-progs" +install_if="$install_if redxen-config-${_rx_pkgname#backup-}" +source="hourly" + +sha512sums=" +a38b0992c6b95445b5fe2a68e0b29984c77663fdc937f199fd5b896ae12ab4c9e779d2e8f81e1744dfa17ebdeb6bbb8f8cea20c8781617b825eed6e358e044db hourly +" diff --git a/cron/backup-postgresql/hourly b/cron/backup-postgresql/hourly new file mode 100644 index 0000000..ada3223 --- /dev/null +++ b/cron/backup-postgresql/hourly @@ -0,0 +1,3 @@ +#!/bin/sh +mountpoint /var/backup/postgres && \ +/usr/libexec/caskd/btrfs-subvolume-delta /var/lib/postgresql /var/backup/postgres diff --git a/cron/snapshot-influxdb/APKBUILD b/cron/snapshot-influxdb/APKBUILD deleted file mode 100644 index 2c6c0a7..0000000 --- a/cron/snapshot-influxdb/APKBUILD +++ /dev/null @@ -1,13 +0,0 @@ -# Contributor: Alex Denes -# Maintainer: Alex Denes - -. ../APKBUILD-cron.template - -pkgrel=0 -depends="$depends btrfs-progs" -install_if="$install_if redxen-config-${_rx_pkgname#snapshot-}" -source="daily" - -sha512sums=" -985daf085ab967c5b69d791676075fac0f54ed153b3afb746ef51bee7c70cbdc98ef6a98fe69012a0a3568c99f9d2b02cb481fabc85680826451f6719d99450c daily -" diff --git a/cron/snapshot-influxdb/daily b/cron/snapshot-influxdb/daily deleted file mode 100644 index 346ec01..0000000 --- a/cron/snapshot-influxdb/daily +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/sbin/btrfs subvolume delete /var/lib/influxdb/.snap/`date +"%u"` -/sbin/btrfs subvolume snapshot -r /var/lib/influxdb /var/lib/influxdb/.snap/`date +"%u"` diff --git a/cron/snapshot-redis/APKBUILD b/cron/snapshot-redis/APKBUILD deleted file mode 100644 index 1d03d62..0000000 --- a/cron/snapshot-redis/APKBUILD +++ /dev/null @@ -1,13 +0,0 @@ -# Contributor: Alex Denes -# Maintainer: Alex Denes - -. ../APKBUILD-cron.template - -pkgrel=0 -depends="$depends btrfs-progs" -install_if="$install_if redxen-config-${_rx_pkgname#snapshot-}" -source="daily" - -sha512sums=" -c833ead61e470dd5dc1abd904ad14c77eb5d0117d444ed666300d544303884683c3c4606781ebc3186654aaa736da4ac4464bb0bb90d2568a5efc4b8dc947ed6 daily -" diff --git a/cron/snapshot-redis/daily b/cron/snapshot-redis/daily deleted file mode 100644 index aa5057f..0000000 --- a/cron/snapshot-redis/daily +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/sbin/btrfs subvolume delete /var/lib/redis/.snap/`date +"%u"` -/sbin/btrfs subvolume snapshot -r /var/lib/redis /var/lib/redis/.snap/`date +"%u"`