Newer Version Available
Create a Scratch Org Snapshot
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.
- Be sure that non-admin users have the proper permissions to use scratch orgs and snapshots. See Assign a License and Permissions to Snapshot Users for details.
A snapshot captures the state of a scratch org at a point in time. To update your snapshot, delete it and create another 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 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 of Dev Hub org> --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 2023-12-21To check the status of the request, see Manage and Maintain Your Snapshots.