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
-
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"
}
}
-
Disable WAL archiving by running the following command:
oc patch orchestration default --type=json -p='[{"op": "remove", "path": "/spec/backup"}]'
-
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.
-
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.