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

VolumeSnapshot support? #81

Open
rbren opened this issue Apr 3, 2020 · 11 comments
Open

VolumeSnapshot support? #81

rbren opened this issue Apr 3, 2020 · 11 comments

Comments

@rbren
Copy link

rbren commented Apr 3, 2020

Is it possible to support VolumeSnapshots, e.g. by making a copy of the directory?

@nvtkaszpir
Copy link

VolumeSnapshots are bit more complex than just simple file copying.

If you just look for some backup process then local-path-provisioner is just using a directory/path in container - so you can copy fie but it is advised to stop container before file copying to avoid file corruptions, especially if the app stores extra data in memory (such as databases).
Something like this:

  • stop app container which uses that pvc
  • spawn new container and mount that pvc as read only, copy files elswhere, stop the container
  • start app container

Second step could be also done from host side.

What do you do in the backup process depends on the use case, this can be something like rsync, copy, rclone....

@rbren
Copy link
Author

rbren commented Jun 4, 2020

Yeah I understand that implementing the VolumeSnapshot API would involve a lot of work.

I'm specifically interested in being able to run tests that use the VolumeSnapshot API. Ideally I'd be able to do this with a KIND cluster and local-path-storage.

@nvtkaszpir
Copy link

You could try to run different provisioner one provisoner on top of another, if supported :D

@haslersn
Copy link

Could this be supported if the backing filesystem on the host is btrfs?

@rbren
Copy link
Author

rbren commented Dec 7, 2020

Have learned a bit more since opening the issue.

In particular, stopping/starting the underlying pods is not part of the VolumeSnapshot API. The user is expected to handle all of that, esp if e.g. they're running a database. The VolumeSnapshot API simply tells the storage provider to make a backup of the volume in its current state.

So I think adding VolumeSnapshot support may indeed be as easy as creating a tarball or copy of the directory (and then unpacking that to create a PVC from a VS).

@haslersn
Copy link

haslersn commented Dec 7, 2020

adding VolumeSnapshot support may indeed be as easy as creating a tarball or copy of the directory

Creating a tarball or copy is not atomic and therefore is not a "snapshot". Instead, a file system with snapshot support needs to be used.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Aug 28, 2024
@mlazowik
Copy link

Not stale

@github-actions github-actions bot removed the stale label Aug 29, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Oct 28, 2024
Copy link

github-actions bot commented Nov 3, 2024

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Nov 3, 2024
@mlazowik
Copy link

mlazowik commented Nov 3, 2024

Not stale

EDIT: looks like closed by bot are not reopened by bot

@derekbit derekbit removed the stale label Nov 3, 2024
@derekbit derekbit reopened this Nov 3, 2024
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

No branches or pull requests

5 participants