Create a Snapshot for Use with Namespaced Scratch Orgs
While you can’t use a namespaced scratch org to create a snapshot, you can create a namespaced scratch org from a snapshot. That way, you can deploy namespaced metadata to the scratch org. Snapshots are intended to include only dependent packages, metadata, and test data.
-
Create and register the namespace in the Dev Hub org and add it to the sfdx-project.json file.
-
When you create the scratch org that you plan to use as the source of the snapshot, be sure to indicate the
--no-namespaceflag. -
Create a scratch org based on the snapshot.
The resulting scratch org has a namespace, which means that any unpackaged metadata from the snapshot is now namespaced in the resulting scratch org.
See Also