Newer Version Available

This content describes an older version of this product. View Latest

Create a Scratch Org Snapshot (Beta)

You can create a snapshot if the source scratch org wasn’t created using a snapshot or with a namespace. You can create up to 5 snapshots per Dev Hub daily, with a maximum of 5 active snapshots.

Before you begin:

  • Enable Dev Hub in your production org, or another org you use to create scratch orgs.
  • Enable Scratch Org Snapshots in the Dev Hub org.

A snapshot captures the state of a scratch org at a point in time. To update your snapshot, delete it and create a new snapshot. Unlike an org shape, a snapshot includes installed packages, metadata, and data. The time to create a snapshot depends on the size of the source scratch org. To speed up snapshot creation time, include only what’s absolutely necessary for your project.

Command syntax:

1sf org create snapshot --name <name> --source-org <ID or alias of scratch org> \
2--target-dev-hub <username or alias> --description <text>

A snapshot name can have a maximum length of 15 characters. It can contain only alphanumeric characters (no special characters or spaces, even if the name is surrounded by quotation marks during creation).

Example:

1sf org create snapshot --name dhsnapshot --source-org dreamhouse-scratch \
2--target-dev-hub my-dev-hub --description "Dreamhouse app"

Your request is initially InProgress:

1Name               Value      
2──────────────────  ──────────────────── 
3Id                  0Oo1Q0000004C93SXX   
4Snapshot Name       dhsnapshot           
5Description         Dreamhouse app       
6Status              InProgress           
7Source Org          00D050000004ipAEXX   
8Created Date        09/22/2023, 02:07 PM 
9Last Modified Date  09/22/2023, 02:07 PM 
10Expiration Date                         
11Last Cloned Date                        
12Last Cloned By Id