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

Introduce a proper inc snapshot subcommand #9

Closed
stgraber opened this issue Aug 3, 2023 · 4 comments · Fixed by #46
Closed

Introduce a proper inc snapshot subcommand #9

stgraber opened this issue Aug 3, 2023 · 4 comments · Fixed by #46
Assignees

Comments

@stgraber
Copy link
Member

stgraber commented Aug 3, 2023

One bit of inconsistency that's always bothered me with LXD is that lxc snapshot and lxc restore are top level commands of their own. This makes it very awkward to allow for snapshot listing, renaming, ...

We've been wanting to fix this for years, but couldn't without breaking backward compatibility. As the fork doesn't pretend to be backward compatible at the CLI level, it's a good opportunity to fix that one.

@monstermunchkin
Copy link
Member

Should there be a proper subcommand for managing storage volume snapshots as well?

@stgraber
Copy link
Member Author

Yeah, I think we should do the same thing with lxc storage volume snapshot indeed.

@monstermunchkin
Copy link
Member

monstermunchkin commented Aug 14, 2023

I guess what we need is inc snapshot {create,delete,rename,copy,info,restore,list}. And the same for inc storage volume snapshot {create,delete,rename,copy,info,restore,list}.

inc rename (and inc move) and inc copy already support renaming and copying snapshots respectively. Should inc rename (and inc move) be limited to only support instances? I believe inc copy should keep some support for snapshots as one can do this: inc copy c1/snap0 c2. But we could drop snapshot to snapshot copying in inc copy.

Alternatively, this could be done in inc snapshot restore with a third positional argument like this:

inc snapshot restore c1 snap0 c2`

@stgraber what are your thoughts on this?

@stgraber
Copy link
Member Author

Yeah, agreed on the new commands.

For rename/move we should remove the snapshot support.

Copy would keep it but indeed only for creating a new instance from a snapshot.

Support in delete would go away too.

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

Successfully merging a pull request may close this issue.

2 participants