MongoDB persistent volume backup and restore error using Velero and MinIO on-premise #6192
Replies: 2 comments 2 replies
-
Velero file system backup(formerly Restic backup) is not a consistent backup, this should be the cause of the problem in your env. What kind of storage are you using for your on-premise cluster? Does it support CSI snapshot or any kind of snapshot? |
Beta Was this translation helpful? Give feedback.
-
Thank you @Lyndon-Li for your answer. It took us time to consider using Velero's CSI volume data movement feature. So almost one year later we now use it in addition to Longhorn storage which does support CSI snapshots. The result is great as MongoDB data are consistent as you pointed out. The downside is that the backup uses a lot of disk space, as Longhorn replicates the data of each snapshot the same way it does for all of our Kubernetes volumes. Moreover it retains these volumes, as it's the default behaviour of our storage class, so volumes created during backups are never deleted even if the backup has expired and no longer exists. We are looking for a way to remove the volumes created by the snapshots after the backup is deleted: is there a way to specify a different storage class for Velero's backup (we could create one with a Delete reclaim policy instead of a Retain one) or another way to solve this issue and delete the volumes from expired backups? |
Beta Was this translation helpful? Give feedback.
-
Backuping a MongoDB cluster composed of three nodes on a Kubernetes on-premise cluster using Velero and MinIO with Restic, triggers this fatal error of one of them after restoring the backup:
Please note that:
We proceeded with the following steps:
In this namespace we use Cassandra, RabbitMQ and MongoDB. Everything is being restored well (including two MongoDB nodes) except one MongoDB node which is most of the time in a "Back-off restarting failed container" state (even after having triggered a manual "mongod --repair" on it).
Do you know what could cause this issue and how we could solve it?
Beta Was this translation helpful? Give feedback.
All reactions