From: Edward Delaporte Date: Wed, 8 Apr 2026 01:43:40 +0000 (-0500) Subject: Add backup script and cron X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-cadbury.git/commitdiff_plain/4928d167ec4e696dc11463d83b1d8f76aba2d503?ds=inline Add backup script and cron --- 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