增量式备份

This commit is contained in:
zhangkun9038@dingtalk.com 2023-07-15 22:42:35 +08:00
parent df7eb6e699
commit 3ae38dc76a

View File

@ -45,7 +45,7 @@ echo "$CURRENT_BINLOG $CURRENT_POSITION" > "last_backup.txt"
backup_files=()
find "${backUpPath}/${dbName}-incremental-*.sql.zip" -type f -print0 | while IFS= read -r -d '' file; do
find "${dbName}-incremental-*.sql.zip" -type f -print0 | while IFS= read -r -d '' file; do
file_date=$(stat -c %Y "$file")
current_time=$(date +%s)
if (( (current_time - file_date) > 86400 )); then