Changing the WAL archive destination before you restore

Before you restore data to a cluster, you must change the location where write-ahead logging (WAL) archives are stored on the cluster. To change the location where WAL archives are stored, you must first disable WAL archiving.

Procedure

  1. Make a copy of the backup section of your orchestration instance CR.
    For example, run the following command to save the backup section into a file called backup.json:
    oc get orchestration default -o jsonpath='{.spec.backup}' > backup.json


    The following example shows what the contents of backup.json might be:

    {
      "bucketName": "s3://example-bucket1/backup_1/",
      "endpointURL": "https://s3.eu-de.cloud-object-storage.appdomain.cloud",
      "wal": {
        "compression": "gzip",
        "encryption": "AES256"
      }
    }
  2. Disable WAL archiving by running the following command:
    oc patch orchestration default --type=json -p='[{"op": "remove", "path": "/spec/backup"}]'
  3. To change the location for the WAL archive, you must update the values in your copy of the backup section from step 1.
    For example, you must update the values in backup.json.
    You must update the following attributes:
    • bucketName
    • endpointURL
    For more information about these attributes, see Table 1 in Configuring backups by using the CLI.
  4. Enable WAL archiving again by applying a patch with the new backup values to your orchestration instance CR.
    For example, to apply the changes in backup.json to your orchestration instance CR, run the following command:
    oc patch orchestration default -p='{"spec":{"backup":"<content_from_backup.json>"}}'
    <content_from_backup.json> is the content of the backup.json file, but with no line breaks or \n newline characters. You must also escape any double quotation marks (") in the content.