Skip to content
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

support for creating backups to S3 via snapshot mechanism #142

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

WanzenBug
Copy link
Member

@WanzenBug WanzenBug commented Nov 22, 2021

In addition to the normal "in-cluster" snapshots, the user can also select
backups to S3 by providing parameters when creating the snapshot.

The parameters can be used to set up a LINSTOR "remote" object, which
represents a S3 endpoint. Any snapshot using those parameters will be
created using LINSTORs backup feature.

Restoring from a snapshot that only exists on a remote location does works,
as long as the "remote" is configured beforehand. The CSI spec does not
pass any parameters when registring an existing snapshot.

This feature requires LINSTOR 1.18.0 to work. Previous versions did not
allow for customizing the snapshot name. This made it impossible to create
an implementation that adheres to the CSI spec, as there was no way to
map the requested snapshot name to any form of stable snapshot ID.

@WanzenBug WanzenBug force-pushed the backups branch 2 times, most recently from d92df25 to 6b3b76b Compare January 7, 2022 14:59
@WanzenBug WanzenBug force-pushed the backups branch 4 times, most recently from 4067bfe to 80a0fad Compare January 19, 2022 16:30
@WanzenBug WanzenBug force-pushed the backups branch 3 times, most recently from fbadc42 to 7dc8761 Compare February 17, 2022 14:02
@WanzenBug WanzenBug changed the title create s3 backups via snapshot class support for creating backups to S3 via snapshot mechanism Feb 17, 2022
@WanzenBug WanzenBug marked this pull request as ready for review February 17, 2022 14:03
@JoelColledge
Copy link
Contributor

I won't be able to review this immediately, but I will get to it.

Copy link
Contributor

@JoelColledge JoelColledge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have much insight into how this fits into the CSI driver as a whole, but the code looks good. Just a bunch of minor points.

examples/k8s/volume-snapshot-class.yaml Show resolved Hide resolved
pkg/client/linstor.go Outdated Show resolved Hide resolved
pkg/client/linstor.go Outdated Show resolved Hide resolved
pkg/client/linstor.go Outdated Show resolved Hide resolved
pkg/client/linstor.go Outdated Show resolved Hide resolved
pkg/client/linstor.go Outdated Show resolved Hide resolved
pkg/driver/driver.go Outdated Show resolved Hide resolved
pkg/driver/driver.go Outdated Show resolved Hide resolved
pkg/volume/snapshot_params.go Outdated Show resolved Hide resolved
pkg/volume/snapshot_params.go Outdated Show resolved Hide resolved
In addition to the normal "in-cluster" snapshots, the user can also select
backups to S3 by providing parameters when creating the snapshot.

The parameters can be used to set up a LINSTOR "remote" object, which
represents a S3 endpoint. Any snapshot using those parameters will be
created using LINSTORs backup feature.

Restoring from a snapshot that only exists on a remote location does works,
as long as the "remote" is configured beforehand. The CSI spec does not
pass any parameters when registring an existing snapshot.

This feature requires LINSTOR 1.18.0 to work. Previous versions did not
allow for customizing the snapshot name. This made it impossible to create
an implementation that adheres to the CSI spec, as there was no way to
map the requested snapshot name to any form of stable snapshot ID.

Signed-off-by: Moritz "WanzenBug" Wanzenböck <moritz.wanzenboeck@linbit.com>
@kvaps
Copy link
Member

kvaps commented Dec 29, 2022

@WanzenBug am I right that this code uses old "snapshot shipping" mechanism which is considered deprecated?

The snapshot ship command is considered deprecated and any bugs found with it will not be fixed. Instead, use the backup ship command with a remote pointing to your local controller. For more details, see the previous section.

@kvaps
Copy link
Member

kvaps commented Dec 30, 2022

@WanzenBug
Copy link
Member Author

Yeah, it only uses the new backups API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants