A snapshot is a point-in-time image of your running cluster. You can use a snapshot to restore the cluster to a specific point in time. In this section, we describe how to work with the default snapshot configuration that is enabled on every cluster, and how make manual snapshots.

To work with snapshots, use the tscli command line interface.

Create a manual snapshot

You must create a snapshot before making any changes to the 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 the tscli, follow these steps:

  1. Log into the Linux shell using SSH.

  2. Create a snapshot, specifying its name and the reason for creating it.

    Note that snapshot names must not exceed 44 characters.

     $ tscli snapshot create <name> <reason> <ttl>
    
  3. Check that the snapshot was created successfully by checking the directory listing:

     $ tscli snapshot ls
    

Configure periodic snapshots with snapshot policy

Each ThoughtSpot cluster automatically makes 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 change this policy.

View snapshot policy

To view your current periodic snapshot policy, follow these steps:

  1. Log into the Linux shell using SSH.
  2. Enter tscli snapshot-policy show 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:

  1. Log in to the Linux shell using SSH.
  2. Enter tscli snapshot-policy update.
  3. 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:

  1. Log into the Linux shell using SSH.
  2. Enter tscli snapshot-policy disable.

Enable the snapshot policy

To enable a specific periodic snapshot policy, follow these steps:

  1. Log into the Linux shell using SSH.
  2. Enter tscli snapshot-policy enable.