diff --git a/tools/arkmanager b/tools/arkmanager index 93d9f46..6af84de 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -1557,6 +1557,27 @@ doBackup(){ fi done + # ARK server uses Lock-Truncate-Write-Unlock + echo -e "${NORMAL} Copying ARK tribute tribe files " + for f in "${arkserverroot}/ShooterGame/Saved/${savedir}/"*.arktributetribe; do + echo -ne "${NORMAL} ${f##*/} " + cp -p "${f}" "${backupdir}/${f##*/}" + if [ ! -s "${backupdir}/${f##*/}" ]; then + sleep 2 + cp -p "${f}" "${backupdir}/${f##*/}" + fi + # If both attempts fail, server may have + # crashed between truncate and write + if [ ! -s "${backupdir}/${f##*/}" ]; then + cp -p "${f%.arktribe}.tmptributetribe" "${backupdir}/${f##*/}" + fi + if [ -s "${backupdir}/${f##*/}" ]; then + echo -e "${NORMAL}\e[68G[ ${GREEN}OK${NORMAL} ]" + else + echo -e "${NORMAL}\e[68G[ ${RED}FAILED${NORMAL} ]" + fi + done + # ARK server uses Lock-Truncate-Write-Unlock echo -ne "${NORMAL} Copying GameUserSettings.ini " cp -p "${arkserverroot}/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini" "${backupdir}/GameUserSettings.ini"