A recurring issue that I see in a few instances are places that still have requirements to externalize backups to tape for long-term storage (please don’t use the archive word). But on the other hand, it’s clear that disk to disk backup solutions that leverage the VADP protocols are considerably more efficient tools for VMware environments.
Now assuming you have a decent budget, I highly recommend Veeam Backup & Replication as a complete solution that now integrates tape externalization. But if you’re environment is smaller or can’t justify the investment when there are excellent “free” tools like VMware Data Protection available, here’s a potential solution for long term dump to tape.
Assuming that you have some kind of existing backup solution that write files to tape, the problem is that VMFS is pretty much an unreadable black box file system. This has been exacerbated by the fact that wuth ESXi the old fashioned approach of putting a Linux backup client in the Service Console is not longer really a viable option.
So we need a few little things in place here.
- A server with your backup software connected to the SAN (iSCSI or FC)
- A storage bay that can create and present snapshots (optional, but more efficient)
- The open source VMFS driver
Some assumptions:
- Your backup appliance is stored on VMFS3.x block storage, with no RDMs
The basic process involves the following steps:
- Stop the backup appliance
- Snapshot the LUN(s) for the backup appliance
- Start the backup appliance
- Present a cloned volume based on the snapshot to the backup server
- Connect to the LUNs using the fvmfs java applet and publish them over WebDAV
- Mount the WebDAV share as a disk
- Backup the contents using your backup software
Stop the backup appliance
In order to ensure a coherent state of the data on disk, you’ll want to stop the backup appliance. VDP can be stopped with a Shutdown Guest OS from the VI-Client or shutdown at the command line.
Snapshot the LUN(s) for the backup appliance
Snapshotting the LUN is an efficient method to have a copy of the appliance in the off state to ensure data consistency. Most systems will allow you to script this kind of activity.
Example using Nexenta recordings:1
create snapshot backuppool/vdp-01@totape
Since we have a snapshot, we can now restart the backup appliance using the VI-Client or whatever is easiest for you.
Present a cloned volume based on the snapshot to the backup server
Now that the appliance is running normally, and we have a snapshot with the appliance in a stopped state we can now continue with the extraction to tape process without any time pressure that will impact new backups.
So we need to create a cloned volume from the snapshot and present it to the backup server:
Nexenta example:
setup snapshot backuppool/vdp-01@totape clone backuppool/totape
setup zvol backuppool/totape share -i backupserver -t iSCSI
Now to verify that the presentation worked, we go to the backup server and (assuming a Windows Server), Computer Management > Disk Management. We should now see the a new disk with an Unknown partition type. Don’t try to format this or mount it as a Windows disk. From a practical standpoint, you won’t be doing any harm to your source data since it’s a volume based on a snapshot, not the original, but you want access to the source data. What you want to note is the name on the left side of the window “Disk 3”.
NB If you are using VMFS extents based on multiple source LUNs, you’ll need to present all of them so take note of the new disks that are presented here.
Connect to the LUNs using the fvmfs java applet and publish them over WebDAV
Still on the Windows server, you’re going launch the fvmfs java applet so you’ll need a recent java.exe. At the command line, navigate to the folder containing the fvmfs.jar file and launch it using the following syntax:
“c:\Program Files\Java\jre7\bin\java.exe” -jar fvmfs.jar \\.\PhysicalDrive2 webdav 127.0.0.1 80
If you are using extents, note the disks with the same syntax, separated by commas.
The WebDAV share is mountable on modern Windows systems with the classic “net use Z: http://localhost/vmfs”.
If you have the misfortune to still be using Windows 2003, you’ll also need to install the WebDAV client which may or may not work for you. If it still doesn’t work, then I recommend trying out WebDrive for mounting WebDAV shares to a letter.
Once the drive is mounted to a drive letter, you’ll have near native access speed to copy the data to tape.
Tear down
Cleaning up is mostly just walking through the steps in reverse. On the server doing the backups, unmount the drive by closing the command prompt running the fvmfs applet or control-C to kill the process.
Then we need to delete the cloned volume, followed by the snapshot. Another Nexenta example:
destroy zvol backuppool/totape -y
destroy snapshot backuppool/vdp01@totape -y
Restoring data
To keep things simple, restoring this kind of data is best done to an NFS share that is visible to your ESXi hosts. This way you can restore directly from tape to the destination. The fvmfs tool presents a read-only copy of the VMFS datastore so you can’t use it for restores.
Under normal conditions, this would be a very exceptional event and should be to some kind of temporary storage.
Other options
A simple approach for extracting a VDP appliance is to export the system as an OVF, but there are a number of shortcomings to this approach: - it’s slow to extract - it can only extract to via the network - you need a big chunk of temporary space
NB: This is a specific approach to the specific problem of long term externalization. In most operational day to day use cases, you’re better off using some kind of replication to ensure availability of your backups.
-
Nexenta recordings are a method of building scripts based on the NMS command line syntax. They are stored in the .recordings hidden directory in /volumes and are simple text files that you can launch with “the “run recording” from the NMS command line without diving down to the expert mode raw bash shell. ↩︎