# ZFS Delta Export-Import-Merge Question



## rass (Dec 22, 2015)

Problem:

I have two virtual environments (one public and one private).  The two are disjointed.

My public virtual machines:

VM1, Windows 7
VM2, Windows 8
VM3, Windows 10
VM4, Red Hat
...

VM100, Windows 10

receive regular updates via the Internet.

My private virtual machines are the same as the public virtual machines, the only difference is that the public virtual machines are up to date.

Presently, if we want to update the private virtual machines, we need to export the public virtual machines, hand-carry them to the private network, delete the older private virtual machines and replace them with the newer public machines.

Question:

Can I use FreeBSD server and ZFS to speed up the process by performing a backup and restore on the block level, only restoring blocks that have been changed or been added?

Is the following possible:

1. Deploy two FreeNAS servers (one on the public network and one on the private network).

2. Create iSCSI volumes on both Free NAS Servers.

3. Mount the iSCSI volumes as ESXi VMFS datastores.

4. In the public virtual infrastructure, perform a one-time full block-level backup (is that a snapshot?).

5. Export the full backup to a external disk, carry it to the private virtual infrastructure and perform a restore.

6. In the public virtual infrastructure, perform an backup of blocks that have changed only.  

7. Export the and restore the significantly smaller backup.


----------



## junovitch@ (Dec 22, 2015)

Conceptually yes.  A full send/receive of the initial snapshot would provide a basis for doing incremental snapshots of just what has changed afterwards.  The handbook has some good information on the topic of using zfs(8) send and receive for snapshots to get you started.  Snapshots can also be piped into a file to use the external disk you mentioned above. 

https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/zfs-zfs.html

I would also advise on our policy regarding FreeNAS topics and that they are best suited to the FreeNAS forums.  However in this case of an air gapped transfer with an external disk I doubt it will make much of a difference and I would expect you to end up having to use the CLI for this anyway.

https://forums.FreeBSD.org/threads/pc-bsd-freenas-nas4free-and-all-other-freebsd-derivatives.7290/


----------



## rass (Dec 22, 2015)

Thanks for your response.

My instincts suspect that the CLI route may be better.

I have another question.

Can iSCSI be replaced with NFS in the aforementioned solution?  Is it possible to create a ZFS pool and share it via NFS?   If find that NFS is easier to use as VMFS datastore than iSCSI.


----------



## junovitch@ (Dec 23, 2015)

If you only have to serve files then NFS would work.  If you are using iSCSI to present a raw block device for another operating system to have its own file system on that that of course is another story.

Also a ZFS pool is just a bunch of disks.  You create a ZFS pool but then it's the ZFS datasets within that pool that will actually have files.


----------

