- Official Extension
-
-
Maintainer: ApostropheCMS (opens in new tab) - Last updated 7 months ago
- v1.2.3
-
-
- Pro License
- Assembly License
README
@apostrophecms-pro/sync
For our hosting customers
This module provides the underlying implementation of content sync via S3 and mongodb for Apostrophe single-site and multisite projects hosted by the ApostropheCMS team. See assembly-cloud-tools (for internal use) and assembly-cli (for customer use) for examples of how to leverage it. There is no need to use this module directly.
For self-hosted customers
For self-hosted customers with Apostrophe Pro and Assembly licenses, this module also provides the apostrophe-sync command, which allows access to the same content sync capabilities in a way that works outside of our hosting environment.
Self-hosted installation
Our hosting customers do not need this command and should not install it.
Self-hosted usage
⚠️ It is NOT possible to undo these operations. Use these commands with great care. In particular, think carefully before using
sync up.
Syncing content up to the remote, or down to your local workstation
First set the required environment variables:
Then you may use the commands in that same terminal:
Syncing content between two remote environments
"What does APOS_REMOTE_ENV do?"
In multisite projects, Apostrophe stores hostnames calculated to suit each deployed environment in separate
properties. Apostrophe determines which hostnames to use via the ENV environment variable which should
already be configured in your deployed environments. When syncing content between environments, this command needs to know the environment name in order to copy content from one set of properties to the other during the sync. If you are unclear on this part feel free to consult our team.
For those not using S3
Clients not using S3 may still leverage this module to sync databases. To skip the media sync, use:
Additional command line options
To skip the database sync, for instance because you already completed it but need to retry the S3 sync, you may use:
To skip syncing document content versions in order to save time during database sync, use:
⚠️
--skip-versionsdoes not leave out any necessary content for the live site, but does prevent rollback to earlier versions of a given document.