A snapshot is a timestamped image of your live cluster that you can use to restore that cluster. This article describes how to work with the default snapshot configuration of your cluster, and how to 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 creates a snapshot in approximately 20 seconds, depending on the size of the cluster. To restore from a snapshot, contact ThoughtSpot Support.

Using tscli

To create a snapshot using the tscli, follow these steps:

  1. Log into the Linux shell using SSH.
  2. Create a snapshot, specifing 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:

     $ tscli snapshot ls
    

Configure periodic snapshots

Each ThoughtSpot cluster automatically makes periodic snapshots based on its default snapshot policy. You can change this policy. <!–### Using Management Console

The default snapshot policy is enabled for every cluster. You can update the current policy for periodic snapshots.

Update the snapshot policy

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

  1. Log into ThoughtSpot from a browser.
  2. Click the Admin menu on the top navigation bar.

    This opens the ThoughtSpot Management Console.

  3. Navigate to Settings » Snapshot. This opens the Snapshot list panel.

  4. In the Snapshot list panel, click the Configure Snapshot Policy option.

  5. Update the snapshot policy details:

    Field Description
    Snapshot Policy Specify Enabled or Disabled.
    Period Specify the frequency of the chosen unit of time: Minutes, Hours, or Days.
    Retention Policy Specify the retention intervals in the chosen unit of time: Minutes, Hours, or Days. Retention is on a first-in-first-out (FIFO) basis, discarding the oldest results first.
    Capacity Specify how many backups (snapshots) the system retains for each retention bucket.
    Add Retention Policy To use multiple retention buckets with different retention policies, use this option to specify multiple policies.
  6. Click Save to update the snapshot policy. –>

Using tscli

The default snapshot policy is enabled for every cluster. You can display the current policy for periodic snapshots.

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.