How to Back Up and Restore a Full CS 1.6 Server

June 4, 2026 Daemon666 8 min read 1 görüntülenme

Everything that makes your server yours — your configs, admin list, bans, ranks, plugins and custom maps — is a handful of files. The multi-gigabyte HLDS install is replaceable; those files are not. A proper backup lets you rebuild on a new VPS in minutes after a crash, a host failure, or a bad edit. This is exactly what to back up, how, and how to restore it without losing anything that matters.

1. Know what is irreplaceable versus reinstallable

Split your server into two buckets. Reinstallable: the base HLDS/ReHLDS engine and stock game files — you can re-download these any time with SteamCMD. Irreplaceable: your configuration and accumulated state. Only the second bucket needs backing up, which keeps the archive small — typically a few megabytes rather than the multi-gigabyte engine tree. The irreplaceable files all live in a few known places under cstrike/, so a targeted backup is both smaller and faster to restore than imaging the whole install.

2. The files that hold your server's identity

  • cstrike/server.cfg and any config it execs — your cvars, hostname, rcon; see server.cfg.
  • cstrike/mapcycle.txt and cstrike/maps/ — your rotation and any custom .bsp/.res files.
  • cstrike/addons/amxmodx/configs/users.ini (admins), plugins.ini, modules.ini, amxx.cfg.
  • cstrike/addons/amxmodx/plugins/ — your compiled .amxx plugins.
  • cstrike/addons/amxmodx/data/ — ranks (csstats.dat) and any plugin vault/nvault data.
  • The engine ban files — banned_user.cfg and listip.cfg (names vary by build).

These are the same paths covered in backing up configs, bans and stats; here we archive the whole set for a full rebuild.

3. Archive it in one command

Stop or pause writes for a clean snapshot if you can (a running server rewrites csstats.dat and ban files), then tar the important trees with the date in the filename:

cd /home/cs/hlds/cstrike
tar czf ~/csbackup_$(date +%F).tar.gz \
  server.cfg mapcycle.txt maps \
  addons/amxmodx/configs addons/amxmodx/plugins addons/amxmodx/data \
  banned_user.cfg listip.cfg

Copy the resulting archive off the server — a backup that lives only on the box you are protecting against is not a backup. Pull it to your own machine or a separate host. Automate it with the same cron mechanism used for restarts so a fresh archive is made daily.

4. If you use MySQL, dump the database too

SQL-backed ranks, bans or VIP live in a MySQL database, not in files, so the tar above misses them entirely. Dump the database separately:

mysqldump -u csuser -p amxbans_db > ~/csdb_$(date +%F).sql

Store the .sql alongside the tarball. Restoring the files but forgetting the database is the classic "my bans and ranks are gone" mistake after a migration.

5. Restore onto a fresh box

On the new server: install the base engine and AMX Mod X first (SteamCMD + AMX Mod X) so the directory structure exists, then unpack your archive over it:

cd /home/cs/hlds/cstrike
tar xzf ~/csbackup_2026-07-15.tar.gz

Import the database dump if you have one (mysql ... < csdb_....sql), then fix the two things that change on a new box: the server's IP/port in any config that hard-codes it, and file ownership so the game user can write to data/ and the ban files. A restored server that cannot write data/ loses every new rank and ban on the next map.

Common errors

  • Ranks/bans reset after restore — wrong ownership on addons/amxmodx/data/ or the ban files, so the server cannot write them. Fix the directory ownership.
  • SQL bans and ranks gone — you tarred the files but never dumped the MySQL database. Restore the .sql too.
  • Plugins fail to load after restore — the new box is missing a module or the 32-bit libraries. See the AMX Mod X not-loading checklist.
  • Server not visible after migration — a config hard-codes the old IP, or the firewall is closed. Update the IP and open the ports.
  • Corrupt csstats.dat — you archived it mid-write. Pause the server or stop it before the snapshot for a clean copy.

Verification

Do a real restore test, not a hopeful one: unpack your backup into a fresh install on a spare box or locally, start it, and confirm the hostname, admin access (amx_who shows you with your flags), a known ban still present in listid, and your rank intact via say /rank. If all four survived, the backup is complete and your restore procedure works. Then check the archive actually exists off-site — open it from your own machine. A backup you have restored once is a backup you can trust when the box actually dies.

Katkıda bulunanlar: Daemon666 ✦
Paylaş: