Skip to main content
Use sync to pull production data down to a local context for development, or to promote content between environments.

sync database

Copy the Drupal database from a source context to a target context. This backs up the database on the source, transfers the artifact, and imports it into the target. The command asks for confirmation before importing. Pass --yolo to skip the prompt in automation. Use --fresh to always take a new backup rather than reusing one from today.
sitectl drupal sync database
Aliases: db
FlagDefaultDescription
--backup-dir/tmp/sitectl-drupal-jobs/db-backupDirectory on the source host used to cache backup artifacts.
--freshfalseAlways take a fresh backup instead of reusing one from today.
--sourceSource sitectl context.
--targetTarget sitectl context.
--yolofalseSkip the confirmation prompt before importing.

sync config

Copy the Drupal configuration from a source context to a target context. This exports config as a tarball from the source, transfers it, and imports it on the target using drush cim.
sitectl drupal sync config
FlagDefaultDescription
--drupal-rootfsPath to the Drupal web root on the target, relative to the project directory.
--sourceSource sitectl context.
--targetTarget sitectl context.

Typical workflow

Pull the production database to your local context before starting a new feature:
sitectl drupal sync database --source prod --target local
After updating configuration locally, push it back up:
sitectl drupal sync config --source local --target stage