Cloning an Environment

Servd's clone environment tool lets you copy over data and config from one environment to another (e.g. from staging to production).

Tip: It can help a bunch once your project is all set up on staging and ready to be pushed to production.

Cloning from Staging, Development and Production #

Here are a few steps for cloning environments that are hosted on Servd:

  1. Go to your project's staging or production import pages. The page you visit determines which environment is your "target" environment. I.e. if you want to clone into your staging environment, visit the staging page, and likewise for production.

  2. In the "Clone From Environment" section, select the environment you want to import from, i.e. your "source" environment.

  3. Select one or more of the import options:

    • Import assets - Sync all assets stored in your source environment's directory on the Servd CDN with the target environment directory. Note: this will delete any assets in the target directory that aren't present in the source directory.
    • Import database - Replace the target environment database with the contents of the source environment database.
    • Import and deploy selected bundle - Take the bundle currently live on your source environment and deploy it to your target environment.
    • Import new environment variables - Copy environment variables whose keys are present in the source environment, but not the target environment.
  4. Click the "Submit" button.

  5. Wait for the import to complete.

    For projects with large databases or a lot of assets, it's time to go make a coffee. This step can take a little while.

Cloning from Local #

Cloning data from local is a little different, mainly due to the fact Servd can't pull data from your personal dev environment.

If you use the Servd plugin to store your local assets on the Servd CDN, then the clone tool is able to copy assets that live in your local CDN directory over to any other environment CDN directory.

It's worth noting however, that if you have enabled the "Use Local Volumes During Dev" setting in your Servd plugin, the assets stored on your local machine will not be used by the clone. Only those stored in the local directory on the Servd CDN will be.