How to Back Up a FiveM Server
How to protect your server data from loss
Regular backups are the most important security measure for any server owner. In case of errors or hacks, you can restore your server in minutes.
- 1Step 1
Stop the Server
Make sure to stop the server completely before starting the backup process to ensure file integrity.
- 2Step 2
Backup Resources
Compress the 'resources' folder and 'server.cfg' file and save them in a safe place (your PC or cloud storage).
- 3Step 3
Export Database
Access phpMyAdmin or your database tool, select the server database, and click 'Export' to save the .sql file.
# Linux: database and resources, dated mysqldump -u root -p fivem > fivem-$(date +%F).sql tar -czf resources-$(date +%F).tar.gz resources/ - 4Step 4
Schedule Auto Backup
In our hosting panel, you can set up daily or weekly automatic backups to save time and effort.
Backup Tips
- Keep at least 3 copies: one on server, one on PC, and one in cloud.
- Name backup files with dates (e.g., backup-2024-01-01).
- Test restoring backups periodically to ensure they work.
- Never share backup files as they contain sensitive data.
Frequently asked questions
What should a FiveM server backup include?
The resources folder, server.cfg, the txData folder if you use txAdmin, and an export of the MySQL or MariaDB database. The database holds players, money and inventories, so it matters most.
How often should I back up?
Export the database every day and copy the full server files at least once a week, plus right before any big update or framework change.
Where should I keep the backups?
Outside the server itself, for example on your PC or another storage service. A backup on the same disk is lost together with the server.
How do I restore a backup?
Stop the server, import the .sql file into an empty database, put the resources folder and server.cfg back, and start the server again. Test the restore once before you actually need it.
Run this guide on a ready server
Need a server for this guide? FiveM server hosting from SNG comes with txAdmin, OneSync and DDoS protection, and the SNG CDN for FiveM delivers your server files to players from inside Saudi Arabia.
Related FiveM guides
Need more storage space?
