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 to make manual snapshots.

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

About manual snapshots

You must create a snapshot through the Admin Console or using tscli 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. You can delete a snapshot from the Admin Console.

ThughtSpot generates a snapshot in approximately 20 seconds, depending on the size of the cluster. To restore from a snapshot, contact ThoughtSpot Support.

Manage snapshots through the Admin Console

From the Admin Console, you can create manual snapshots, delete existing snapshots, and view the details for all your existing snapshots.

To manage or create snapshots using the Admin Console, navigate to the Admin Console by clicking on the Admin tab from the top navigation bar. Select Snapshot from the side navigation bar that appears.

Admin Console - Snapshot

You can view snapshot details, such as name, style (manual or periodic), status, and the date and time a snapshot was scheduled.

Create manual snapshots in the Admin Console

To create a manual snapshot in the Admin Console, follow these steps.

  1. Click Create at the upper left side of your screen.

  2. Specify a name and a time to live for the snapshot.
    If you do not want the system to delete the snapshot automatically after a specified number of days, enter -1 as the time to live.

    Specify parameters

  3. Click OK.

Delete snapshots in the Admin Console

To delete a snapshot in the Admin Console, follow these steps.

  1. Click on the snapshot you would like to delete.

  2. Select the more options menu icon next to the snapshot name.

  3. Click remove.

    Remove snapshot

Create a snapshot using tscli

To create a snapshot using tscli, follow these steps:

  1. Log in to the Linux shell using SSH.

  2. 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 specify ttl as 4, the system deletes the snapshot after four days.
     $ tscli snapshot create <name> <reason> <ttl>
    
  3. 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:

  1. Log in to the Linux shell using SSH.

     $ ssh admin@<cluster-IP>
    
  2. 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:

  1. Log in to the Linux shell using SSH.
     $ ssh admin@<cluster-IP>
    
  2. Enter tscli snapshot-policy update.
     $ 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 in to the Linux shell using SSH.
     $ ssh admin@<cluster-IP>
    
  2. Enter tscli snapshot-policy disable.
     $ tscli snapshot-policy disable
    

Enable the snapshot policy

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

  1. Log in to the Linux shell using SSH.
     $ ssh admin@<cluster-IP>
    
  2. Enter tscli snapshot-policy enable.
     $ tscli snapshot-policy disable