Backups and the database on a RedM server
By Benjamin D. · PDG
· 2 min read

Contents
On a RedM server the most valuable part is the database. Player characters, property and history live there — and that is exactly what gets forgotten.
Three things to copy
The database, the resources folder and the configuration file. All three are needed: one alone does not restore a working server.
The database comes first
Resources can be downloaded again and configuration rewritten. Player characters cannot: they represent dozens of hours of play.
Why one copy is not enough
Database damage is rarely noticed the same day. Missing property is found later, and keeping only the latest copy means keeping the damaged one.
How many generations to keep
A week of daily copies and a month of weekly ones is a sensible minimum for an RP server.
Where to store them
A copy on the same machine protects against mistakes, not against losing the machine. At least one copy elsewhere is a hard minimum here.
The copy must be consistent
Copying files from under a running database often produces a broken copy. The right method is the database's own export tool.
Before every resource change
A resource that alters the database structure can damage existing data. A copy beforehand is the cheapest insurance available.
Stop the server cleanly
The database only finishes its pending operations on a proper shutdown.
Test the restore
A copy that has never been restored is an assumption. One attempt on a separate database is the only way to be sure.
What happens without a copy
A lost database means every character and all property. On an RP server that is a community event, not a technical one.
Check the copies appear
A configured schedule and a working schedule are two different things.
Most of what precedes is a matter of organisation rather than technique: the decisions are made before you start, the backups have to actually run, and the rules are written while nothing has gone wrong yet. Our RedM server hosting takes on the part there is no reason to do by hand — automatic backups, a database and instant setup, along with a panel where settings, files, mods and restarts are handled without ever opening a command line.
