Appearance
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:
adminon 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
- On the source node, create an API token for an administrator with access to every application. Use a short expiry. See Accounts and roles.
- Note the source's management certificate fingerprint, shown under System > Accounts and access > Management access or in the
management API listeninglog line. - 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 shopsh
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
| Flag | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
-from | The source's management URL. | none (required) | https://HOST:PORT | all |
-fingerprint | The only certificate fingerprint accepted. | none (required) | SHA-256 | all |
-token | The administrator's API token. Prefer the WAAP_PULL_TOKEN environment variable, so it stays out of the process list. | environment | secret | all |
-apps | Applications to copy. | none (the whole configuration) | comma-separated names | all |
-apply | Applies the changes. Without it the command only shows them. | off | flag | all |
-m | Comment recorded with the new version. | none | text | with -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.