Fixed intervals for telegraf and backup scripts for btrfs

This commit is contained in:
Alex D. 2020-12-23 13:05:17 +00:00
parent 5b4d76a975
commit c4a6992242
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
8 changed files with 76 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
pkgname=redxen-config-telegraf
pkgver=2020.12.7
pkgver=2020.12.23
pkgrel=0
pkgdesc="Telegraf monitoring configuration"
url="https://git.redxen.eu/RedXen"
@ -21,4 +21,4 @@ check() {
telegraf --config main.conf --test >/dev/null
}
sha512sums="9a50d6b90693fe991be5a99dc3d31f34137894620cf1023a00ee8d8ad3bd1e8c71c4b136d40d42dc663c8719f4f8ee8bd44b51ba3a5fc5d781d6b956ddb03d0c main.conf"
sha512sums="80cb3839e08522ebe390919f7537f739e447adacd552684f329b63fc53d2f1ace654f5cd81b4b599641ddef31e2c7c2adf48946d87dc921a8083a8563f2ecbc6 main.conf"

View File

@ -3,8 +3,8 @@
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
flush_interval = "30s"
precision = ""
flush_interval = "10s"
precision = "10s"
debug = false
quiet = false
logfile = ""

22
cron/influxdb/APKBUILD Normal file
View File

@ -0,0 +1,22 @@
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
pkgname=redxen-cron-influxdb
pkgver=2020.12.23
pkgrel=0
pkgdesc="InfluxDB backup maintenance scripts"
url="https://git.redxen.eu/RedXen"
arch="noarch"
license="none"
install_if="redxen-config-influxdb"
depends="dcron"
source="
cron-daily
"
options="!check"
package() {
install -dm700 "$pkgdir"/databases/snapshots/influxdb
install -Dm544 cron-daily "$pkgdir"/etc/periodic/daily/snapshot-influxdb
}
sha512sums="3fae364738498920e945ee735fdca0f2c3a9acead7a3e73382013e74e79d3bd335830485f50378a05ac1d8db77370297a10d844d750d4ebc681dd4f435e3b1b2 cron-daily"

2
cron/influxdb/cron-daily Normal file
View File

@ -0,0 +1,2 @@
/sbin/btrfs subvolume delete /databases/snapshots/influxdb/`date +"%u"`
/sbin/btrfs subvolume snapshot -r /databases/influxdb /databases/snapshots/influxdb/`date +"%u"`

22
cron/postgresql/APKBUILD Normal file
View File

@ -0,0 +1,22 @@
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
pkgname=redxen-cron-postgresql
pkgver=2020.12.23
pkgrel=0
pkgdesc="Postgresql backup maintenance scripts"
url="https://git.redxen.eu/RedXen"
arch="noarch"
license="none"
install_if="redxen-config-postgresql"
depends="dcron"
source="
cron-daily
"
options="!check"
package() {
install -dm700 "$pkgdir"/databases/snapshots/postgresql
install -Dm544 cron-daily "$pkgdir"/etc/periodic/daily/snapshot-postgresql
}
sha512sums="08d72ce9693771bbb73b5af98f4b09f8c3b9bd766065b7f8541b4348401c5ec378119deff29eb8a799bbcd0cea23afc54d34bf3f299d961a68569a621bd73754 cron-daily"

View File

@ -0,0 +1,2 @@
/sbin/btrfs subvolume delete /databases/snapshots/postgresql/`date +"%u"`
/sbin/btrfs subvolume snapshot -r /databases/postgresql /databases/snapshots/postgresql/`date +"%u"`

22
cron/redis/APKBUILD Normal file
View File

@ -0,0 +1,22 @@
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
pkgname=redxen-cron-redis
pkgver=2020.12.23
pkgrel=0
pkgdesc="Redis backup maintenance scripts"
url="https://git.redxen.eu/RedXen"
arch="noarch"
license="none"
install_if="redxen-config-redis"
depends="dcron"
source="
cron-daily
"
options="!check"
package() {
install -dm700 "$pkgdir"/databases/snapshots/redis
install -Dm544 cron-daily "$pkgdir"/etc/periodic/daily/snapshot-redis
}
sha512sums="2dfe51d31e92d2a8c9390b8b0924c28f43d3afdbe3bceba4a7b8f57bdd8ce8551acd237aff61d2b81a4e6a11107a863ee4bb6136e9463268fcfad346aaadace1 cron-daily"

2
cron/redis/cron-daily Normal file
View File

@ -0,0 +1,2 @@
/sbin/btrfs subvolume delete /databases/snapshots/redis/`date +"%u"`
/sbin/btrfs subvolume snapshot -r /databases/redis /databases/snapshots/redis/`date +"%u"`