mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-02-02 02:13:49 +00:00
fix: prevent backup from running immediately on container startup
- Initialize last_backup to current time instead of 0 - Prevents capturing fresh/incomplete database state - First backup now runs after configured interval (default 5 minutes) - Adds helpful log message showing when first backup will run
This commit is contained in:
@@ -208,8 +208,9 @@ cleanup_old() {
|
||||
|
||||
log "Backup scheduler starting: interval(${BACKUP_INTERVAL_MINUTES}m), daily($RETENTION_DAYS d at ${DAILY_TIME}:00)"
|
||||
|
||||
# Initialize last backup time
|
||||
last_backup=0
|
||||
# Initialize last backup time to current time to prevent immediate backup on startup
|
||||
last_backup=$(date +%s)
|
||||
log "ℹ️ First backup will run in ${BACKUP_INTERVAL_MINUTES} minutes"
|
||||
|
||||
while true; do
|
||||
current_time=$(date +%s)
|
||||
|
||||
Reference in New Issue
Block a user