Configure periodic backups
Learn how to configure automatic periodic backups.
You can configure ThoughtSpot to backup automatically at specified times. The policy allows you to control the type, frequency, retention periods (first-in-first-out), and output location for a periodic backup.
A periodic backup uses the same steps as creating a backup manually. However, you do not have to specify a snapshot name. The system uses the most recent snapshot. You can back up to a local file system, mount a NAS (network attached storage) file system to hold the backup, or back up to an S3 bucket. A NAS file system is recommended. Make sure you have adequate space to store the number of backups you want to archive.
This is the format for a backup policy.
Note that the command populates several parameters with their defaults.
STANDALONE, and the
You can change the
storage_type, and you must specify a
directory and a
The longest possible backup schedule you can configure is one week. This configuration should be entered as:
ThoughtSpot does not generate an error for periods greater than seven days, but the snapshot will not be created.
mode: FULL | DATALESS | LIGHTWEIGHT
unit: MINUTE | HOUR | DAY
unit: MINUTE | HOUR | DAY
storage_type: NAS | LOCAL | S3
enabled: true (you only need this parameter if your storage_type is S3)
bucket_name: "your-S3-bucket-name-in-quotes" (You only need this parameter if your storage_type is S3. The bucket name must be in quotes.)
To periodically back up your cluster to an S3 bucket, specify
S3 for the
storage_type, and include the
Before creating a policy, make sure you have read Understand backup/snapshot schedules for information on configuring a
In addition, you must specify the following parameters:
Specify a name for your backup, so you can identify it later.
The backup mode.
The location on the disk to place the backup.
You specify an existing directory path, but the folder (the last part of the path:
The type of storage you are using.
Backups cannot start when another backup is still running.
Choose a reasonable frequency for the backup mode in your policy.
For example, a
FULL backup takes longer than a
Consider the load on the system when configuring.
Do not back up when the system would experience a heavy load.
For example, you may want to take
FULL backups late in the evening or on weekends.
The retention system deletes the oldest stored backup and the corresponding snapshot on a first-in-first-out basis (FIFO). This means that if you set a bucket retention of 1, the system stores a single backup at any one time. The system deletes the older backup after the new full backup is successful.
To configure periodic backups using the tscli:
Log in to the Linux shell using SSH.
$ ssh admin@<cluster-IP>
Find a directory with enough disk space to support the
retention_policy numberyou configure.
You can use
df -hto see free disk space and
tscli snapshot lsto view existing snapshots and their size on disk.
tscli backup-policy createcommand.
$ tscli backup-policy create
The command opens a
vieditor for you to configure the backup policy.
Write and save the file to store your configuration.
By default, newly created policies are automatically enabled. To disable a policy, use the
tscli backup-policy disablecommand.
The following table lists some additional backup commands you can use.
List present backup policies.
Show a backup policy.
Check the status of a policy.
Change an existing policy.
Disable or enable an existing policy.
Delete a policy
Finally, you can time a
crontab job with your periodic backup configuration to move a backup to longer term storage.
Simply create a
crontab job that moves the backup to a location outside of the
directory defined in the periodic schedule.