diff --git a/backup.sh b/backup.sh index ce75d97..7cb1cac 100644 --- a/backup.sh +++ b/backup.sh @@ -5,6 +5,7 @@ find -P "/mnt/storage-bx20/data-nextcloud/bmen/files/Server/Hetzner-Cloud-CX21/N find -P "/mnt/storage-bx20/data-nextcloud/bmen/files/Server/Hetzner-Cloud-CX21/Nextcloud/" -maxdepth 1 -type f \( -name '*.sql' \) -ctime +14 -exec rm {} \; #Zur Sicherheit noch einen SQL-Dump der Datenbank +cd /root/deployments/nextcloud-mariadb-redis-phpfpm/ . ./db.env docker exec -i nextcloud-db mysqldump -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE > /mnt/storage-bx20/data-nextcloud/bmen/files/Server/Hetzner-Cloud-CX21/Nextcloud/nextcloud-`date '+%Y%m%d%H%M'`.sql