File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Provides a side-car container to back up [itzg/minecraft-server](https://github.
15
15
- ` BACKUP_METHOD ` =tar : [ see below] ( #backup-methods )
16
16
- ` INITIAL_DELAY ` =2m
17
17
- ` BACKUP_INTERVAL ` =24h
18
+ - ` BACKUP_ON_STARTUP ` =true : Set to false to skip first backup on startup.
18
19
- ` PAUSE_IF_NO_PLAYERS ` =false
19
20
- ` PLAYERS_ONLINE_CHECK_INTERVAL ` =5m
20
21
- ` PRUNE_BACKUPS_DAYS ` =7
Original file line number Diff line number Diff line change 19
19
: " ${BACKUP_NAME:= world} "
20
20
: " ${INITIAL_DELAY:= 2m} "
21
21
: " ${BACKUP_INTERVAL:= ${INTERVAL_SEC:- 24h} } "
22
+ : " ${BACKUP_ON_STARTUP:= true} "
22
23
: " ${PAUSE_IF_NO_PLAYERS:= false} "
23
24
: " ${PLAYERS_ONLINE_CHECK_INTERVAL:= 5m} "
24
25
: " ${BACKUP_METHOD:= tar} " # currently one of tar, restic, rsync
@@ -575,9 +576,13 @@ if ! is_one_shot; then
575
576
sleep ${INITIAL_DELAY}
576
577
fi
577
578
579
+ first_run=TRUE
578
580
579
581
while true ; do
580
- if ! is_paused; then
582
+ if [[ $first_run == TRUE && ${BACKUP_ON_STARTUP^^} = FALSE ]]; then
583
+ log INFO " Skipping backup on startup"
584
+ first_run=false
585
+ elif ! is_paused; then
581
586
582
587
load_rcon_password
583
588
You can’t perform that action at this time.
0 commit comments