Skip to main content

Clone On-Demand Sandboxes

Learning Objectives

  • Describe the key characteristics, inclusions, and exclusions of an on-demand sandbox clone.
  • Outline the four main progress stages and steps in the sandbox cloning process.
  • Perform a sandbox cloning operation by using the Control Center
  • Identify and update necessary custom configurations in a newly cloned sandbox.
  • Describe the three main cloning operations of the On-Demand Sandbox REST API.

On-demand sandbox cloning creates exact replicas of existing sandboxes in minutes. Teams move faster and reduce risk by working in fully isolated environments for development, testing, and operational workflows. Each cloned sandbox has dedicated compute, storage, and database resources.

Typical use cases involve reproducing production errors safely, validating disaster recovery plans, and providing realistic training environments.

Know What a Cloned Sandbox Includes and Excludes

A sandbox clone gives you a complete copy of the essential pieces of your environment. A clone includes:

  • Database schema and data
  • Custom code and cartridges
  • Storefront, site data, and configurations
  • Catalogs and pricebooks
  • Orders and content data
  • Feature switches
  • Maintenance pages
  • Standard platform configuration files

The cloning process excludes specific data to protect security, privacy, and tenant integrity. The excluded items involve:

  • Logs and jobs history
  • Customer PII and GDPR-related data
  • Analytics data
  • Geolocation data
  • Order activity
  • Exchange rate data
  • Change logs
  • Tenant-specific configurations

The system omits or transforms sensitive data to ensure compliance with platform security and privacy requirements.

Explore How Sandbox Cloning Works

The cloning process groups six detailed steps into four main progress stages.

  • Prep instance: Validates the source sandbox status, permissions, and resource availability.
  • Data backup: Creates a consistent snapshot of the source database, sharedata, and configurations.
  • Data restore: Allocates compute, storage, and network resources for the new sandbox. The system copies database tables, indexes, and files to the cloned environment. It then updates system files and credentials to ensure independence.
  • Post validation: Validates sandbox health, tests connectivity, and activates the clone.

To guarantee data integrity and configuration consistency, the source sandbox temporarily enters a protected stopped state. After cloning finishes, the source sandbox resumes normal operation. The total duration typically takes 10–30 minutes, depending on sandbox size and data volume.

Verify Prerequisites Before You Clone a Sandbox

Before you initiate a clone operation, verify these requirements.

  • Account Manager assigns you the Sandbox API User role with a tenant filter in the format <realm_id>_sbx.
  • The source sandbox possesses an active status.
  • The source sandbox operates in either a running or a stopped state.
  • The source sandbox has no pending operations.
  • Your account possesses permissions to access the source sandbox data.

Create and Manage a Cloned Sandbox in Control Center

Follow these steps to clone an existing on-demand sandbox using Control Center.

  1. Log in to Control Center.
  2. Select the realm where you plan to create the clone.
  3. Click the Clone button next to the instance that you intend to clone.
  4. Fill out the Clone On-Demand Sandbox form.
    • Time to live (TTL): Select the number of hours the cloned sandbox remains active. Options include 24 (the default and minimum limit), 48, 72, 168 (1 week), or 0 (infinite time).
    • Resource profile: Select the resource allocation (medium, large, x large, or xx large). The target profile requires the same size or a larger size than the source sandbox profile.
    • Notification emails: Enter one or more email addresses to receive notifications, or leave the Retain Email Addresses option selected to use the source sandbox's notification addresses.
  1. Click Clone Instance.

As the process begins, the source sandbox status changes to cloning. Control Center disables all actions (start, stop, reset, clone, and delete) for the source sandbox until cloning completes.

Manage and Monitor Your Clones

Track the progress of clone operations and view details about cloned sandboxes directly in Control Center. The target sandbox appears in the instance list with the status Setting Up. When setup finishes, the status updates to Running (if successful) or Failed.

Click the Clone badge next to the cloned instance to view specific details like the source and target instance identifiers, clone timestamp, storefront count, custom code version, database size, and file system size.

To review all clone operations associated with a specific sandbox, go to the Activity Timeline tab for that sandbox. This tab lists operations chronologically and shows a summary count of clones by status (Completed, Failed, and In Progress). Use the Filter & Search options to narrow results by date range or specific status.

After cloning finishes, test all integrations and update third-party endpoints or custom configurations that reference the source sandbox. When you no longer need a cloned sandbox, delete it to reduce credit consumption. Always save any open work before you trigger a clone operation, as the source sandbox stops during the process.

After a clone operation finishes, you update several items manually to ensure the new sandbox functions correctly. The system updates standard platform files automatically but leaves custom configurations unchanged. Review and adjust these custom settings to maintain a working environment.

Specifically, update these elements if they exist in your environment.

  • Custom tenant-specific configurations
  • Hard-coded URLs located within custom cartridges or scripts
  • Third-party service URLs and external API endpoints
  • Keystore references and custom certificates tied to the source sandbox
  • Custom jobs or schedules that reference the original source instance
  • Business Manager customizations

Clone Sandboxes with the REST API

You can clone sandboxes through the Commerce for B2C On-Demand Sandbox REST API. The clone API gives developers programmatic control over the creation, provisioning, and monitoring of cloned environments.

The Commerce for B2C On-Demand Sandbox REST API provides three specific operations for sandbox cloning.

Create a Clone

Initiate a clone operation using the POST endpoint. The request requires the unique sandboxId of the source sandbox and a targetProfile size of medium, large, xlarge, or xxlarge. The target profile requires a size equal to or greater than the source sandbox profile. Optional parameters include a list of notification emails and a TTL in hours. A successful request returns a 200 OK response with a cloneId to track the operation's status.

Monitor Sandbox Clone Operations

Track the progress of an active clone operation or retrieve details for a specific cloned sandbox. This request requires the source sandboxId and the specific cloneId. A successful 200 OK response returns details like the target instance ID, timestamps, elapsed time, progress percentage, and the current status (IN_PROGRESS, COMPLETED, or FAILED).

List All Clones

Fetch details for all clone operations associated with a specific source sandbox. This request requires the source sandboxId. You can filter the results by providing a fromDate, a toDate, or a specific status like Pending, InProgress, Failed, or Completed. The 200 OK response returns a comprehensive list of all associated clone operations and their respective details.

Access the documentation and issue API calls directly from the Sandbox API user interface at https://admin.dx.commercecloud.salesforce.com/ by authorizing with your API Client ID.

To learn more about cloning with the on-demand sandbox REST API, explore Clone On-Demand Sandboxes.

Wrap It Up

In this final unit, you explored how to clone an ODS, which creates exact replicas of an environment for development and testing—including the database, custom code, and configurations, while excluding sensitive data like PII and logs. You also learned how to perform these cloning operations using both the Control Center UI and the sandbox REST API.

Throughout this badge, you learned how to configure and manage ODS environments for fast ecommerce development and delivery. You also explored the fundamental differences between ODS and POD-based sandboxes, how to set up user roles and manage costs using the credit and TTL systems, and how to execute all sandbox lifecycle operations via the Sandbox API and Control Center.

Resources

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios