Compare commits

...

2 Commits

Author SHA1 Message Date
d6a607dd22
chore: db backup keep time
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-11 09:43:48 +08:00
efd5f8709f
feat: add cc address 2023-03-11 09:43:08 +08:00
2 changed files with 8 additions and 9 deletions

View File

@ -9,5 +9,5 @@ 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 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
/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" /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 {} \; find /data/s2oj-db-backup/ -mtime +14 -name "*.sql" -exec rm -rf {} \;
rclone sync /data/s2oj-db-backup/ baoshuo-s3-de-fra2:s2oj-db-backup --buffer-size=500M rclone sync /data/s2oj-db-backup/ baoshuo-s3-de-fra2:s2oj-db-backup --buffer-size=500M

File diff suppressed because one or more lines are too long