Additional Setup ‐ Manual backup - MarechJ/hll_rcon_tool GitHub Wiki
🧭 You are here : Wiki home / Additional Setup / Manual backup
As CRCON is running in Docker containers, you don't have to backup anything else but its own folder on your VPS.
[!CAUTION] You SHOULD NOT backup a CRCON while it's running.
The CRCON's folder contains the database files, which are accessed multiple times per minute, even if there's no player on your game server.
Making a copy of a running CRCON's folder WILL lead to data loss in the backup.
You could even get a backup containing a corrupted database.
0. Enter an SSH session on your VPS
See this guide to get into a SSH terminal prompt.
[!NOTE] We'll assume you have installed CRCON in its default
/root/hll_rcon_tool
folder, following the installation guide.
Adapt the commands given below if necessary.
1. Stop the CRCON Docker containers
cd /root/hll_rcon_tool
docker compose down
2. Create a backup of the CRCON's folder
cp -r /root/hll_rcon_tool "/root/hll_rcon_tool_backup_$(date '+%Y-%m-%d')"
Note : this may take some time, especially on CRCON(s) that have been managing one or several crowded game servers for a while, as their database(s) contain(s) all the logs the game server(s) have sent.
You now have a full copy of your CRCON installation on your VPS, in the /root/hll_rcon_tool_backup_XXXX-XX-XX
folder.
3. Restart the CRCON Docker containers
docker compose up -d --remove-orphans
Managing the backup files
Compress the backup folder
CRCON's files aren't very large, but its database could grow to several GBs as it has been running for weeks/monthes/years.
So you may want to compress the backup folder, either to minimize the storage space it occupies, or to send a copy of it to another server or your personal computer.
-> Follow the Migrating steps.
[!WARNING] Remember to replace the compressed folder's name in the commands
(hll_rcon_tool
->hll_rcon_tool_backup_XXXX-XX-XX
).
Revert to the backup version
If you want to revert your CRCON back to the state it was on backup time, you'll have to enter these commands :
cd /root/hll_rcon_tool
docker compose down
cd /
mv /root/hll_rcon_tool /root/hll_rcon_tool_bad
cp -r /root/hll_rcon_tool/backup_XXXX-XX-XX /root/hll_rcon_tool
cd /root/hll_rcon_tool
docker compose up -d
You'll then have three CRCON folders :
- the running version :
/root/hll_rcon_tool
; - the initial backup, similar to the running version :
/root/hll_rcon_tool/backup_XXXX-XX-XX
; - the reverted ("bad") version :
/root/hll_rcon_tool_bad
.
Delete a backup
[!TIP] We advise to keep it, as you want to have it handy in case of major failure of the running version.
rm -r /root/hll_rcon_tool_backup_XXXX-XX-XX
Delete the "bad" version
rm -r /root/hll_rcon_tool_backup_bad