To work with snapshots, use the tscli
command line interface.
Create a manual snapshot
You must create a snapshot before making any changes to your cluster’s environment, loading a large amount of data, or changing the structure of a table. ThoughtSpot supports up to 20 manual snapshots. You must clear them to create new snapshots. To delete a snapshot, contact ThoughtSpot Support.
ThughtSpot generates a snapshot in approximately 20 seconds, depending on the size of the cluster. To restore from a snapshot, contact ThoughtSpot Support.
Create a snapshot using tscli
To create a snapshot using tscli
, follow these steps:
-
Log in to the Linux shell using SSH.
-
Create a snapshot with the command
tscli snapshot create
, specifying the following parameters:name
: Specify a name for the snapshot. Note that snapshot names must not exceed 44 characters.reason
: Specify a reason for creating the snapshot.ttl
: Specify the snapshot’s time to live, in days. If you specifyttl
as4
, the system deletes the snapshot after four days.
$ tscli snapshot create <name> <reason> <ttl>
-
Check that the snapshot was created successfully by checking the directory listing:
$ tscli snapshot ls
Your snapshot should appear in the list of snapshots that
tscli snapshot ls
generates.
Configure periodic snapshots with snapshot policy
Each ThoughtSpot cluster automatically creates periodic snapshots, based on its default snapshot policy. The default snapshot policy is enabled for every cluster. You can display the current policy for periodic snapshots. You can also change this policy.
View snapshot policy
To view your current periodic snapshot policy, follow these steps:
-
Log in to the Linux shell using SSH.
$ ssh admin@<cluster-IP>
-
Enter
tscli snapshot-policy show <name>
command to view the policy.
In the following example, the policy starts at midnight on Sunday. It retains the snapshots from the previous three 4-hour intervals, and two snapshots from two of the previous 4-hour intervals. Here, ThoughtSpot retains 7 periodic snapshots overall. For detailed information about understanding the schedule, see Understand backup/snapshot schedules.
$ tscli snapshot-policy show
schedule {
period {
number: 1
unit: HOUR
}
retention_policy {
bucket {
time {
number: 1
unit: HOUR
}
capacity: 3
}
bucket {
time {
number: 4
unit: HOUR
}
capacity: 4
}
bucket {
time {
number: 1
unit: DAY
}
capacity: 4
}
bucket {
time {
number: 1
unit: WEEK
}
capacity: 2
}
}
offset_minutes_from_sunday_midnight: 0
}
enabled: true
Update the snapshot policy
Do not change the default policy, unless it is recommended by ThoughtSpot Support.
To update your current periodic snapshot policy, follow these steps:
- Log in to the Linux shell using SSH.
$ ssh admin@<cluster-IP>
- Enter
tscli snapshot-policy update
.$ tscli snapshot-policy update
- In the editor, make changes to the current policy, and save them.
You cannot delete the snapshot policy. However, you can either disable or enable it.
Disable the snapshot policy
To disable your current periodic snapshot policy, follow these steps:
- Log in to the Linux shell using SSH.
$ ssh admin@<cluster-IP>
- Enter
tscli snapshot-policy disable
.$ tscli snapshot-policy disable
Enable the snapshot policy
To enable a specific periodic snapshot policy, follow these steps:
- Log in to the Linux shell using SSH.
$ ssh admin@<cluster-IP>
- Enter
tscli snapshot-policy enable
.$ tscli snapshot-policy disable