arkmanager / ark-server-tools

Set of server tools used to manage ARK: Survival Evolved servers on Linux
MIT License
680 stars 144 forks source link

add Restore option #1104

Closed fapo85 closed 4 years ago

fapo85 commented 4 years ago

as required in issue 1056 among others, I have implemented a function to restore a backup.

klightspeed commented 4 years ago

This doesn't include tribes (*.arktribe), tribute tribes (*.arktributetribe) or, mod persistent info (SaveGames). Also, I wonder if it might be more concise to use something like:

local restorePath=
case "${file}" in
    SaveGames/*) # mod persistent info
        restorePath="${saverootdir}"
        ;;
    *.ini) # ini are the config files
        restorePath="${savedcfgdir}"
        ;;
    *.ark|*.arkprofile|*.arktribe|*.arktributetribe) # ark file in savedir
        restorePath="${savedir}"
        ;;
esac
if [ -n "${restorePath}" ]; then
    tar -xjvf "${backupFile}" -C "${restorePath}" --strip-components=1 "${file}"
fi      

Also make sure you quote any variable expansions that could have a space in them.

dt-flo commented 4 years ago

This doesn't include tribes (*.arktribe), tribute tribes (*.arktributetribe) or, mod persistent info (SaveGames). Also, I wonder if it might be more concise to use something like:

So, is this a ready-to-use feature or still in beta?

klightspeed commented 4 years ago

This is in 1.6.53