How to update the backup S3 buckets
Find out how to change the S3 object storage buckets used by the OPCP platform backups
Objective
Your OVHcloud On-Prem Cloud Platform (OPCP) stores its platform backups in an external S31-compatible object storage. These backups cover the critical components required to restore the control plane, namely:
- the internal databases (
db), - the persistent volumes (
pv), - the Terraform state (
tfState), - the KMS auto-unsealer shares (
kmsShares).
You may need to change the object storage buckets or endpoint used for these backups in several situations: migrating to a new S3 endpoint or region, moving to a different object storage provider, renaming buckets, or adjusting the retention policy.
This guide explains how to update the backup S3 buckets in the OPCP configuration, redeploy the control plane, and re-initialize the Velero / Kopia backup repositories so they point to the new object storage location.
This procedure modifies the backup configuration of the platform and re-initializes the backup repositories. Existing backups stored in the previous buckets are not migrated automatically. Make sure the previous backups are no longer needed (or have been copied over) before starting, and perform this operation during a maintenance window.
Requirements
- An operational OPCP infrastructure.
- Administrative access to the OPCP controller with the
opcp-cli,opcp-diag,kubectl,flux,tfctlandvelerotools installed and configured. - The connection details of the target S3 object storage: endpoint URL, region, and the names of the buckets to use for the backups.
- A maintenance window, as the control plane is redeployed during the operation.
Instructions
1. Running a pre-flight diagnostic
Before making any change, check that the platform is healthy. The opcp-diag tool runs a series of platform checks:
Only proceed once the diagnostic passes. This gives you a clean baseline to compare against once the operation is complete.
2. Updating the backup configuration
Open the OPCP configuration in your editor:
Locate the backups section and update it with the new object storage endpoint and bucket names:
The fields to review are:
endpoint.region/endpoint.url: the region and URL of the target S3-compatible service.db.bucket: the bucket storing the database backups, with itsretention(here30d).pv.bucket: the bucket storing the persistent volume backups, with itsretention(here720h0m0s, i.e. 30 days).pv.tfState.retention/pv.kmsShares.retention: the retention applied to the Terraform state and KMS shares backups.
Retention values can be expressed either as a day-based duration (for example 30d) or as a Go duration string (for example 720h0m0s, which is also 30 days). Keep the format used by the existing configuration.
Save and close the file. The command only updates the stored configuration; it does not apply it yet. The change is applied in the next step with opcp-cli deploy. The CLI reports when the edit is done:
3. Applying the new configuration
Apply the updated configuration:
This command does not redeploy the entire control plane: it only runs the convergence needed to apply your change, that is, it updates the Velero backup configuration and the database backup configuration.
The operation can take several minutes. Wait until you see the confirmation:
You can follow the deployment in real time in a separate terminal by tailing the CLI log:
4. Waiting for reconciliation
The platform relies on Flux (GitOps reconciliation) and Terraform to converge to the new desired state. Wait until every resource has reconciled.
List any resources that are not yet ready:
Check the state of the Terraform reconciliations:
Wait for these commands to report no pending or failing resources. If a resource stays blocked, you may occasionally need to restart the relevant pods — be patient, reconciliation can take a while.
5. Verifying the backup storage location
Once reconciliation is complete, confirm that Velero now points to the new bucket and that the storage location is Available:
The PHASE must be Available. It can take a few minutes after the deployment before the storage location is validated and becomes Available, so wait a moment and run the command again if needed. If it stays in another state, re-check the endpoint and bucket configuration from step 2 and the credentials of the S3 service.
6. Re-initializing the Velero backup repositories
The Kopia backup repositories used by Velero are bound to the previous object storage location. To make Velero recreate them against the new buckets, you need to delete the existing repositories and restart the Velero components.
First, list the current backup repositories:
Delete all of them:
Confirm that no repository remains:
Restart the Velero deployment and the node-agent daemonset so they re-create the repositories against the new buckets:
A Warning message may be displayed when restarting these workloads. It is expected and can be safely ignored.
Check that the Velero and node-agent pods have restarted and are Running:
7. Triggering a first backup for each schedule
The platform defines several backup schedules. List them to confirm they are enabled:
Rather than waiting for the next scheduled run, trigger an immediate backup from each schedule. The --wait flag makes the command block until the backup completes.
Back up the KMS auto-unsealer shares:
Back up the persistent volumes:
Back up the Terraform state:
Each command ends with a Backup completed with status: Completed. message. For example:
8. Verifying the backups and the recreated repositories
Confirm that all three backups completed without errors:
Check that Velero has recreated the Kopia backup repositories against the new buckets (they should now show a recent AGE):
9. Backing up the databases
The internal databases are managed by CloudNativePG and backed up separately, to the barmanObjectStore that now points to the new bucket. Trigger a database backup for each database.
The commands below use the placement-db database in the placement namespace as an example. Repeat them for the other databases, adapting the database name and its namespace accordingly.
Confirm that it reaches the completed state:
10. Checking that data has been written to the new buckets
The previous steps report that the backups completed from the platform's point of view. As an additional check, verify that the objects were actually created in the new S3 buckets.
Using your usual S3 client or object storage interface, browse each backup bucket and confirm that new objects have appeared since the operation. You should see recently dated objects corresponding to the database, persistent volume, Terraform state and KMS shares backups you triggered. This confirms that the backups are actually stored on the new object storage.
11. Final verification
Run the diagnostic again to confirm the platform is healthy after the change:
Finally, confirm that the scheduled backups now run automatically on their new location. After the next scheduled run, velero get backup should show the newly created backups alongside the ones you triggered manually:
Likewise, the database backups continue automatically:
Your OPCP platform backups now target the new S3 buckets.
Go further
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analyzed by our experts.
Join our community of users.
1: S3 is a trademark of Amazon Technologies, Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies, Inc.