Back Up Redis Database on Arma 3 Epoch Server
This guide walks you through backing up the Redis database for an Arma 3 Epoch server. Redis stores player inventories, base building data, and server settings. A proper backup lets you restore your server after a crash, rollback griefing, or migrate to new hardware. You’ll need file access to the server (via FTP, SSH, or a host control panel) and a basic understanding of your server’s file structure.
What You’ll Need
- Access to the server’s file system (FTP, SSH, or host panel file manager)
- Redis installed on the server (usually included with the Epoch server package)
- Ability to run commands on the server (SSH or a command line from the host panel)
- Enough free disk space to store the backup file (typically a few MB to GB depending on player count)
Step-by-Step
- Stop the Arma 3 server – The safest way to back up Redis is to stop the server first. This prevents new writes during the backup. If you’re using a host panel, use the “Stop” button. If you have SSH access, run:
kill -9 $(pgrep -f arma3server)(replace with your server process name if different). - Locate the Redis data directory – By default, Redis stores its snapshot file (dump.rdb) in the directory where Redis was started, often
/root/redisor/home/epoch/redis. You can confirm by runningredis-cli CONFIG GET dirandredis-cli CONFIG GET dbfilenamefrom the server’s command line. - Create a backup folder – On the server, create a directory to hold backups, e.g.,
mkdir -p /backups/epoch. - Copy the dump.rdb file – Copy the Redis snapshot to the backup folder:
cp /path/to/redis/dump.rdb /backups/epoch/dump_$(date +%Y%m%d_%H%M%S).rdb. Using a timestamp in the filename helps you keep multiple backups. - Optionally use Redis BGSAVE – If you cannot stop the server, you can force Redis to save a snapshot without stopping it. Run
redis-cli BGSAVE– this creates a background save. Wait a few seconds, then check withredis-cli LASTSAVEto ensure the save completed. Then copy the dump.rdb as in step 4. - Verify the backup file – Check that the file size is reasonable (not 0 bytes) and, if possible, test loading it on a test instance before relying on it.
- Restart the Arma 3 server – After the backup is complete, start the server again using your normal method (host panel or command line).
- Store the backup offsite – For extra safety, download the backup to your local machine or a cloud storage service. This protects against hardware failure on the server.
Common Mistakes
- Backing up while the server is running without using BGSAVE – this can result in a corrupted dump.rdb file.
- Not stopping the server before copying the file – if the server writes to Redis during the copy, the backup may be inconsistent.
- Forgetting to include the Redis AOF file if appendonly is enabled – if you use AOF, you need to back up both dump.rdb and the appendonly.aof file.
- Only keeping one backup – if that backup is corrupted or lost, you have nothing to fall back on.
- Copying the file to the same disk as the original – if the disk fails, you lose both.
Tips
- Schedule automatic backups using cron (Linux) or Task Scheduler (Windows) to run daily or weekly.
- Use Redis’s built-in replication to a secondary server as a real-time backup.
- Test your backup by restoring it to a test server before you need it in an emergency.
- Keep at least 3 backups: the latest, the previous day, and one from a week ago.
- If your server uses a custom Redis config, note the dbfilename – it might not be the default dump.rdb.
Troubleshooting
- Backup file is 0 bytes or very small – The server may have been writing to Redis during the copy. Stop the server and try again, or use BGSAVE and wait for it to finish.
- Cannot find dump.rdb – Run
redis-cli CONFIG GET dirandredis-cli CONFIG GET dbfilenameto see the exact path and filename. Also check if appendonly is enabled – then the data is in appendonly.aof. - Redis won’t start after restore – The backup may be corrupted or from a different Redis version. Try running
redis-check-rdb dump.rdbto validate the file. If it fails, you may need to use an older backup. - Server loses data after restore – Ensure you restored the correct file and that the server was stopped during the restore. Also check that the Redis data directory permissions allow the Redis process to read the file.
- BGSAVE fails with “ERR” – Check disk space and permissions. Run
redis-cli INFO persistenceto see the last save status.
Frequently Asked Questions
How often should I back up the Redis database?
For a busy server, daily backups are recommended. If you have many players, consider every 6 hours. Weekly is the absolute minimum.
Can I back up Redis while the Arma 3 server is running?
Yes, but only using BGSAVE. Do not copy dump.rdb directly while the server is running without forcing a save – you risk corruption.
What is the difference between dump.rdb and appendonly.aof?
dump.rdb is a point-in-time snapshot. appendonly.aof logs every write operation. If you have AOF enabled, Redis can replay that log to reconstruct data. For a full backup, you should back up both.
How do I restore a Redis backup?
Stop the server, replace the current dump.rdb with your backup file, and restart Redis. Make sure the file permissions are correct (usually owned by the same user that runs Redis).
Can I use a Redis backup from a different server?
Yes, as long as the Redis version is compatible (major version should match). It’s best to test on a staging server first.
Where does Redis store its data on a typical Epoch server?
Usually in the same directory as the Redis executable, often /root/redis or /home/epoch/redis. Check your server’s configuration to be sure.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.