增量式备份
This commit is contained in:
parent
5c1898dd48
commit
d76c0ecfc3
@ -46,7 +46,7 @@ echo "$CURRENT_BINLOG $CURRENT_POSITION" > "last_backup.txt"
|
|||||||
backup_files=()
|
backup_files=()
|
||||||
|
|
||||||
cd $backUpPath
|
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")
|
file_date=$(stat -c %Y "$file")
|
||||||
current_time=$(date +%s)
|
current_time=$(date +%s)
|
||||||
if (( (current_time - file_date) > 86400 )); then
|
if (( (current_time - file_date) > 86400 )); then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user