mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-22 14:48:26 +00:00
Add ark backup feature
This commit is contained in:
parent
0ea4ae4782
commit
c8f8ae87f6
@ -335,6 +335,18 @@ safeUpdate(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copies server state to a backup directory
|
||||||
|
#
|
||||||
|
doBackup(){
|
||||||
|
local datestamp=`date +"%Y-%m-%d_%H.%M.%S"`
|
||||||
|
local backupdir="${arkbackupdir}/${datestamp}"
|
||||||
|
mkdir -p "$backupdir"
|
||||||
|
cp "${arkserverroot}/ShooterGame/Saved/SavedArks/${serverMap}.ark" "${backupdir}/${serverMap}.ark"
|
||||||
|
cp "${arkserverroot}/ShooterGame/Saved/SavedArks/"*.arkprofile "${backupdir}"
|
||||||
|
cp "${arkserverroot}/ShooterGame/Saved/SavedArks/"*.arktribe "${backupdir}"
|
||||||
|
cp "${arkserverroot}/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini" "${backupdir}"
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Print the status of the server (running? online? version?)
|
# Print the status of the server (running? online? version?)
|
||||||
@ -407,6 +419,9 @@ case "$1" in
|
|||||||
checkupdate)
|
checkupdate)
|
||||||
checkForUpdate
|
checkForUpdate
|
||||||
;;
|
;;
|
||||||
|
backup)
|
||||||
|
doBackup
|
||||||
|
;;
|
||||||
broadcast)
|
broadcast)
|
||||||
doInfo $2
|
doInfo $2
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -10,6 +10,7 @@ steamcmd_appinfocache="/home/steam/Steam/appcache/appinfo.vdf" # cache of t
|
|||||||
# config environment
|
# config environment
|
||||||
arkserverroot="/home/steam/ARK" # path of your ARK server files (default ~/ARK)
|
arkserverroot="/home/steam/ARK" # path of your ARK server files (default ~/ARK)
|
||||||
arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of ARK server executable
|
arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of ARK server executable
|
||||||
|
arkbackupdir="/home/steam/ARK-Backups" # path to backup directory
|
||||||
|
|
||||||
# ARK server options - use ark_<optionname>=<value>
|
# ARK server options - use ark_<optionname>=<value>
|
||||||
# comment out these values if you want to define them
|
# comment out these values if you want to define them
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user