Implementing automated backups is crucial for safeguarding your Counter-Strike 2 server data, ensuring that you can quickly restore settings and progress in the event of unexpected issues.
📌 Prerequisites
-
A Counter-Strike 2 server purchased at VolticHost.com
-
Access to VolticHost Game Panel
-
Basic scripting knowledge and familiarity with scheduled tasks
1️⃣ Creating a Backup Script
-
Log in to VolticHost Game Panel.
-
Click on your Counter-Strike 2 server.
-
Navigate to the File Manager.
-
Create a new file named
backup.sh
in the root directory of your server. -
Insert the following script into the file:
#!/bin/bash TIMESTAMP=$(date +"%Y%m%d_%H%M%S") BACKUP_DIR="backups" mkdir -p $BACKUP_DIR tar -czf $BACKUP_DIR/CS2_backup_$TIMESTAMP.tar.gz ./csgo/cfg ./csgo/addons
-
Click Save File and ensure the file permissions allow execution (e.g.,
chmod +x backup.sh
).
✅ Backup script created and configured!
2️⃣ Scheduling the Backup Script with Cron
-
Navigate to the Scheduled Tasks section in VolticHost Game Panel.
-
Click Create New Task and select Custom Command as the task type.
-
Enter the command to execute your script, for example:
./backup.sh
-
Set the schedule according to your preference (e.g., daily at 2:00 AM).
-
Click Save Task to confirm the scheduling.
✅ Backup script scheduled to run automatically!
3️⃣ Verifying and Restoring Backups
-
After the scheduled task runs, navigate to the File Manager and open the
backups
directory. -
Verify that a backup file with the current timestamp has been created.
-
To restore, simply extract the desired backup archive into the appropriate server directories.
✅ Backup verification completed – your CS2 server backups are in place!
🎉 Conclusion
You've successfully automated scheduled backups for your CS2 server using VolticHost Game Panel, ensuring that your server data is protected and can be easily restored if needed. 🚀
For more assistance, contact VolticHost Support.