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

New './kubestr file-restore' command to copy files from Snapshot to PVC #286

Closed
shlokc9 opened this issue Aug 9, 2024 · 0 comments · Fixed by #285 or #287
Closed

New './kubestr file-restore' command to copy files from Snapshot to PVC #286

shlokc9 opened this issue Aug 9, 2024 · 0 comments · Fixed by #285 or #287
Assignees
Labels
enhancement New feature or request go Pull requests that update Go code

Comments

@shlokc9
Copy link
Contributor

shlokc9 commented Aug 9, 2024

Description

The ./kubestr browse commands allow us to browse through the contents of a PVC or VolumeSnapshot either using a Filebrowser GUI service or a CLI output. We can use this functionality to further implement a command that copies any file(s) from the contents of VolumeSnapshot to it's source PVC.

Proposed changes

> ./kubestr file-restore --fromSnapshot <snapshot-name> --toPVC <pvc-name> -n <namespace>

This command would mount both the VolumeSnapshot (i.e. the restored PVC from snapshot) and it's source PVC to the browse pod. And when the Filebrowser service is exposed on the CLI, the users can select file(s) on it's GUI to copy from restored PVC to source PVC .

> ./kubestr file-restore --fromSnapshot <snapshot-name> -n <namespace> --path <some-file-path>

The --path flag here would let the user mention a specific path on the restored PVC to pick file(s) from and copy the file(s) on the source PVC without using the Filebrowser service. Instead of Filebrowser GUI, we would simply run a cp POSIX command where both the source path and destination path would be expected via the --path flag.

@shlokc9 shlokc9 added enhancement New feature or request go Pull requests that update Go code labels Aug 9, 2024
@shlokc9 shlokc9 self-assigned this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
1 participant