Content Hub includes several Drush commands for both normal product use and for more advanced administration. You can use the commands to administer your content from the command line. For more information about Drush, see Introduction to Drush.
Note
Drush versions 10.3.3 and later have enhanced queue handling that improves the export and import processes in Content Hub.
Drush commands |
Description |
Module version |
Drush 8.x compatible (CH 1.x only) |
Drush 9.x compatible |
Drush 10.x compatible |
Notes |
---|---|---|---|---|---|---|
Checks published entities and compares them with the publisher to ensure consistency |
1.x |
✓ |
✓ |
𐄂 |
Contains deprecated functions, therefore drush 10.x is incompatible |
|
Creates a manifest file of entities to import and delete |
1.x |
𐄂 |
✓ |
✓ |
||
Reads from the manifest file and executes user-specified changes on entities on the website |
1.x |
𐄂 |
✓ |
✓ |
||
Compares the CDF of an entity from a local source and a remote source, and prints the differences |
1.x |
✓ |
✓ |
✓ |
||
Adds entities to the import queue on a subscriber site based on the associated filters, except the default filter |
3.x, 2.x |
𐄂 |
✓ |
✓ |
||
Reindex all entities in Content Hub |
1.x |
✓ |
✓ |
✓ |
Use with caution: This command can remove content from Content Hub |
|
Delete all entities of a specified type from Content Hub, reindex, and then re-export the entities back to Content Hub |
1.x |
✓ |
✓ |
✓ |
Use with caution: This command can remove content from Content Hub |
|
Checks for stale content by comparing content published on subscribing websites with the original stored in Content Hub |
1.x |
✓ |
✓ |
✓ |
||
Log the size of the import and export queues to Drupal watchdog |
1.x |
✓ |
𐄂 |
𐄂 |
N/A |
|
Retrieves an entity from a local source or Content Hub |
2.x |
𐄂 |
✓ |
✓ |
||
Helper drush command for debugging |
2.x |
𐄂 |
✓ |
✓ |
||
Requires the location of a YAML |
2.x |
𐄂 |
✓ |
✓ |
||
Lists the details of a filter |
2.x |
𐄂 |
✓ |
✓ |
||
Lists available Cloud filters |
2.x |
𐄂 |
✓ |
✓ |
||
Attach a filter to the website |
2.x |
𐄂 |
✓ |
✓ |
||
Detach a filter from the website |
2.x |
𐄂 |
✓ |
✓ |
||
Imports entities from a CDF document |
2.x |
𐄂 |
✓ |
✓ |
||
Publisher upgrade command |
2.x |
𐄂 |
✓ |
✓ |
For 1.x to 2.x upgrades only. Do not run as a standalone command |
|
Subscriber upgrade command |
2.x |
𐄂 |
✓ |
✓ |
For 1.x to 2.x upgrades only. Do not run as a standalone command |
|
Assigns randomly generated |
2.x |
𐄂 |
✓ |
✓ |
Experimental: Use with caution |
|
Prints the CDF from a remote source (Content Hub) |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only |
|
Retrieves subscription settings stored in Content Hub |
3.x, 2.x |
𐄂 |
✓ |
✓ |
N/A |
|
Perform a webhook management operation |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only |
|
Performs a webhook interest list purge operation for the current site |
2.x |
✓ |
✓ |
✓ |
||
Connects a site with Content Hub |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only |
|
Deletes a single entity from the Content Hub |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only |
|
Disconnects a site with Content Hub |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only |
|
List entities from the Content Hub using the |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only |
|
Prints the content of the import/export queue |
3.x |
x |
✓ |
✓ |
||
Prints the CDF from a local source (Drupal website) |
2.x, 1.x |
✓ |
✓ |
𐄂 |
Drush 8.x version available for Content Hub 1.x only |
|
Purges all entities from Content Hub |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only; |
|
Regenerates the Shared Secret used for webhook verification |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only |
|
Restores the backup taken by a previous execution of the |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only; |
|
Updates the Shared Secret used for webhook verification |
2.x, 1.x |
✓ |
✓ |
✓ |
Drush 8.x version available for Content Hub 1.x only |
|
Audits an entity for differences with the existing CDF in Acquia Content Hub |
2.x |
𐄂 |
✓ |
✓ |
||
Gets Content Hub settings from the different providers and determines the active configuration |
2.x |
𐄂 |
✓ |
✓ |
||
Re-queues entities on publisher or subscriber site |
2.x |
𐄂 |
✓ |
✓ |
||
General Drush command returning other Content Hub - related results |
1.x |
✓ |
𐄂 |
𐄂 |
||
General Drush command accepting more Content Hub - related arguments |
1.x |
✓ |
𐄂 |
𐄂 |
||
General Drush command returning other Content Hub - related results |
2.x |
𐄂 |
✓ |
✓ |
||
General Drush command accepting more Content Hub - related arguments |
2.x |
𐄂 |
✓ |
✓ |
||
General Drush command accepting more Content Hub - related arguments |
2.x |
𐄂 |
✓ |
✓ |
If you have enabled Content Hub, but Drush commands fail with
the message Command [command_name] needs the following extension(s)
enabled to run: acquia_contenthub
, execute the following command
to try to resolve the issue:
drush en acquia_contenthub -y drush cr
If Drush commands for Content Hub continue to fail, create a Support ticket.
acquia:contenthub-audit-publisher
¶Checks published entities and compares them with what exists in the Content Hub publisher to ensure consistency
Alias |
Arguments |
---|---|
|
This command takes the following argument:
You can pass an array of options to process the data:
|
acquia:contenthub-audit-subscriber
¶Creates a manifest file of entities to import and delete by checking the filter configuration and verifying which entities from Content Hub matches those filters
Alias |
Arguments |
---|---|
|
This command takes the following arguments:
You can pass an array of options to process the data:
Note This command only gathers information about changes you can make to entities on your website. |
acquia:contenthub-audit-subscriber-execute-manifest
¶Reads from the manifest file created by the ach-as command and executes user-specified changes on entities on the website
Alias |
Arguments |
---|---|
|
This command takes the following arguments:
|
acquia:contenthub-compare
¶Compares the CDF of an entity from a local source and a remote source and prints the differences
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-enqueue-by-filters
¶Adds entities to the import queue on a subscriber site based on the associated filters, except the default filter.
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-reindex
¶(Developer only) Reindexes all entities in Content Hub
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-reset-entities
¶(Developer only): Deletes all entities and / or bundles of a specified type from Content Hub, reindexes, and then re-exports the entities or bundles back to Content Hub
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-status-check
¶Checks for stale content by comparing content published on subscribing websites with the original stored in Content Hub
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-watchdog-queue-sizes
¶Logs the size of the import and export queues to the Drupal watchdog log. (Content Hub 1.x only)
acquia:contenthub-entity
¶Retrieves an entity from a local source or Content Hub
Alias |
Arguments |
---|---|
|
|
acquia:contenthub:entity-scan:filter
¶This command takes an entity UUID and compares it against the existing Cloud Filters, returning a list of filters and sites that the entity matches.
Run --help
to review the help information of the command.
Option to --rebuild-cache
to initiate a depcalc cache rebuild using
the tracking table before running the scan. This may take a few minutes to
complete.
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-export-local-cdf
¶Requires the location of a YAML $manifest
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-filter-details
¶Lists the details of a filter.
Alias |
Arguments |
---|---|
|
This command takes the following argument:
|
acquia:contenthub-filters
¶Lists available Cloud filters.
Alias |
Arguments |
---|---|
|
You can pass an array of options to control the output:
|
acquia:contenthub-filters:attach
¶Attaches a filter to a website.
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-filters:detach
¶Detaches a filter from a website.
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-import-local-cdf
¶Imports entities from a CDF document
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-publisher-upgrade
¶Publisher upgrade command
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-subscriber-upgrade
¶Subscriber upgrade command
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-fix-config-entities-with-null-uuids
¶Assigns randomly generated UUIDs
to configuration entities with NULL
UUIDs
(Experimental: Use with caution)
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-remote
¶Prints the CDF from a remote source (Content Hub)
Alias |
Arguments |
---|---|
|
|
acquia:contenthub:remote-settings
¶Retrieves the account details from Content Hub and presents it in an easily readable, formatted table. Information includes the subscription ID, registered webhooks, registered clients, and webhook filter assignments.
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-webhooks
¶Performs a webhook management operation
Alias |
Arguments |
---|---|
|
|
acquia-contenthub-webhook-interests-purge
¶Deletes the current webhook and reassigns all existing filters of the current webhook to the newly created webhook. Webhook uuid changes so it must be updated in the configuration. If the configuration is saved in the database, no further action is needed. Otherwise, update the webhook in settings.php or environment variables depending on how the configuration is managed. This deletes everything from the import tracking table and the import queue.
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-connect-site
¶Connects client to Content Hub
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-delete
¶Deletes a single entity from Content Hub
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-disconnect-site
¶Disconnect the client from Content Hub
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-list
¶List content entities that exist in Content Hub
Alias |
Arguments |
---|---|
|
You can pass an array of options to control the output:
|
acquia:contenthub-list-queue-items
¶On publisher, the command prints the content of the acquia_contenthub_publish_export
queue.
On subscriber, the command prints the acquia_contenthub_subscriber_import
queue. If the
site has dual configuration, import/export value must pass the queue
option.
By default, the queue option will have an export
value.
Alias |
Arguments |
---|---|
|
You can pass an array of options to control the output:
|
acquia:contenthub-local
¶Prints an entity (in CDF format) from a local source (a Drupal website)
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-purge
¶(Developer only): Deletes all entities from Content Hub
Important
The ach-purge
command purges all entities from Acquia Content Hub.
You must run this command cautiously as it requires elevated permissions.
This command helps to recover from a disaster state where other
recovery steps fail. This requires re-exporting all entities that are
currently in the Content Hub service. Every subsequent execution of this
command will override the backup created by the previous call.
To remove content from a healthy subscription, use ach-del
.
Alias |
Arguments |
---|---|
|
|
When this command is run, a message like the following displays:
You are about to DROP all tables in your 'MY-WEBSITE' database. Do
you want to continue? (y/n):
You must confirm before Acquia Content Hub will purge the contents.
acquia:contenthub-regenerate-secret
¶Regenerates the shared secret used for webhook verification
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-restore
¶(Developer only): Restores the backup taken by a previous
execution of the purge
command
Alias |
Arguments |
---|---|
|
|
acquia:contenthub-update-secret
¶Updates the shared secret used for webhook verification
Alias |
Arguments |
---|---|
|
N/A |
acquia:contenthub-audit-entity
¶Audits an entity for differences with the existing CDF in Acquia Content Hub. It is
a publisher command, which is only available if the site has the acquia_contenthub_publisher
module enabled. It lists the entity and all its dependencies, and compares that data with
the one stored remotely in Content Hub. It provides the option to republish that entity
and all its dependencies if there are differences.
Alias |
Arguments |
---|---|
|
This command takes the following arguments:
|
acquia:contenthub-settings
¶Gets Content Hub settings from the different providers and determines the active configuration with any override information.
Alias |
Arguments |
---|---|
|
This command takes the following arguments:
|
acquia:contenthub-re-queue
¶Re-queues entities on publisher or subscriber. The command expects at least one option to be provided. Also, it does not run the export/import queues.
Alias |
Arguments |
---|---|
|
This command requires at least one of the following options:
|
queue-list
¶This command is not specific to Content Hub, but will return more results with it. See drush queue-list
Result |
Description |
---|---|
|
The number of items in the Content Hub webhook queue |
queue-run
¶This command is not specific to Content Hub. See drush queue-run.
Alias |
Arguments |
---|---|
|
Processes the queue of entities to export |
|
Processes the queue of entities to import |
|
Processes the remaining Content Hub webhook queue |
queue:list
¶This command is not specific to Content Hub, but will return more results with it.
Alias |
Arguments |
---|---|
|
Processes the Content Hub publish export |
|
Processes the Content Hub import from filters |
|
Processes the Content Hub import the subscriber |
queue:run
¶This command is not specific to Content Hub.
Alias |
Arguments |
---|---|
|
Processes the Content Hub publish export |
|
Processes the Content Hub import from filters |
|
Processes the Content Hub import the subscriber |