-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backup support for storage buckets #241
Comments
For this one, I'm thinking:
For minio, we may be able to use the shortcut of directly peaking at the filesystem to avoid having to use S3 to download/upload everything, but for Ceph, I suspect we'll have to go through S3 directly. |
I am currently working on this feature to export storage buckets and have a question about the MinIO metadata. As it turns out, MinIO stores its metadata in .minio.sys: storage bucket keys: I now assume that we can reuse the same logic to activate the bucket and extract the keys into our database as we do today when creating a new scope. Namely by using incus/internal/server/storage/backend.go Lines 3926 to 3929 in 032e040
@stgraber would that be ok from your point of view or do you see a problem if a bucket is imported and the "original" metadata of MinIO is still included? |
I'd prefer not to depend on Minio's own storage for this stuff. Instead what I had in mind is this kind of layout for the tarball:
With That way the backup is in no way MinIO specific, making it possible to import into a Ceph pool instead as well as allow us to move to something other than MinIO in the future should we want to. |
That means that on restore, we'd create the DB records from the data in backup.yaml, initialize a new MinIO or Ceph-object instance, add in the keys from the DB records and then push the data back into the bucket. |
Thank you very much for your advice. At the moment I am using So to achieve the layout you mentioned, I can't reuse Thanks in advance for your help. |
We're going to want two new functions in backend.go:
I don't think we'll need to get new functions in the individual storage drivers as we should be able to do things at a higher level. So basically having This approach will work fine with both MinIO and Ceph as the common thing they both provide is the S3 API. |
Storage buckets in Incus provide a basic S3 API served by either minio or the Ceph Object Gateway.
The API itself doesn't support anything regarding snapshots or backups, leaving the user to dealing with that on their own with tools like rclone.
While lightweight snapshots aren't really an option we can consistently offer, offering the option to backup a bucket should be fine. This would then add support for the usual export/import combination of commands.
The text was updated successfully, but these errors were encountered: