backup command allows the creation of
.tar.gz archives of a game server. This can be used to transfer a game server to another Linux server, to backup the game server before a risky change, to save the current state of the game server.
[email protected]:~$ ./mumbleserver b[ INFO ] Backup mumble-server: A total of 34M will be compressed into the following backup:/home/mumbleserver/backups/mumble-server-2016-10-28-194346.tar.gzWarning! mumble-server will be stopped during the backup.[ OK ] Stopping mumble-server: Mumble Port 64738[ OK ] Backup mumble-server: Backup created: mumble-server-2016-10-28-194346.tar.gz is 36M size
Alter these three settings by editing LinuxGSM config.
Set the maximum number of backups with
maxbackups. If the number of backups exceeds this value, the oldest backup will be removed after a successful backup.
Set the maximum age of a backup using
maxbackupdays. Any backups older than X days will be removed after a successful backup.
Set if the server should be stopped for a backup using
stoponbackup. If the server is running it will be stopped while the backup is running and started again once complete. This is useful to prevent any file changes during compression that could result in a corrupt or failed backup.
Automated backups can be set using cronjobs. It is recommended that frequently you backup and your retention policy to prevent your server is carefully considered to prevent storage issues.
0 5 * * * /home/username/gameserver backup > /dev/null 2>&1
By default backups are saved in the
├── home├── csgoserver├── ** backup **├── lgsm├── log├── serverfiles
./gameserver details to view information about created backups.
Backups===============================================================================No. of backups: 1Latest backup:date: Fri Jan 23 15:54:52 CET 2015file: /home/csgoserver/backups/csgo-server-2015-01-23-155447.tar.gzsize: 1.6GDisk Usage===============================================================================Disk available: 5.4GServerfiles: 1.6GBackups: 6.2G
Using the backup feature is not the only way to backup a game server. There are other methods that have more features are are more powerful than the basic LinuxGSM backup feature. Below are are few applications that can be used instead of, or with LinuxGSM backups.
rsync is one of the most common ways to backup. It is a remote sync tool that is created for sending files/directory's to another location. Particularly good for syncing to another server.
Is an incremental backup solution that allows backups to all sorts of different locations including many different cloud storage solutions like BackBlaze B2 and Amazon S3. Once configured it can be a powerful and efficient backup solution.
duplicity-backup.sh is a very useful bash wrapper to help automate duplicity.
rclone is similar to rsync however can easily sync to cloud storage solutions.