MedusaRestoreJob can't find backup when prefix is used


My restore jobs can’t find the backups I made. I suspect it’s because of the prefix I’ve given.

I’ve have a backup schedule job making backups to this location:

Storage Properties:
Bucket Name: cassandra
Concurrent Transfers: 1
Host: redacted
Max Backup Age: 0
Max Backup Count: 7
Multi Part Upload Threshold: 104857600
Port: 9000
Prefix: fdon-dev
Secure: false
Storage Provider: s3_compatible
Storage Secret Ref:
Name: medusa-bucket-key
Transfer Max Bandwidth: 50MB/s

My restore job is shown here:

kind: MedusaRestoreJob
  name: restore-backup1
  namespace: cassandra
  cassandraDatacenter: datacenter1
  backup: medusa-backup-schedule-1698197400

Here is the error shown in the operator stating that it can’t find the backup:

2023-10-25T12:36:24.564Z	ERROR	Failed to get MedusaBackup	{"controller": "medusarestorejob", "controllerGroup": "", "controllerKind": "MedusaRestoreJob", "MedusaRestoreJob": {"name":"restore-backup1","namespace":"cassandra"}, "namespace": "cassandra", "name": "restore-backup1", "reconcileID": "f9046b07-5d6f-4639-b9cb-246110301227", "medusarestorejob": "cassandra/restore-backup1", "MedusaBackup": {"namespace": "cassandra", "name": "medusa-backup-schedule-1698197400"}, "error": " \"medusa-backup-schedule-1698197400\" not found"}*factory).NewMedusaRestoreRequest
2023-10-25T12:36:24.564Z	ERROR	Reconciler error	{"controller": "medusarestorejob", "controllerGroup": "", "controllerKind": "MedusaRestoreJob", "MedusaRestoreJob": {"name":"restore-backup1","namespace":"cassandra"}, "namespace": "cassandra", "name": "restore-backup1", "reconcileID": "f9046b07-5d6f-4639-b9cb-246110301227", "error": " \"medusa-backup-schedule-1698197400\" not found"}*Controller).reconcileHandler

I suspect it’s looking for the backup under
and not under
where it is in reality.

Can someone help?


What it’s not finding currently is the MedusaBackup object corresponding to the backup you’re restoring. This custom resource has to exist in the same namespace as the MedusaRestoreJob you’re creating.
If you’re trying to restore the backup to a different cluster or in a different namespace, you’ll need to run a sync MedusaTask first to recreate the MedusaBackup objects from what exists in the bucket.
Check the docs for more info.

1 Like