-
Notifications
You must be signed in to change notification settings - Fork 27
Syncing content between different databases
Puck has a Sync feature that lets you copy content from one database to another. if you click on the options for a content node in the content tree, Sync is one of the available options.
to use this feature, you will need to have an alternative database connection string in your Environment specific AppSettings.json
. so for example, if you're working in the Development
environment and you have a appSettings.Staging.json
with an alternative connection string (different database for staging) you will be able to sync content to that staging database.
a current limitation of this feature is that it will only work if the parent node of the content you're trying to sync already exists in the target database.
with this limitation in mind, the most obvious use case for this feature would be that you have a Staging
database that is a copy of the Production
database. you work on new features in the staging database and add new content. then, you can sync the new content from Staging
to Production
and because the Staging
database was a copy of the Production
database, the parent node will exist in both databases.
using this pattern, it's a good idea to copy the Production
database over to the Staging
database every time you begin work on new features.
note that after starting a sync, you can go back to the Sync
dialog and cancel any running syncs.