ANEURISM IV/Backups and updates
Keep the server installation separate from its data directory. SteamCMD can then replace game files without replacing your saved world or staff assignments.
These commands use the paths and user service from ANEURISM IV/Dedicated servers. Run them as the same Linux user that runs the server.
Back up a world
Tell players the server is closing, then stop it:
systemctl --user stop aniv.service
systemctl --user show aniv.service -p ActiveState -p SubState -p MainPID
Wait for the stop to succeed. Confirm that the process has exited before copying its data. If you launched it manually, stop that process instead.
Back up the whole data directory and startup environment:
umask 077
mkdir -p "$HOME/aneurism/backups"
ANIV_BACKUP_NAME="community-$(date -u +%Y%m%dT%H%M%SZ).tar.gz"
tar -czf "$HOME/aneurism/backups/$ANIV_BACKUP_NAME" \
-C "$HOME/aneurism" data server.env
tar -tzf "$HOME/aneurism/backups/$ANIV_BACKUP_NAME"
systemctl --user start aniv.service
Store another copy away from the server machine. Record the game version, selected Steam branch, and map with each backup. The archive contains player and moderation data, plus the server password if one was set in server.env; keep it private.
aniv.db is a SQLite database. Copying only that file while the server is running can miss writes or produce an inconsistent backup. Stop the server and preserve the whole directory, including any database journal files.
Restore a backup
- Stop the server and confirm that its process has exited.
- Keep a backup of the current data, even if you're restoring because something went wrong.
- Extract the chosen archive into a new, empty directory. Inspect its contents before replacing anything.
- Move the current data directory aside and put the restored
datadirectory at the path inANIV_DATA_ROOT. - Review the restored
server.env. Use the original owner and map, and correct the absolute data path if this is another machine. - Start with a compatible game build. Join and check the world, player progress, ranks, bans, and whitelist.
Keep the previous data directory until you've checked the restore. Don't merge two saved worlds or open the same database from two processes.
Update the server
Stop and back up the server first. Then run SteamCMD against its existing installation:
steamcmd +force_install_dir "$HOME/aneurism/server" \
+login anonymous +app_update 2832030 -beta preview validate +quit
systemctl --user start aniv.service
journalctl --user -u aniv.service -n 100 --no-pager
Use the same Steam login method you used for installation. The command above selects preview. To return to Steam's default branch, use -beta public. Check that the branch you're selecting supports this saved world before changing it.
Players need a compatible game version after the update. If the server won't start, preserve the failed-start log and the pre-update backup. Restoring an older executable alone doesn't undo database changes.
Change the map or start a fresh world
Stop the server, choose a new empty directory for ANIV_DATA_ROOT, and set ANIV_MAP before starting again. Keep the old directory if you want to return to that world. A new data directory also creates new administration data, seeded with the configured owner.
A gameplay world wipe has a different scope: it clears world and player progress but preserves the existing owner, ranks, bans, whitelist, and reserved-slot grants. Don't delete aniv.db to perform that kind of wipe.
Version 20 has no automatic importer for old databases or rank and ban files. Keep those backups separate and begin with a fresh data directory when moving from an older hosting setup that uses a different schema.