Backup persistent server data
If you have defined persistent data for your server, you can create a backup of the data to protect it from accidental loss. Backups are stored securely and can be restored at any time. You can also download a backup to your local machine for safekeeping or to run a local copy of your server for testing.
Overview
The backup
command allows you to create a backup of a server in your account. Backups are created from all folders
defined as persistent data in the server configuration. You can create a backup of a server at any time.
When you create a backup, the server will be paused for a short time while the backup is created. This will cause a brief interruption in service for your players. The same is true when you restore a backup. At the moment only one backup can be created at a time. The latest backup will overwrite the previous one.
Creating a backup
To create a backup of a server, use the following command:
odin fleet servers backup create [--server-id=<server-id>] [--name=<name>]
Flags
--server-id
: The ID of the server to create a backup for. If not provided, you will be prompted to select a server.--name
: The name of the backup. If not provided, you will be prompted to enter a name.
Restoring a backup
To restore a backup of a server, use the following command:
odin fleet servers backup restore [--server-id=<server-id>]
Flags
--server-id
: The ID of the server to restore a backup for. If not provided, you will be prompted to select a server.
Downloading a backup
To download a backup of a server, use the following command to receive a download link:
odin fleet servers backup download-url [--server-id=<server-id>]
You will receive a download link as a text that you can use to download the backup to your local machine.
Global Flags
The following flags can be used with any ODIN CLI command:
--api-key=<string>
The API key to use for authentication. If omitted, the CLI will use the api-key stored in the configuration file on your system. Use odin login to store the API key for subsequent commands.--app-id=<string>
The ID of the app to use for the command. If omitted, the CLI will use the currently selected app. Use odin apps select to select an app interactively.--format=<string>
The output format to use for the command. Supported formats arejson
,value
,flattened
andtable
. If omitted, the CLI will use the default format specified in the configuration file. Learn more about output formatting.--force
Forces the command to execute without prompting for confirmation. Use with caution.--quiet
Suppresses all informational output except for errors. Useful for scripting and automation.