From 4928d167ec4e696dc11463d83b1d8f76aba2d503 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Tue, 7 Apr 2026 20:43:40 -0500 Subject: [PATCH] Add backup script and cron --- service/backup.sh | 8 ++++++++ service/crontab | 1 + 2 files changed, 9 insertions(+) create mode 100755 service/backup.sh create mode 100644 service/crontab diff --git a/service/backup.sh b/service/backup.sh new file mode 100755 index 0000000..7dd1753 --- /dev/null +++ b/service/backup.sh @@ -0,0 +1,8 @@ +# Avoid corruption by stopping Cadbury +systemctl stop cadbury +INSTALL_DIR=/etc/matrix-cadbury +# Create backup files while Cadbuary is paused +mkdir -p $INSTALL_DIR/backups +cp $INSTALL_DIR/*.db $INSTALL_DIR/backups +# Resume Cadbury +systemctl start cadbury diff --git a/service/crontab b/service/crontab new file mode 100644 index 0000000..ac9998b --- /dev/null +++ b/service/crontab @@ -0,0 +1 @@ +0 0 * * * /etc/matrix-cadbury/service/backup.sh -- 2.47.3