Add gitea backups
This commit is contained in:
parent
c4a6992242
commit
49808f0cc5
22
cron/gitea/APKBUILD
Normal file
22
cron/gitea/APKBUILD
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Contributor: Alex Denes <caskd@redxen.eu>
|
||||||
|
# Maintainer: Alex Denes <caskd@redxen.eu>
|
||||||
|
pkgname=redxen-cron-gitea
|
||||||
|
pkgver=2020.12.23
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Gitea backup maintenance scripts"
|
||||||
|
url="https://git.redxen.eu/RedXen"
|
||||||
|
arch="noarch"
|
||||||
|
license="none"
|
||||||
|
install_if="redxen-config-gitea"
|
||||||
|
depends="dcron"
|
||||||
|
source="
|
||||||
|
cron-daily
|
||||||
|
"
|
||||||
|
options="!check"
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -dm700 "$pkgdir"/gitea/snapshots
|
||||||
|
install -Dm544 cron-daily "$pkgdir"/etc/periodic/daily/snapshot-gitea
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="60a658eb9db23d7183d1a48d02c6127d2a01cd10b1d9352eb92dcfb91566a18424d3a8d638fb3aeb9b3c16481dc9416f3704f9d6888ced6ac40e111f25ed1c15 cron-daily"
|
2
cron/gitea/cron-daily
Normal file
2
cron/gitea/cron-daily
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/sbin/btrfs subvolume delete /gitea/snapshots/`date +"%u"`
|
||||||
|
/sbin/btrfs subvolume snapshot -r /gitea /gitea/snapshots/`date +"%u"`
|
Loading…
Reference in New Issue
Block a user