You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mariadb backup: a RestoreJob restores the newest dump in the prefix, whichever Backup it names #5196
A RestoreJob that names a MariaDB Backup does not restore the dump of that Backup. The driver creates k8s.mariadb.com/Restore with backupRef set to the operator Backup and no targetRecoveryTime, mariadb-operator takes the storage settings from that Backup and restores the newest backup.<timestamp>.<alg>.sql it finds in the prefix before the restore started. With the default strategy every backup of an app shares the prefix <namespace>/<app>/, so any RestoreJob restores the latest dump.
Environment
Cozystack v1.7.0, mariadb-operator 25.10.2.
To reproduce
MariaDB app m1 with row 1, run BackupJob A.
Insert row 2, run BackupJob B.
Create a RestoreJob with backupRef: <A> into an empty second MariaDB app (to-copy).
Actual behaviour
The second app has rows 1 and 2. The operator Restore pod log:
That is the dump of B (08:47:17), the dump of A was taken 08:46:43. Same when the dump of A is already gone: RestoreJob from A still ends Succeeded and restores the newer dump.
Expected behaviour
Restore uses the dump of the Backup it names, or fails when that dump is gone.
I think the driver has to resolve the dump that belongs to the operator Backup and pass its timestamp as targetRecoveryTime, or use a prefix per Backup. #3549 is about restore options in general, not this.
Activity
fix(mariadb): restore the dump a Backup was taken as (cozystack#5227)