From f8170a9437a5b736673d588aa38d0c078a66fe53 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 31 Jan 2023 09:29:36 +0800 Subject: [PATCH] fix: docker-compose path --- s2oj-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s2oj-backup.sh b/s2oj-backup.sh index f98c558..ad2a8f8 100755 --- a/s2oj-backup.sh +++ b/s2oj-backup.sh @@ -8,6 +8,6 @@ if pidof -o %PPID -x "/data/s2oj/s2oj-backup.sh"; then fi rclone sync /data/s2oj baoshuo-s3-de-fra2:s2oj --include "/docker-compose.local.yml" --include "/.config.local.php" --include "/uoj_data/web/data/*.zip" --include "/uoj_data/web/storage/**" --transfers=20 --buffer-size=500M --checkers=20 -docker-compose -f /data/s2oj/docker-compose.local.yml exec uoj-db mysqldump -uroot --password="${MYSQL_ROOT_PASSWORD:-root}" app_uoj233 > "/data/s2oj-db-backup/s2oj-database_$(date +'%F-%H%M%S').sql" +/usr/local/bin/docker-compose -f /data/s2oj/docker-compose.local.yml exec uoj-db mysqldump -uroot --password="${MYSQL_ROOT_PASSWORD:-root}" app_uoj233 > "/data/s2oj-db-backup/s2oj-database_$(date +'%F-%H%M%S').sql" find /data/s2oj-db-backup/ -mtime +7 -name "*.sql" -exec rm -rf {} \; rclone sync /data/s2oj-db-backup/ baoshuo-s3-de-fra2:s2oj-db-backup --buffer-size=500M