LogoLogo
  • Home
  • Getting Started
  • Configuration
    • LinuxGSM Config
    • Game Server Config
    • Start Parameters
    • cronjobs
    • Running on Boot
    • Running Multiple Game Servers
    • IP Address Configuration
    • LinuxGSM Stats
  • Commands
    • install
    • start-stop-restart
    • monitor
    • test-alert
    • console
    • debug
    • update
    • check-update
    • force-update
    • validate
    • update-lgsm
    • backup
    • map-compressor
    • details
    • mods
    • skeleton
    • fastdl
    • change-password
  • Game Servers
    • 7 Days to Die
    • Arma 3
    • ARK: Survival Evolved
    • Call of Duty 4
    • Dont Starve Together
    • Counter-Strike 2
    • Counter-Strike: Global Offensive
    • Factorio
    • Garry's Mod
    • Insurgency: SandStorm
    • Killing Floor 2
    • Minecraft: Java Edition
    • Multi Theft Auto
    • Rust
    • Sven Co-op
    • Trackmania Nations Forever / Trackmania United Forever
    • TeamSpeak 3
    • Unreal Tournament 99
    • Unreal Tournament 2004
    • Unreal Tournament 3
    • Valheim
    • Xonotic
    • The Front [WIP]
  • Networking
    • IP Address
    • Ports
    • Source Engine
  • Alerts
    • Discord
    • Email
    • IFTTT
    • Pushbullet
    • Pushover
    • Rocket.Chat
    • Slack
    • Telegram
  • Dependencies
    • Java
    • tmux
    • jq
    • gamedig
    • glibc
  • Features
    • ANSI Colors
    • Stop Mode
    • Log Management
    • Message Display Time
  • SteamCMD
    • Steam Master Server
    • Game Server Login Token
    • Branch
    • LAN Discovery
    • Workshop
    • Error Codes
  • Linux
    • distro
    • ftp-scp
    • file-ownership
    • firewalls
    • network-interfaces
    • permissions
    • Symlinking and ln command
  • Troubleshooting
  • FAQ
  • Guides
    • Security
    • Make Webserver Case Insensitive
    • Sourcemod and Metamod:Source
  • Other
    • server-migration
    • basic-usage
    • brand
Powered by GitBook
On this page
  • Commands
  • Example Output
  • Backup Settings
  • maxbackups
  • maxbackupdays
  • stoponbackup
  • Automated Backups
  • cronjob example
  • Backups Location
  • Checking Backups
  • Alternative Backup Methods
  • rsync
  • Duplicity
  • rclone
Edit on GitHub
Export as PDF
  1. Commands

backup

Previousupdate-lgsmNextmap-compressor

Last updated 1 year ago

The 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.

Each time a backup runs the whole game server will be backed up, this can take up significant storage space. Consider a backup policy to prevent your Linux server from running out of storage.

Commands

Standard: ./gameserver backup

Short: ./gameserver b

Example Output

mumbleserver@game:~$ ./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.gz
Warning! 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

Backup Settings

Alter these three settings by editing .

maxbackups

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.

maxbackups="4"

Setting the value to 0 will prevent any backups from being saved, including the one just created.

maxbackupdays

Set the maximum age of a backup using maxbackupdays. Any backups older than X days will be removed after a successful backup.

maxbackupdays="30"

Setting the value to 0 will retain the backup for 24 hours.

stoponbackup

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.

stoponbackup="on"

Automated Backups

cronjob example

crontab -e
0 5 * * *  /home/username/gameserver backup > /dev/null 2>&1

Backups Location

By default backups are saved in the backup directory.

├── home
├── csgoserver
    ├── ** backup **       
    ├── lgsm
    ├── log       
    ├── serverfiles
backupdir="${lgsmdir}/backup"

Checking Backups

Use ./gameserver details to view information about created backups.

Backups
===============================================================================
No. of backups:    1
Latest backup:
    date:          Fri Jan 23 15:54:52 CET 2015
    file:          /home/csgoserver/backups/csgo-server-2015-01-23-155447.tar.gz
    size:          1.6G

Disk Usage
===============================================================================
Disk available:  5.4G
Serverfiles:     1.6G
Backups:         6.2G

Alternative Backup Methods

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

Duplicity

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

duplicity-backup.sh is a very useful bash wrapper to help automate duplicity.

rclone

Automated backups can be set using . It is recommended that frequently you backup and your retention policy to prevent your server is carefully considered to prevent storage issues.

see

You can change this using the and the property backupdir.

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 similar to rsync however can easily sync to cloud storage solutions.

LinuxGSM config
cronjobs
cronjobs
configuration file
rsync
rclone
Introduction to rsyncLinode Guides & Tutorials
duplicity: Main
Logo
GitHub - zertrin/duplicity-backup.sh: Bash wrapper script for automated backups with duplicity supporting Amazon's S3 online storage as well as other storage destinations (ftp, rsync, sftp, local storage...).GitHub
Rclone
Logo
Logo