Skip to content

Snapshot integration

NGBackup takes a host-level snapshot of the source filesystem before a file backup, reads the data from the frozen, read-only snapshot and removes the snapshot when the job ends. Production files keep changing underneath while the backup sees a stable point-in-time image.

PlatformDriverHow it is enabled
LinuxLVM2 (thin and thick logical volumes)Enable Snapshot = yes in the Content
LinuxZFS snapshotsEnable Snapshot = yes in the Content
LinuxBtrfs read-only subvolume snapshotsEnable Snapshot = yes in the Content
WindowsVSS shadow copy (crash-consistent; open and locked files are read from the shadow copy)Enable VSS = yes (the default on Windows)

The File Daemon detects which driver matches each backed-up path. When no driver matches, or the snapshot cannot be created, the job reads the live tree and says so in the job log.

Content {
Name = "data-with-snapshot"
Enable Snapshot = yes
Include {
Options { Signature = SHA256 }
File = "/srv/data" # an LVM, ZFS or Btrfs filesystem
}
}

See Enable Snapshot and Enable VSS in the Content reference.

There is no native storage-array snapshot integration: NGBackup does not call NetApp, HPE, Dell or Pure Storage management APIs. To back up from an array-side snapshot, orchestrate it with job scripts that call the array vendor’s own CLI or API on the client:

  1. A RunScript with RunsWhen = Before and RunsOnClient = yes creates the array snapshot and mounts it on the client (for example under /mnt/array-snap).
  2. The job’s Content backs up that mount path.
  3. A RunScript with RunsWhen = After unmounts and releases the snapshot.
Job {
Name = "db01-from-array-snapshot"
...
RunScript {
RunsWhen = Before
RunsOnClient = yes
FailJobOnError = yes
Command = "/usr/local/sbin/array-snap create-and-mount /mnt/array-snap"
}
RunScript {
RunsWhen = After
RunsOnClient = yes
RunsOnFailure = yes
Command = "/usr/local/sbin/array-snap umount-and-release /mnt/array-snap"
}
}

The array-snap script is yours: it wraps the vendor tooling. See RunScript in the Job reference.

Restores are unchanged: data captured from a snapshot is browsed and restored like any other backup. See Restore, Instant Recovery & V2V.