增量式备份

This commit is contained in:
zhangkun9038@dingtalk.com 2023-07-15 23:26:46 +08:00
parent 5c1898dd48
commit d76c0ecfc3

View File

@ -46,7 +46,7 @@ echo "$CURRENT_BINLOG $CURRENT_POSITION" > "last_backup.txt"
backup_files=()
cd $backUpPath
find "${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