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.
If you have enabled Content Hub, but Drush commands fail with the message Command[command_name]needsthefollowingextension(s)enabledtorun:acquia_contenthub, execute the following command to try to resolve the issue:
Re-originates entities in Content Hub from one source to another. This deletes the original sources after recreation if they did not exist initially, unless the --no-origin-delete option is used.
Alias
Arguments
ach-reoriginate
origin_list: A comma-separated list of source origin UUIDs.
target: The target origin UUID.
--no-origin-delete: To keep the original sources after recreation if they did not exist initially.
--names: To delete the Acquia Content Hub Client using names.
--uuids: To delete the Acquia Content Hub Client using UUIDs.
--ignore-origin: To ignore the origin check when deleting the client CDF.
acquia:contenthub:client-update
Updates the Content Hub details.
Alias
Arguments
ach-cu(Content Hub 3.4.0 and later)
You can pass an array of options to process data:
--name new_name: To change the client name to new_name.
acquia:contenthub-webhook-interests-list
Displays the list of interest for the registered webhook.
Alias
Arguments
ach-wi-list (Content Hub 3.3.x and later)
You can pass an array of options to process data:
drush ach-wi-list --site-role=subscriber: To display list of interests for the current subscriber site in table format.
--webhoo-url=http://example.site: To display list of interest for specified webhook url and site role.
--uuid=fffbbc03-e748-473a-a5ca-cc1df2a2a744: To display the interest details of specified uuid.
--format-json: To display list of interests for the subscriber site in json format.
--reason=ab8902ff-3548-4861-bb95-a83c81fdaa40: To display list of interest list matching specified reason uuid.
--syndication-status=EXPORT-SUCCESSFUL: To display list of interests for the subscriber having EXPORT-SUCCESSFUL syndication status.
--disable-syndication=true: To display list of disabled interest entities for the subscriber.
acquia:contenthub-webhooks-list
Displays the list of registered webhooks.
Alias
Arguments
ach-wh-list, acquia-contenthub-webhooks-list (Content Hub 3.5.x and later)
You can pass an array of options to process data:
drush ach-wh-list: To print webhook details in table format.
--format=json: To print webhook details in json format.
--field=uuid: To print webhook uuids in table format.
--format=table --fields=client_uuid,uuid: To print webhook's client_uuids and uuids in table format.
acquia:contenthub-import-queue-run
Runs the Content Hub subscriber import queue.
Alias
Arguments
ach-import (Content Hub 3.3.x and later)
This command is available in the acquia_contenthub_subscriber module.
You can pass an array of options to process the data:
--time-limit: The maximum number of seconds allowed to run the queue.
--items-limit: The maximum number of items allowed to run the queue.
ach-import (Content Hub 3.8.x and later)
This command is available in the acquia_contenthub_subscriber module.
You can pass an array of options to process the data:
--time-limit: The maximum number of seconds allowed to run the queue.
--items-limit: The maximum number of items allowed to run the queue.
--service-queue-item-state: Filters service queue items by state, such as queued or failed.
acquia:contenthub-export-queue-run
Runs the Content Hub publisher export queue.
Alias
Arguments
ach-export (Content Hub 3.3.x and later)
This command is available in the acquia_contenthub_publisher module.
You can pass an array of options to process the data:
--time-limit: The maximum number of seconds allowed to run the queue.
--items-limit: The maximum number of items allowed to run the queue.
acquia:contenthub:enable-syndication
Enables syndication for a comma-separated list of UUIDs.
Alias
Arguments
ach-es (Content Hub 3.3.x and later)
This command requires at least one option or a list of comma-separated options:$uuid
uuid: The unique ID of the entity being enabled.
acquia:contenthub:disable-syndication
Disables syndication for a comma-separated list of UUIDs.
Alias
Arguments
ach-ds (Content Hub 3.3.x and later)
This command requires at least one option or a list of comma-separated options:$uuid
uuid: The unique ID of the entity being disabled.
acquia:contenthub-audit-publisher
Checks the published entities and compares them with what exists in the Content Hub publisher to ensure consistency
Alias
Arguments
ach-audit-publisher, ach-ap
This command takes the following argument:
entity-type
You can pass an array of options to process the data:
publish: Republish inconsistent entities to Content Hub
status: The export status of the entities to audit, defaults to EXPORTED. Possible values include:
EXPORTED
INITIATED
REINDEX
QUEUED
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
ach-audit-subscriber, ach-as
This command takes the following arguments:
help: Checks imported entities and compares them to Content Hub
manifest_file: The file name, including path, to write the manifest to
You can pass an array of options to process the data:
types[=TYPES]: Comma-separated list of entity types to search and delete
Note
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
ach-enqueue-by-filters, ach-enfi
--filter-uuids[=FILTER-UUIDS] Creates import queue items based on specified filter uuids, where FILTER-UUIDS is a comma-separated list of filter uuids
acquia:contenthub:entity-scan:filter
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
ach-es-f, ach-esf
Requires one argument:$uuid
uuid is the exact uuid of the entity being inspected
acquia:contenthub-export-local-cdf
Generates a CDF document from a manifest file and requires the location of a YAML $manifest
Alias
Arguments
ach-elc
The $manifest file format is a yml file you must create using the following format:
Assigns randomly generated UUIDs to configuration entities with NULLUUIDs (Experimental: Use with caution)
Alias
Arguments
ach-fix-null-uuids
N/A
acquia:contenthub-remote
Prints the CDF from a remote source (Content Hub)
Alias
Arguments
ach-re
uuid: The UUID of the entity
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
ach-rs
N/A
acquia:contenthub-webhooks
Performs a webhook management operation
Alias
Arguments
ach-wh
This command takes the following argument:
op: The operation to use: register, unregister, or list.
Requires the webhook_url as an option.
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.
--no-propagate: Prevents the entity deletion event from propagating to subscriber sites.
acquia:contenthub-list
List content entities that exist in Content Hub
Alias
Arguments
ach-list
You can pass an array of options to control the output:
limit: The number of entities to be listed
start: The offset to start listing the entities (useful for pagination)
origin: The client’s origin UUID
language: Filter entities by language: for example, en
attributes: The attributes to display for all listed entities
type: The entity types to include
filters=title=New*,status=1: The filters listed by new titles
format: The format for output: for example, --format=json
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
ach-lqi
You can pass an array of options to control the output:
type: A string value of a valid entity type
uuid: A string value of a valid entity uuid
limit: An integer value to specify the number of items to be returned
queue: Available only if the site has dual configurations. Expects the import/export value. The default value is export
acquia:contenthub-local
Prints an entity (in CDF format) from a local source (a Drupal website)
Alias
Arguments
ach-lo
entity-type
entity-id: The ID or UUID of the entity. You can also run ach-ent which is defined here using the local operation.
Note
From version 3.3.x onwards, the entity-type argument is optional when entity UUID is passed as an argument.
acquia:contenthub-purge
(Developer only): Deletes all entities from Content Hub
Important
The ach-purge command purges all entities from Content Hub. You must run this command cautiously. 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
ach-purge
api: The Content Hub API key
secret: Your secret key
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 Content Hub will purge the contents.
acquia:contenthub-regenerate-secret
Regenerates the shared secret used for webhook verification
Alias
Arguments
ach-regsec
N/A
acquia:contenthub-restore
(Developer only): Restores the backup taken by a previous execution of the purge command
Alias
Arguments
ach-restore
api: The Content Hub API key
secret: Your secret key
acquia:contenthub-update-secret
Updates the shared secret used for webhook verification
Alias
Arguments
ach-upsec
N/A
acquia:contenthub-audit-entity
Audits an entity for differences with the existing CDF in 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
ach-audit-entity,ach-ae
This command takes the following arguments:
drushacquia:contenthub-audit-entitynode123: Audits the node with nid = 123 and all its dependencies.
drushach-aenode53fd2ed2-5d29-4028-9423-0713ef2f82b3: Audits the node with UUID = 53fd2ed2-5d29-4028-9423-0713ef2f82b3.
acquia:contenthub-settings
Gets Content Hub settings from the different providers and determines the active configuration with any override information.
Alias
Arguments
ach-chs
This command takes the following arguments:
drushach-chs
--show-secret-key shows the unmasked secret key set
Re-queues entities on publisher or subscriber sites. Provide at least one option when running this command. This command does not run the export or import queues.
Alias
Arguments
ach-rq
This command takes the following argument:
operation: Specifies the operation to perform.
Valid values:
export: For publisher sites.
import: For subscriber sites.
This command requires at least one of the following options:
type: The string value of a valid entity type.
bundle: The string value of a valid entity bundle.
uuid: The string value of a valid entity uuid.
use-tracking-table: The boolean option to re-queue entities in the tracking table. If omitted, all entities of the provided type and bundle are enqueued..
only-queued-entities: The Boolean option to re-queue only entities with queued status in the tracking table.
For subscribers only during the Pull Syndication mode:
--service: Indicates that Pull Syndication mode is enabled.
Using Drush with Content Hub
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.
If you have enabled Content Hub, but Drush commands fail with the message Command[command_name]needsthefollowingextension(s)enabledtorun:acquia_contenthub, execute the following command to try to resolve the issue:
Re-originates entities in Content Hub from one source to another. This deletes the original sources after recreation if they did not exist initially, unless the --no-origin-delete option is used.
Alias
Arguments
ach-reoriginate
origin_list: A comma-separated list of source origin UUIDs.
target: The target origin UUID.
--no-origin-delete: To keep the original sources after recreation if they did not exist initially.
--names: To delete the Acquia Content Hub Client using names.
--uuids: To delete the Acquia Content Hub Client using UUIDs.
--ignore-origin: To ignore the origin check when deleting the client CDF.
acquia:contenthub:client-update
Updates the Content Hub details.
Alias
Arguments
ach-cu(Content Hub 3.4.0 and later)
You can pass an array of options to process data:
--name new_name: To change the client name to new_name.
acquia:contenthub-webhook-interests-list
Displays the list of interest for the registered webhook.
Alias
Arguments
ach-wi-list (Content Hub 3.3.x and later)
You can pass an array of options to process data:
drush ach-wi-list --site-role=subscriber: To display list of interests for the current subscriber site in table format.
--webhoo-url=http://example.site: To display list of interest for specified webhook url and site role.
--uuid=fffbbc03-e748-473a-a5ca-cc1df2a2a744: To display the interest details of specified uuid.
--format-json: To display list of interests for the subscriber site in json format.
--reason=ab8902ff-3548-4861-bb95-a83c81fdaa40: To display list of interest list matching specified reason uuid.
--syndication-status=EXPORT-SUCCESSFUL: To display list of interests for the subscriber having EXPORT-SUCCESSFUL syndication status.
--disable-syndication=true: To display list of disabled interest entities for the subscriber.
acquia:contenthub-webhooks-list
Displays the list of registered webhooks.
Alias
Arguments
ach-wh-list, acquia-contenthub-webhooks-list (Content Hub 3.5.x and later)
You can pass an array of options to process data:
drush ach-wh-list: To print webhook details in table format.
--format=json: To print webhook details in json format.
--field=uuid: To print webhook uuids in table format.
--format=table --fields=client_uuid,uuid: To print webhook's client_uuids and uuids in table format.
acquia:contenthub-import-queue-run
Runs the Content Hub subscriber import queue.
Alias
Arguments
ach-import (Content Hub 3.3.x and later)
This command is available in the acquia_contenthub_subscriber module.
You can pass an array of options to process the data:
--time-limit: The maximum number of seconds allowed to run the queue.
--items-limit: The maximum number of items allowed to run the queue.
ach-import (Content Hub 3.8.x and later)
This command is available in the acquia_contenthub_subscriber module.
You can pass an array of options to process the data:
--time-limit: The maximum number of seconds allowed to run the queue.
--items-limit: The maximum number of items allowed to run the queue.
--service-queue-item-state: Filters service queue items by state, such as queued or failed.
acquia:contenthub-export-queue-run
Runs the Content Hub publisher export queue.
Alias
Arguments
ach-export (Content Hub 3.3.x and later)
This command is available in the acquia_contenthub_publisher module.
You can pass an array of options to process the data:
--time-limit: The maximum number of seconds allowed to run the queue.
--items-limit: The maximum number of items allowed to run the queue.
acquia:contenthub:enable-syndication
Enables syndication for a comma-separated list of UUIDs.
Alias
Arguments
ach-es (Content Hub 3.3.x and later)
This command requires at least one option or a list of comma-separated options:$uuid
uuid: The unique ID of the entity being enabled.
acquia:contenthub:disable-syndication
Disables syndication for a comma-separated list of UUIDs.
Alias
Arguments
ach-ds (Content Hub 3.3.x and later)
This command requires at least one option or a list of comma-separated options:$uuid
uuid: The unique ID of the entity being disabled.
acquia:contenthub-audit-publisher
Checks the published entities and compares them with what exists in the Content Hub publisher to ensure consistency
Alias
Arguments
ach-audit-publisher, ach-ap
This command takes the following argument:
entity-type
You can pass an array of options to process the data:
publish: Republish inconsistent entities to Content Hub
status: The export status of the entities to audit, defaults to EXPORTED. Possible values include:
EXPORTED
INITIATED
REINDEX
QUEUED
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
ach-audit-subscriber, ach-as
This command takes the following arguments:
help: Checks imported entities and compares them to Content Hub
manifest_file: The file name, including path, to write the manifest to
You can pass an array of options to process the data:
types[=TYPES]: Comma-separated list of entity types to search and delete
Note
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
ach-enqueue-by-filters, ach-enfi
--filter-uuids[=FILTER-UUIDS] Creates import queue items based on specified filter uuids, where FILTER-UUIDS is a comma-separated list of filter uuids
acquia:contenthub:entity-scan:filter
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
ach-es-f, ach-esf
Requires one argument:$uuid
uuid is the exact uuid of the entity being inspected
acquia:contenthub-export-local-cdf
Generates a CDF document from a manifest file and requires the location of a YAML $manifest
Alias
Arguments
ach-elc
The $manifest file format is a yml file you must create using the following format:
Assigns randomly generated UUIDs to configuration entities with NULLUUIDs (Experimental: Use with caution)
Alias
Arguments
ach-fix-null-uuids
N/A
acquia:contenthub-remote
Prints the CDF from a remote source (Content Hub)
Alias
Arguments
ach-re
uuid: The UUID of the entity
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
ach-rs
N/A
acquia:contenthub-webhooks
Performs a webhook management operation
Alias
Arguments
ach-wh
This command takes the following argument:
op: The operation to use: register, unregister, or list.
Requires the webhook_url as an option.
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.
--no-propagate: Prevents the entity deletion event from propagating to subscriber sites.
acquia:contenthub-list
List content entities that exist in Content Hub
Alias
Arguments
ach-list
You can pass an array of options to control the output:
limit: The number of entities to be listed
start: The offset to start listing the entities (useful for pagination)
origin: The client’s origin UUID
language: Filter entities by language: for example, en
attributes: The attributes to display for all listed entities
type: The entity types to include
filters=title=New*,status=1: The filters listed by new titles
format: The format for output: for example, --format=json
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
ach-lqi
You can pass an array of options to control the output:
type: A string value of a valid entity type
uuid: A string value of a valid entity uuid
limit: An integer value to specify the number of items to be returned
queue: Available only if the site has dual configurations. Expects the import/export value. The default value is export
acquia:contenthub-local
Prints an entity (in CDF format) from a local source (a Drupal website)
Alias
Arguments
ach-lo
entity-type
entity-id: The ID or UUID of the entity. You can also run ach-ent which is defined here using the local operation.
Note
From version 3.3.x onwards, the entity-type argument is optional when entity UUID is passed as an argument.
acquia:contenthub-purge
(Developer only): Deletes all entities from Content Hub
Important
The ach-purge command purges all entities from Content Hub. You must run this command cautiously. 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
ach-purge
api: The Content Hub API key
secret: Your secret key
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 Content Hub will purge the contents.
acquia:contenthub-regenerate-secret
Regenerates the shared secret used for webhook verification
Alias
Arguments
ach-regsec
N/A
acquia:contenthub-restore
(Developer only): Restores the backup taken by a previous execution of the purge command
Alias
Arguments
ach-restore
api: The Content Hub API key
secret: Your secret key
acquia:contenthub-update-secret
Updates the shared secret used for webhook verification
Alias
Arguments
ach-upsec
N/A
acquia:contenthub-audit-entity
Audits an entity for differences with the existing CDF in 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
ach-audit-entity,ach-ae
This command takes the following arguments:
drushacquia:contenthub-audit-entitynode123: Audits the node with nid = 123 and all its dependencies.
drushach-aenode53fd2ed2-5d29-4028-9423-0713ef2f82b3: Audits the node with UUID = 53fd2ed2-5d29-4028-9423-0713ef2f82b3.
acquia:contenthub-settings
Gets Content Hub settings from the different providers and determines the active configuration with any override information.
Alias
Arguments
ach-chs
This command takes the following arguments:
drushach-chs
--show-secret-key shows the unmasked secret key set
Re-queues entities on publisher or subscriber sites. Provide at least one option when running this command. This command does not run the export or import queues.
Alias
Arguments
ach-rq
This command takes the following argument:
operation: Specifies the operation to perform.
Valid values:
export: For publisher sites.
import: For subscriber sites.
This command requires at least one of the following options:
type: The string value of a valid entity type.
bundle: The string value of a valid entity bundle.
uuid: The string value of a valid entity uuid.
use-tracking-table: The boolean option to re-queue entities in the tracking table. If omitted, all entities of the provided type and bundle are enqueued..
only-queued-entities: The Boolean option to re-queue only entities with queued status in the tracking table.
For subscribers only during the Pull Syndication mode:
--service: Indicates that Pull Syndication mode is enabled.
--reason
--visibility-timeout: Updates the visibility timeout for the item in the service queue.
ach-qs
List operation: Displays service queue items in tabular or JSON format.
You can pass an array of options to process data:
--state: Adds a state filter when fetching items from the service queue.
--syndication-ids: Fetches items from the service queue for specified syndication IDs and displays them in a table.
--json: Displays the result in JSON format.
ach-qs
Describe operation: Displays details for the specified item.
The required arguments are as follows:
--syndication-id: The queue id of the item to be updated.
You can pass an array of options to process data:
--add-cdf-details: Adds the CDF of the item to the output.
This command only gathers information about changes you can make to entities on your website.
--reason: Specifies the reason for re-enqueuing entities. The default value is manual.
--action: Specifies the action to perform when re-enqueuing entities. The default value is entity_create.
Valid values:
entity_create
entity_update
entity_delete
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.
--reason
--visibility-timeout: Updates the visibility timeout for the item in the service queue.
ach-qs
List operation: Displays service queue items in tabular or JSON format.
You can pass an array of options to process data:
--state: Adds a state filter when fetching items from the service queue.
--syndication-ids: Fetches items from the service queue for specified syndication IDs and displays them in a table.
--json: Displays the result in JSON format.
ach-qs
Describe operation: Displays details for the specified item.
The required arguments are as follows:
--syndication-id: The queue id of the item to be updated.
You can pass an array of options to process data:
--add-cdf-details: Adds the CDF of the item to the output.
This command only gathers information about changes you can make to entities on your website.
--reason: Specifies the reason for re-enqueuing entities. The default value is manual.
--action: Specifies the action to perform when re-enqueuing entities. The default value is entity_create.
Valid values:
entity_create
entity_update
entity_delete
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.