Question About CSI Driver Compatibility and Backup Target in Harvester

Hi Harvester Community,

I am currently using Harvester with a custom CSI driver to manage volumes for my VMs. My CSI driver allows me to create snapshots of individual volumes, but I am particularly interested in leveraging Harvester’s backup target feature to perform VM-level backups (which include VM metadata, configuration, and all associated volumes).

I understand that Harvester uses Longhorn as the default storage engine, and it attempts to manage snapshots and backups via Longhorn when using the backup target feature. However, since I’m using my custom CSI driver for VM volumes, I’m unsure about:

  1. Compatibility:
  • Does the Harvester backup target feature work when the VM volumes are managed by a custom CSI driver instead of Longhorn?
  • Can Longhorn treat my CSI-managed volumes as raw data during the VM backup process?
  1. Restoration Process:
  • If backups can be performed successfully, does the restoration process support reattaching custom CSI-managed volumes to the restored VM?

I’ve also noticed some unexpected behavior where Longhorn tries to build a mount path for the volumes, and I am not able to specify mount options when creating nfs backup target.

For additional context, I’ve raised a GitHub issue describing my setup and concerns:
Harvester Issue #7019

I’d appreciate any guidance or shared experiences from the community regarding the compatibility of custom CSI drivers with Harvester’s backup and restoration workflows.

Thank you for your time and support!

Best regards,
Julien

Your questions are well-founded. According to the official Harvester v1.7 documentation on Third-Party Storage Support, here are the definitive answers:

1. Does the Harvester backup target work with a custom CSI driver?

No. The official documentation is explicit: “Backup support is currently limited to Longhorn volumes. Harvester is unable to create backups of volumes in external storage.”

This means the Harvester backup target (NFS/S3) backup feature only works for volumes provisioned by Longhorn (V1 and V2 data engines). If your VM volumes are managed by your custom CSI driver, Harvester cannot use its VM-level backup feature for those volumes.

2. Can Longhorn treat custom CSI-managed volumes as raw data for backup?

No. Longhorn is only aware of volumes it provisions itself. Volumes managed by an external CSI driver are PVCs handled by that driver, and Longhorn has no visibility into them.

3. Does restore support reconnecting custom CSI-managed volumes?

Since backup of external CSI volumes is not supported, restore of those volumes through Harvester’s mechanism is not supported either.

What you CAN do with a custom CSI driver:

  • Create snapshots of your CSI volumes using your driver’s own snapshot mechanism (via VolumeSnapshot CRD).
    • Configure the csi-driver-config in Harvester settings to register your provisioner and its VolumeSnapshotClass for VM-level snapshot support.
      • Use the VM snapshot feature (not backup) — snapshots are stored in-cluster and may work with external CSI drivers if the driver supports the snapshot capabilities listed in the docs (volume expansion, snapshots, cloning, RWX for live migration).
    • The key distinction:
      • VM Snapshots = stored in-cluster, may work with external CSI if the driver supports snapshots.
        • VM Backups = stored off-cluster (NFS/S3), Longhorn-only.
      • Reference: Official Harvester docs > Advanced > Third-Party Storage Support