Self-Hosted Secrets Manager/Conjur Cluster Migration

Self-Hosted Secrets Manager/Conjur Cluster Migration

135
Created On 11/10/26 11:03 AM - Last Modified 11/10/26 15:58 PM


Objective


This article provides a step-by-step process for migrating a Secrets Manager Self-Hosted cluster to new servers when an in-place operating system upgrade is not supported. The procedure preserves the existing Leader database by creating an evoke backup, transferring the encrypted backup and key to a newly built Leader, and restoring the data into a fresh container. It also covers validation of the restored Leader, handling FQDN changes and both self-signed and third-party certificates, and preparing new Standby nodes from clean containers. New Standbys are created from fresh seeds generated by the migrated Leader rather than reusing the original Standbys or their local database state. The guide additionally includes replication validation and the required Auto-Failover policy and evoke cluster enroll steps to establish a healthy three-node cluster.



Environment


13.4;13.5;13.6;13.7 Conjur Other (Technical)

Procedure


Migrating a Secrets Manager Cluster

Since in-place OS upgrades of Idira products are not supported, a customer may need to migrate an existing Secrets Manager cluster to a new set of VMs with updated operating systems installed. If that is the case, use this process to successfully migrate the database from the original cluster to the new cluster.

 

Original Followers/Standbys

The original Followers or Standbys should have no role in transferring the database. Once the new Leader is restored and validated, all new Followers/Standbys should be built cleanly from brand-new seeds generated by that new Leader.

 

High-Level Process Overview

The Idira upgrade procedure is as follows:

Stop writes to the Leader → Run evoke backup → Start a fresh appliance container → Run evoke unpack backup → Run evoke restore

The backup creates an encrypted archive plus its encryption key which will need to be transferred from the original Leader to the new Leader.

 

Docker/Podman

The following commands use podman. However, podman can be replaced by docker with no impact.

 

Container Names

For this setup, use one container per server/node. Each container can have the same container name. As a matter of fact, it is recommended to keep the same container name on all cluster nodes for operational consistency. There is no conflict because each container exists in a different Podman or Docker runtime on a different server. What distinguishes the nodes is the host/FQDN and appliance role, not the local container name.

 

Phase 1: Prepare the New RHEL Leader

Build the new host completely clean. Do not copy /var/lib/postgresql, etcd data, or any database directories from the original host. Doing so can cause PostgreSQL version mismatches and other issues down the road.

 

On the new Leader, verify the hostname:

hostname -f

 

Verify DNS:

getent hosts <New Leader's FQDN>

getent hosts <New Follower/Standby 1's FQDN>

getent hosts <New Follower/Standby 2's FQDN>

 

Note: The documented Podman deployment requires the nodes to be able to communicate with one another and supports a dedicated container network with each container's FQDN as its network alias.

 

Create the host directories:

sudo mkdir -p /opt/cyberark/conjur/{security,config,backups,seeds,logs}

 

If using the recommended bridge network:

sudo podman network create conjur

 

If it already exists:

sudo podman network ls

sudo podman network inspect conjur

 

Phase 2: Verify the Existing Leader Before Backup

On the original Leader:

sudo podman ps

 

Then:

curl -sk https://localhost/health

 

The application/database portions must be healthy before taking the migration backup.

 

Verify the role:

sudo podman exec <Original Contain Name> evoke role show

 

Expected:

master

 

Record the current product version:

sudo podman exec <Original Contain Name> evoke version

 

Preserve the current configuration for reference:

sudo podman exec <Original Contain Name> evoke configuration show -o text > /tmp/conjur_configuration_before_migration.txt

 

Note: If that command isn't supported by their exact build, simply capture:

sudo podman exec <Original Contain Name> cat /etc/conjur/config/conjur.yml > /tmp/conjur.yml.before-migration

 

Phase 3: Establish the Migration Outage/Consistency Point

Important! The documentation says to stop the Conjur service on the Leader before creating the final backup specifically to prevent new database changes during the upgrade.

 

Once the customer is ready for the actual migration/cutover:

sudo podman exec <Original Contain Name> sv stop conjur

 

The docs describe this as preventing new changes from being introduced to the Leader.

 

Ensure applications/users are no longer writing to the original Leader during the migration window.

 

Preserve the Original Leader

Do not delete or dismantle this Leader. It is the rollback source.

 

Phase 4: Create the Final Leader Backup

Run on the original Leader:

sudo podman exec <Original Contain Name> evoke backup

 

The documented behavior is that evoke backup creates:

  • an encrypted backup archive
  • an encryption key needed to unlock it

 

under /opt/conjur/backup inside the container.

 

First identify the actual host mount:

sudo podman inspect <Original Contain Name> --format '{{range .Mounts}}{{println .Source "->" .Destination}}{{end}}'

 

Find the source corresponding to /opt/conjur/backup. Then list it. For example:

sudo ls -lah /opt/cyberark/conjur/backup

 

or:

sudo ls -lah /opt/cyberark/conjur/backups

 

Expect to find two artifacts, typically something resembling:

<timestamp>.tar.xz.gpg

key

 

Note: The key is required to decrypt/unpack the archive.

 

Preserve both files by making a dedicated migration directory:

sudo mkdir -p /tmp/conjur-migration

 

Then copy the generated backup and key into it, substituting the actual backup host directory:

sudo cp -a /opt/cyberark/conjur/backups/* /tmp/conjur-migration/

 

Verify:

sudo ls -lah /tmp/conjur-migration

 

Optional but Useful Integrity Hashes

cd /tmp/conjur-migration

sudo sha256sum * | sudo tee SHA256SUMS

 

Phase 5: Transfer the Backup to the New Leader

From the original Leader:

sudo scp /tmp/conjur-migration/* <user>@<New Leader's FQDN>:/tmp/

 

On the new Leader:

sudo ls -lah /tmp/

 

Verify Hashes if Generated

cd /tmp

sudo sha256sum -c SHA256SUMS

 

Then place the backup and key into the new host's backup mount:

sudo cp <backup-file>.tar.xz.gpg /opt/cyberark/conjur/backups/

sudo cp key /opt/cyberark/conjur/backups/

 

For example:

sudo ls -lah /opt/cyberark/conjur/backups/

 

Important! Both files, <timestamp>.tar.xz.gpg and key must be present before the new container is restored.

 

Phase 6: Start a Completely Fresh Container on the New Leader

Caution! This part is important. Do not run evoke configure leader first. The documented upgrade path starts a fresh appliance container and restores directly into it.

 

For rootful Podman on the new RHEL host, use something along these lines:

sudo podman run \

  --name <Container Name> \

  --network conjur \

  --network-alias <New Leader's FQDN> \

  --detach \

  --security-opt seccomp=/opt/cyberark/conjur/security/seccomp.json \

  --publish "443:443" \

  --publish "444:444" \

  --publish "5432:5432" \

  --publish "1999:1999" \

  --cap-add AUDIT_WRITE \

  --log-driver journald \

  --volume /opt/cyberark/conjur/config:/etc/conjur/config:z \

  --volume /opt/cyberark/conjur/security:/opt/cyberark/conjur/security:z \

  --volume /opt/cyberark/conjur/backups:/opt/conjur/backup:z \

  --volume /opt/cyberark/conjur/seeds:/opt/cyberark/conjur/seeds:z \

  --volume /opt/cyberark/conjur/logs:/var/log/conjur:z \

  registry.tld/conjur-appliance:13.9.0

 

That follows the current documented rootful Podman pattern: Dedicated network + Container FQDN/Network alias + Ports + AUDIT_WRITE + Persistent Mounts with SELinux :z.

 

Restart Setting

Important! For a Podman deployment, current documentation specifically says do not put --restart=unless-stopped in "podman run". Let systemd handle restart behavior instead. For a Docker deployment, however, --restart=unless-stopped should be used in "podman run".

 

Security-Opt Setting

If their original deployment uses --security-opt seccomp=unconfined rather than a supplied seccomp.json, keep the same setting in the new environment to avoid container start failures.

 

Version Upgrade

Initially use the same Secrets Manager product version as the original Leader. The documentation says backup/restore is generally supported across releases, but moving platform + (optionally) changing FQDN + changing product release all in one operation makes troubleshooting unnecessarily difficult. The documentation also requires all cluster nodes to run the same Secrets Manager image version.

 

FQDN Change

The upgrade documentation expects the new Leader to have the same FQDN/DNS Name as the original Leader. If a different FQDN is required, additional steps are provided in Phase 12 to validate the new appliance FQDN and regenerate or replace the associated certificate so it matches the new name.

 

Phase 7: Confirm the Backup is Visible Inside the New Container

Run:

sudo podman exec <Container Name> ls -lah /opt/conjur/backup

 

Expected result:

key

<timestamp>.tar.xz.gpg

 

Important! Do not copy a PostgreSQL data directory into this container.

 

Phase 8: Unpack the Original Leader Backup

First use the exact archive name rather than * while we're troubleshooting:

sudo podman exec <Container Name> evoke unpack backup --key /opt/conjur/backup/key /opt/conjur/backup/<timestamp>.tar.xz.gpg

 

Note: The Evoke reference requires the backup to be unpacked before restore and requires the encryption key.

 

If successful, don't immediately perform the real restore.

 

Phase 9: Run the Restore Preview

Note: Idira explicitly recommends running sudo podman exec <Container Name> evoke restore --preview --accept-eula before the real restore for customers using version 12.5 and older. For those using newer versions, this step can be disregarded.

 

--preview displays policy roles that the migration would remove without applying the database migration. Idira says to review those roles and make sure they are no longer used before proceeding.

 

Capture it:

sudo podman exec <Container Name> evoke restore --preview --accept-eula | sudo tee /tmp/evoke-restore-preview.txt

 

Important! If it reports unexpected removals, stop here and notify customer support.

 

Phase 10: Restore the Database to the New Leader

Once the preview is acceptable:

sudo podman exec <Container Name> evoke restore --accept-eula

 

This is the actual migration step. The documentation specifically uses evoke unpack backup … and evoke restore --accept-eula to restore a fresh Leader container from the previous Leader's backup.

 

Wait

Let it finish completely. Do not interrupt the container if PostgreSQL migration activity takes time.

 

Phase 11: Validate the Restored Leader

First:

sudo podman exec <Container Name> evoke role show

 

Then:

curl -sk https://localhost/health

 

The following should be trust at the minimum:

services -> ok: true

database -> ok: true

overall -> ok: true

role -> master

 

The documented upgrade validation is exactly the /health check after restore.

 

Also test the application database through normal Conjur operations.

For example:

curl -sk https://localhost/version

 

Additional Validation Tests

Test login/secrets retrieval through whatever test account/workload the customer normally uses.

Compare a few known objects/secrets/policies against the old environment before declaring the database migration successful.

 

Phase 12: Critical FQDN/Certificate Clean-Up

Note: If the FQDN of the new Leader is the same as the original Leader, skip this section.

 

The new Leader's FQDN was established during container creation in Phase 6 using --network-alias <New Leader FQDN>. After restoring the backup from the original Leader, the restored certificate may still contain the original Leader's FQDN.

 

To correct the certificate mismatch, there are two options depending on the signer of the certificate.

 

Self-Signed

For self-signed certificates, regenerate the CA/server certificate with the new hostname:

sudo podman exec <Container Name> evoke ca regenerate <New Leader's FQDN>

 

Note: evoke ca regenerate commands are relevant for a self-signed certificate only.

 

A more detailed how-to guide to regenerate the certificate for the new Leader's FQDN can be found here:  https://community.cyberark.com/s/article/000003935

 

3rd-Party Signed

For 3rd-party signed certificates, run the import command twice (once for the CA/intermediates and once for the leaf cert + key):

  1. Import the CA (and intermediates concatenated in the same pem file if applicable):

sudo podman exec <Container Name> evoke ca import --root --force /path/to/root.pem

 

  1. Import the server cert + key:

sudo podman exec <Container Name> evoke ca import --set --key /path/to/host.key /path/to/host.pem

 

Verification Steps

Verify the certificate being presented by the new Leader:

openssl s_client -connect localhost:443 -servername <New Leader's FQDN> </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -ext subjectAltName

 

Confirm the output includes the new Leader FQDN in the certificate SANs, for example:

DNS:<New Leader's FQDN>

 

Then verify Secrets Manager health:

curl -sk https://localhost/health

 

The overall result should show:

"ok": true

 

Phase 13: Create the Standbys

Build the new host completely clean. Do not copy /var/lib/postgresql, etcd data, or any database directories from the original host. Doing so can cause PostgreSQL version mismatches and other issues down the road.

 

On the new host, verify the hostname:

hostname -f

 

Verify DNS:

getent hosts <New Leader's FQDN>

getent hosts <New Follower/Standby 1's FQDN>

getent hosts <New Follower/Standby 2's FQDN>

 

Create the host directories:

sudo mkdir -p /opt/cyberark/conjur/{security,config,backups,seeds,logs}

 

If using the recommended bridge network:

sudo podman network create conjur

 

If it already exists:

sudo podman network ls

sudo podman network inspect conjur

 

Create the Standby

For rootful Podman on the new RHEL host, use something along these lines:

sudo podman run \

  --name <Container Name> \

  --network conjur \

  --network-alias <First Standby's FQDN> \

  --detach \

  --security-opt seccomp=/opt/cyberark/conjur/security/seccomp.json \

  --publish "443:443" \

  --publish "444:444" \

  --publish "5432:5432" \

  --publish "1999:1999" \

  --cap-add AUDIT_WRITE \

  --log-driver journald \

  --volume /opt/cyberark/conjur/config:/etc/conjur/config:z \

  --volume /opt/cyberark/conjur/security:/opt/cyberark/conjur/security:z \

  --volume /opt/cyberark/conjur/backups:/opt/conjur/backup:z \

  --volume /opt/cyberark/conjur/seeds:/opt/cyberark/conjur/seeds:z \

  --volume /opt/cyberark/conjur/logs:/var/log/conjur:z \

  registry.tld/conjur-appliance:13.9.0

 

Note: The podman run command has all the same options set as the Leader. It is important that nodes in the cluster are created consistently.

 

Restart Setting

Important! For a Podman deployment, current documentation specifically says do not put --restart=unless-stopped in "podman run". Let systemd handle restart behavior instead. For a Docker deployment, however, --restart=unless-stopped should be used in "podman run".

 

Security-Opt Setting

If their original deployment uses --security-opt seccomp=unconfined rather than a supplied seccomp.json, keep the same setting in the new environment to avoid container start failures.

 

Repeat this process for all additional Followers/Standbys adjusting the --network-alias FQDN value for each.

 

Phase 14: Reseed the Standbys

Important! Discard all previous Standby seeds.

 

Generate brand-new seeds.

For the first Follower/Standby, from the new Leader:

sudo podman exec <Container Name> evoke seed standby <First Standby's FQDN> <New Leader's FQDN> > /tmp/standby01.tar

 

For the second Follower/Standby, from the new Leader:

sudo podman exec <Container Name> evoke seed standby <Second Standby's FQDN> <New Leader's FQDN> > /tmp/standby02.tar

 

Repeat the process for additional Followers/Standbys

 

Note: The current deployment documentation shows the Standby seed command with both the Standby DNS and Leader FQDN/DNS Name, not merely the Standby name. It is important not to use shortnames.

 

Transfer each seed to its respective Follower/Standby.

From the new Leader:

sudo scp /tmp/standby01.tar  <user>@<First Standby's FQDN>:/tmp/

sudo scp /tmp/standby02.tar  <user>@<Second Standby's FQDN>:/tmp/

 

Repeat for additional Followers/Standbys.

 

Verify the copy on the first Standby:

sudo ls -lah /tmp/

 

Verify the copy on the second Standby:

sudo ls -lah /tmp/

 

Repeat on additional Followers/Standbys

 

 Unpack each seed and configure the fresh Standby:

sudo podman exec <Container Name> evoke unpack seed /tmp/standby<## for respective Standby>.tar

sudo podman exec <Container Name> evoke configure standby

 

The seed already carries the Leader information, and the documented standard workflow simply runs evoke configure standby after unpacking it.

 

Verify Standby Health

On each Standby, run:

curl -sk https://localhost/health

 

The minimum expected results

"role": "standby"

"ok": true

 

Enable Replication

Synchronous replication can be enabled from the new Leader:

sudo podman exec <Container Name> evoke replication sync start

 

Note: Idira requires at least two Standbys for synchronous replication.

 

Phase 15: Enable Auto-Failover

First confirm all three nodes are healthy and that both Standbys are replicating normally. On each node:

curl -sk https://localhost/health?all

 

The Leader should show role: "master" and both Standbys should show role: "standby" with healthy database/replication status.

 

Next, create the Auto-Failover policy for the new topology:

vi /tmp/newconjurcluster.yml

 

- !policy

  id: cluster/<New Cluster Name>

  body:

    - !layer

 

    - &hosts

          - !host

            id: <New Leader's FQDN>

          - !host

            id: <First Standby's FQDN>

          - !host

            id: <Second Standby's FQDN>

 

    - !grant

      role: !layer

      members: *hosts

 

Load the policy

With ConjurCLI

conjur policy load -b root -f /tmp/newconjurcluster.yml

 

With REST

Use the Load a Policy REST API.

 

Then enroll the new Leader into the Auto-Failover cluster.

On the new Leader:

sudo podman exec <Container Name> evoke cluster enroll --cluster-machine-name <New Leader's FQDN> <Cluster Name>

 

Example:

sudo podman exec devconjur evoke cluster enroll --cluster-machine-name 1adcybrcnjr01.company.com new-conjurcluster

 

Note: Idira documents the syntax as evoke cluster enroll [options] <cluster-name>, with --cluster-machine-name defining the node name used in the AF cluster.

 

Then enroll the first Standby on the first Standby:

sudo podman exec <Container Name> evoke cluster enroll --cluster-machine-name <First Standby's FQDN> --master-name <New Leader's FQDN> <Cluster Name>

 

Example:

sudo podman exec devconjur evoke cluster enroll --cluster-machine-name 1adcybrcnjr02.company.com --master-name 1adcybrcnjr01.company.com new-conjurcluster

 

Then repeat on the second Standby:

sudo podman exec <Container Name> evoke cluster enroll --cluster-machine-name <Second Standby's FQDN> --master-name <New Leader's FQDN> <Cluster Name>

 

Repeat for any additional Followers/Standbys.

 

After all three are enrolled, verify membership from the Leader:

sudo podman exec <Container Name> evoke cluster member list

 

All members should be enrolled.

 

Then verify full health again:

curl -sk https://localhost/health?all

 

At this point the cluster section should report healthy/running rather than unknown or failed.

 

Leader-Name/Master-Name

The current Evoke documentation still defines -m, --master-name as the Leader name for cluster enrollment. So use

--master-name

not:

--leader-name

 

Enable Auto-Failover

A separate “enable Auto-Failover” switch is not required after this. The evoke cluster enroll operations are what establish the Leader and Standbys as members of the Auto-Failover cluster. Idira’s upgrade documentation describes this exact sequence as “Re-enroll the auto-failover cluster”: enroll the Leader first, then each Standby with the Leader supplied through --master-name.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj00000017kJCAQ&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail