Skip to content

Copy configuration between nodes Since v0.1 ​

For nodes that are not a pair, for example one per site, you can copy the configuration or some applications from a source node to a target node. The copy is one-way and manual. It creates a new local version on the target, with audit and rollback as usual. In a pair, replication does this for you.

Before you begin ​

  • Role: admin on both nodes.
  • The target must reach the source's management listener over HTTPS, and the source's trusted networks must include the target.
  • Copied applications must refer to listeners and address lists that exist on the target, or the copy is refused.

Copy applications from another node ​

  1. On the source node, create an API token for an administrator with access to every application. Use a short expiry. See Accounts and roles.
  2. Note the source's management certificate fingerprint, shown under System > Accounts and access > Management access or in the management API listening log line.
  3. On the target node, preview the copy, then apply it.
text
1. Open System > Backup and import > Import from another node.
2. Enter Other node's management address, Its certificate SHA-256 and the API token.
3. Enter Applications (empty copies the whole configuration).
4. Select Preview changes, add a comment and select Apply.
sh
export WAAP_PULL_TOKEN=SECRET
waap config pull -from https://source:9443 -fingerprint SHA256 -apps shop
waap config pull -apply -m "copy shop from site A" -from https://source:9443 -fingerprint SHA256 -apps shop
sh
curl -sk -H "Authorization: Bearer $TARGET_TOKEN" -X POST https://target:9443/v1/config/pull \
  -d '{"from":"https://source:9443","fingerprint":"SHA256","token":"SECRET","apps":["shop"],"dry_run":true}'

Revoke the token afterwards.

Without -apps the whole document is copied

Listeners, management and ha settings come with it. Name the applications to copy only those. Each replaces the application with the same name on the target, or is added.

Settings reference ​

waap config pull ​

FlagWhat it doesDefaultAllowed valuesApplies in
-fromThe source's management URL.none (required)https://HOST:PORTall
-fingerprintThe only certificate fingerprint accepted.none (required)SHA-256all
-tokenThe administrator's API token. Prefer the WAAP_PULL_TOKEN environment variable, so it stays out of the process list.environmentsecretall
-appsApplications to copy.none (the whole configuration)comma-separated namesall
-applyApplies the changes. Without it the command only shows them.offflagall
-mComment recorded with the new version.nonetextwith -apply

Troubleshooting ​

The copy is refused because a listener or list is missing ​

  • Cause: the application refers to a listener or address list that the target does not have.
  • Fix: create them on the target first.