org create snapshot
Create a snapshot of a scratch org.
A snapshot is a point-in-time copy of a scratch org. The copy is referenced by its unique name in a scratch org definition file.
Use “sf org get snapshot” to get details, including status, about a snapshot creation request.
To create a scratch org from a snapshot, include the “snapshot” option (instead of “edition”) in the scratch org definition file and set it to the name of the snapshot. Then use “sf org create scratch” to create the scratch org.
force:org:snapshot:create
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
‑‑api‑version | N/A | Type: Value Override the api version used for api requests made by this command |
‑‑description | ‑d | Type: Value Description of snapshot. Use this description to document the contents of the snapshot. We suggest that you include a reference point, such as a version control system tag or commit ID. |
‑‑flags‑dir | N/A | Type: Value Import flag values from a directory. |
‑‑json | N/A | Type: Boolean Format output as json. |
‑‑name | ‑n | Type: Value Required Unique name of snapshot. |
‑‑source‑org | ‑o | Type: Value Required ID or locally authenticated username or alias of scratch org to snapshot. |
‑‑target‑dev‑hub | ‑v | Type: Value Required Username or alias of the Dev Hub org. Not required if the target-dev-hub configuration variable is already set. |
Create a snapshot called “Dependencies” using the source scratch org ID and your default Dev Hub org:
Create a snapshot called “NightlyBranch” using the source scratch org username and a Dev Hub org with alias NightlyDevHub: