---
title: "Using the sync strategy"
date: "2024-12-30T16:11:02+00:00"
summary: "Learn how to use the sync strategy in Code Studio: set up, select a database, and import configuration for your Drupal project."
image:
type: "page"
url: "/acquia-cloud-platform/add-ons/code-studio/using-sync-strategy"
id: "bceb51a6-5671-4904-8ece-3477c12f7b15"
---

The following checklist lists the tasks for using the `sync` strategy:

**S.No.**

**Task**

1

[Set up the sync strategy](#section-setting-up-the-sync-strategy).

2

[Select a database](#section-selecting-a-database).

3

[Import database configuration](#section-importing-database-configuration).

### Setting up the sync strategy

To set up the `sync` strategy:

1.  Add the `ACQUIA_TASKS_SETUP_DRUPAL_STRATEGY` environment variable in Code Studio.
2.  Set the value of the environment variable to `sync`.

### Selecting a database

The Code Studio pipeline copies an existing database from a Cloud Platform environment. By default, Code Studio copies the latest backup of the first database from your production environment into the pipeline.

To select a different Cloud Platform environment for copying the database:

1.  Add the `ACQUIA_CLOUD_SOURCE_ENVIRONMENT_ID` environment variable in Code Studio.

For example, `myapp.dev, 14-0c7e79ab-1c4a-424e-8446-76ae8be7e851`.

2.  Set the value of the environment variable to the environment alias or UUID of the environment from which you want to copy the database.

To select a different database to copy:

1.  Add the `ACQUIA_CLOUD_SOURCE_DATABASE_NAME` environment variable in Code Studio.
2.  Set the value of the environment variable to the name of the database you want to copy.

### Importing database configuration

After the database is created, Code Studio imports your database configuration depending on the value you set for the `ACQUIA_TASKS_SETUP_DRUPAL_CONFIG_IMPORT` environment variable. The default value is `true`.

If you add the  `ACQUIA_TASKS_SETUP_DRUPAL_CONFIG_IMPORT`  environment variable in Code Studio, ensure that it is set to `true`.

Note

If you set `ACQUIA_TASKS_SETUP_DRUPAL_CONFIG_IMPORT` to `false`, Code Studio does not import the configuration.