NetApp Backup and Recovery solution already lets you protect and restore entire Kubernetes and KubeVirt VM workloads, but a full VM restore is a heavy hammer when someone has just deleted the wrong file. This post walks through restoring or downloading files and folders from a VM-based application. Most of us just call this capability guest file restore: browse the files inside a snapshot of a VM’s disk, and either push just the files you need straight back into the running guest, or download them to your own machine as a single archive. No full VM restore. No boot-disk swap. No downtime.
Key highlights:
- Browse the guest file system inside a snapshot without booting or cloning the whole VM.
- Restore files back into the original VM, or into a different VM in the same cluster.
- Or skip restoring into a VM entirely and download the files as a .tar archive to your own machine, with no guest credentials needed for that path.
- Works across BTRFS, exFAT, ext4, NTFS, and XFS filesystems, on Linux and Windows guests alike.
In this post, we walk through both paths: restoring a file straight into a running KubeVirt VM, and downloading a file instead using NetApp Backup and Recovery.
Ready? Let’s dive in!
Guest file restore at a glance: a FlexClone of the VM’s snapshot is mounted and browsed by NetApp Backup and Recovery, and the selected files are delivered with Transfer to VM or saved as a .tar archive with Download file.
Before you begin
Make sure you meet these prerequisites before you restore or download files and folders:
- You need at least one restore point (a local snapshot) to browse the files inside.
- The VM’s disk needs a partition with a supported filesystem: BTRFS, exFAT, ext4, NTFS, or XFS.
- To restore files into a running VM, enable SSH on the destination: the SSH service on Linux hosts or an OpenSSH server on Windows hosts. (Downloading doesn’t need any of this; see below.)
- You need the Backup and Recovery super admin or Backup and Recovery restore admin role in the NetApp Console™ control plane.
Test environment
For this walkthrough, the VM being restored is ubuntu-vm, a KubeVirt virtual machine already discovered and protected by NetApp Backup and Recovery, with at least one snapshot restore point available. With the VM protected, we are ready to restore a file.
Restore files and folders to a VM
From the NetApp Backup and Recovery menu, we select Restore, choose our Kubernetes application from the list, and select View and Restore. This surfaces the list of restore points. We select the Actions icon on the restore point we want and open the Restore files and folders menu.
We select the source location to restore from (snapshot), then select the virtual machine to browse and select Next. The file browser appears and mounts every browsable partition from the snapshot a FlexClone volume of the snapshot is created and mounted behind the scenes.
Once mounted, the wizard shows us the partitions it found on the disk:
The mounted snapshot exposes an ext4 root partition plus two smaller boot and EFI partitions.
We open a partition to browse its files and folders, and see the familiar Linux directory structure:
The Linux directory structure (boot, dev, etc, home, lost+found, media, and mnt) browsed directly from the snapshot clone.
We keep drilling down to the file we want, which in this case is in home and then the ubuntu user’s home directory. Selecting the checkbox next to a file or folder adds it to the Selected Files and Folders panel on the right:
Checking the box next to a file or folder adds it to the Selected Files and Folders panel on the right.
With .profile selected, we select Next.
Choose a transfer mode and destination
This is where the two paths split. For this section, we select the Transfer to VM transfer mode, then choose our destination settings:
- Restore to original VM: Restore back into the VM that was backed up. We then choose where on that VM the files land (see below).
- Restore to alternate VM: Restore into a different virtual machine in the cluster. Pick a VM from the list and enter a destination path.
When we restore to the original VM, there are two location choices:
- Same location: each file goes back to the exact path it was backed up from, for example /partitions/sda1/home/ubuntu/.
- Alternate location on the same VM: we type a different destination path on the same VM. This is useful when we want the restored copy alongside what is on the VM now, instead of at its original path.
We’re restoring to the original VM, at the same path it came from:
Restoring to the original VM (ubuntu-vm), to the same path as the backup /partitions/sda1/home/ubuntu/.
Either way, in the Guest virtual machine credentials section we select the credentials for the guest VM or select Add credential if we haven’t saved one for this VM yet. These credentials are securely stored on the Console agent running inside your environment, not in NetApp Console. Guest VM credentials are unique per guest, but can be reused by any cluster on the same Console agent, so restoring to an alternate VM just means picking a different saved credential from the same list:
Restoring to an alternate VM requires a saved Windows or Linux credential before the wizard pushes files into the VM.
For this walkthrough we stay with the original VM and select Next.
Review, confirm, and watch it restore
The wizard shows us a final summary (the VM and volume, the file we selected, the transfer mode, and the destination) before committing. Everything looks right, so we select Restore.
The Restoring files and folders screen shows live transfer status for the file. We could select Run in background and check back later, but it’s a small file, so we just watch:
.profile, 0.79 KiB, transferring to ubuntu-vm.
A few seconds later, the status flips to Restore complete, with the file marked Complete:
1 of 1 items restored. The file is back on the live disk of ubuntu-vm, exactly where we sent it.
We select Done. No VM restart, no full-disk restore, and no waiting around.
Or just download the files instead
Sometimes the Backup admin doesn’t have access to the VM credentials, but is still asked to restore specific files and folders. For that, the flow is almost identical up through browsing and selecting files: Restore → pick the application → View and Restore → Actions on a restore point → Restore files and folders → select the source (snapshot) and VM → browse and select the files or folders → Next.
The difference is at the transfer-mode step: instead of Transfer to VM, we select Download file, then Next, review and confirm the download settings, and select Restore. There’s no destination VM to choose and no guest credentials to supply, because downloading doesn’t need either. Our web browser handles the transfer, and the selected files and folders are saved to our local machine as a single .tar archive. Downloading is not open access: it requires the same Backup and Recovery super admin or restore admin role in NetApp Console. What it skips is the guest VM login.
Getting the downloaded files onto a VM yourself. If you download instead of transfer, NetApp Backup and Recovery has done its job once the .tar lands on your machine. Putting the files onto a VM after that is up to you, the same way you’d move any file to a VM. The common ways people do this:
- SCP/SFTP: Extract the archive and use scp/sftp to copy the files to the guest over SSH, the same access path the built-in Transfer to VM option uses internally. This works for any KubeVirt VM that has reachable SSH.
- virtctl scp: If you use the KubeVirt virtctl CLI, its scp subcommand copies files to a VM by name, so you don’t need to look up the VM’s IP address.
This manual step is independent of NetApp Backup and Recovery. Use the download path when you want the files off-platform rather than back on a specific VM, and use Transfer to VM instead when you already know the destination VM and just want the platform to handle delivery for you.
Conclusion and call to action
Restoring or downloading files and folders from a VM-based application turns a full-VM recovery problem into a few clicks: browse a snapshot, pick the files, and either push them straight back into a running KubeVirt VM or download them as a .tar archive, with no downtime, no spare VM, and no boot-disk replacement. Both Linux and Windows guests are covered, across BTRFS, exFAT, ext4, NTFS, and XFS filesystems, restoring from a local snapshot.
Have a file-recovery scenario you’d like to see covered, or feedback on the flow above? Drop a comment below.