Backup FreeNAS to a Windows machine

Status
Not open for further replies.

Mr.N00bLaR

Dabbler
Joined
Jul 23, 2014
Messages
13
I would like to back up my FreeNAS array to a windows machine. Why not another FreeNAS box? I don't want another FreeNAS box (if possible?) - I would like to back up the data on my FreeNAS server to a Windows Server 2008 or 2012. This is all for my personal lab at home so backing up to a Windows server box is also kind of for experience :)

I've seen some older guides for backing up windows clients to FreeNAS but never FreeNAS to a windows client. I'm not really sure what the best way to accomplish this task is... Ideas?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
There's lots of ways to do it.. the question is which is most palitable to you and your hardware/software configuration.

You could do rsync.

You could do zfs snapshots saved to files.

You could do something like xcopy from SMB shares.

The options are almost endless.

The real question is what is best for you. Only you will know the answer. And you will only know the answer after you research all of the options, their advantages and disadvantages, and then decide what is right for you.
 

Mr.N00bLaR

Dabbler
Joined
Jul 23, 2014
Messages
13
Hmm.. Maybe I jumped the gun in assuming some of those strategies wouldn't work. From the way posts seem to be written on forums it almost seemed like freenas could only back up to freenas or other zfs or linux machines.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
cyberjock gave you a couple of suggestions that would work with Windows.

Other folks use Robocopy, Richcopy, Deltacopy, and a host of others programs.
 

Mr.N00bLaR

Dabbler
Joined
Jul 23, 2014
Messages
13
Hmm, I'm not having much luck... It does not appear that many people (or anyone) is using rsync (which seems to be the best solution, I think..) for syncing FreeNAS to Windows. I have not found any threads where someone has outlined a method that works. It most certainly seems to be the case that people are backing up Windows clients to FreeNAS though. Maybe I should consider an Ubuntu VM or another FreeNAS server.


My setup:

FreeNAS - Dell C2100
2x L5520s
24GB RAM
6x2TB drives in RAIDZ2
Dell SAS 6/IT
This will have several extents for serving iscsi storage for ~10-20VMs


Back up to FreeNAS - Dell c1100
This is actually an ESXi host. It will have one VM stored on the local disks, the back up to FreeNAS. My plan was to use 2008R2 if possible but I'm not understanding how to get data to this. I suppose I could be flexible and to Ubuntu since I could stand to improve my knowledge base.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Rsync isn't hard. Take the options you see in those other threads and apply a little logic and reverse the connection
 

Mr.N00bLaR

Dabbler
Joined
Jul 23, 2014
Messages
13
I will admit I do not understand really anything about rsync but it seems that the windows clients for rsync are configured specifically in one direction, to FreeNAS. I suppose I should try to learn about rsync to see what's actually happening.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
You can configure the windows to be a 'server' with something like deltacopy.

Create a 'module' pointing it to a directory.

On FreeNAS, set up an rsync task to push to the windows IP, and use the 'module' name.

Set the task to run whatever schedule you see fit.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Why bother pushing from FreeNAS at all? Pick a piece of Windows backup software and back up the shares. Click, bang, done. If you want to get fancy with snapshots, zfs send to a file, or rsync... cool. But this is a simple as you want it to be. Every single Windows tool that can see a share can back up your files. It's only a matter of picking features.
 

Mr.N00bLaR

Dabbler
Joined
Jul 23, 2014
Messages
13
After a bit of experimenting I got folders from Freenas to my Windows 8 test machine amd folders from my Windows 8 test machine to FreeNAS. I got my extent, extent0, to my Windows 8 box but in having trouble syncing the extent back to FreeNAS. Is there something I need to do differently for an extent? Do I need to send it as root from my Windows machine?



Edit: ^^^ I suppose if I could see the extents from my Windows box that may simplify things a bit. It just occurred to me, maybe I can out the extent into /mnt/storage/test and copy with a user I set up on cifs for /test..

More fun for tomorrow
 
Last edited:

Mr.N00bLaR

Dabbler
Joined
Jul 23, 2014
Messages
13
I picked up with this again this week. It seems I wasn't paying enough attention - I think I can't sync the extent file back to FreeNAS because I don't think I can write to /mnt/storage my volume. I can write to somewhere the user I'm using has CIFS permissions set though. I don't think I can use the extent there though? How can I write to the volume where extents live or /mnt/storage as opposed to /mnt/storage/test ?

I also wanted to ask about copying the extent file. I plan on slicing the available storage up into many extent files. Most will be for an OS (VM) and some will just be storage. Can I copy the extent file if say it's got a Windows 7 VM currently on and doing tasks? If I can successfully copy it, what will be copied? The extent the way it was when the copy started or any changes made during the copy or should I be powering the VMs off then copying?

Thanks for all of the help!
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
Are you talking about iscsi extends ? Cause what you are saying here is a big nono..

A) Don't share those extend files through any other protocol then iscsi
B) No .. really.. don't
C) you should never attempt to copy those files back to their original place. and defintely not when they are being read/write from the initiator ( whoever that might be)
D) putting iscsi file extends back does not assure you it will work again ( read this thread: https://forums.freenas.org/index.php?threads/moving-and-iscsi-file-extent-not-working.13607/ and this bug report: https://bugs.freenas.org/issues/2374)

If you need to backup iscsi targets, i would perform this from their initiators ( esx, windows, whatever) and use a backup tool native to the block device ( for example: use veeam for esx datastores instead of trying to copy the whole extend file)
 

Mr.N00bLaR

Dabbler
Joined
Jul 23, 2014
Messages
13
That is certainly not what I was hoping to hear but I can work with this still. My plan now is just to use Windows backup / sync features and have a second set of locally stored VMs on my ESXi server. Thanks for the help!
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
Just a little hint: Use zvol's instead of extends and replicate that. Keeping a second set of vm's is an option depending on your usage case, but a bit strange. There are far better ways to do this. I also think you should rewrite your question to specify WHAT you are tryin to attempt. All answers above were assuming you were trying to backup some documents from freenas to a windows box. Turns out you want to backup block devices.. a world of difference

Bonus tip: reading your question,i can only assume you are obviously jumping in the deep end of the pool before you started swimming class. Make sure you don't put anything of importance on those systems. You are going to lose data and you should be gratefull that you haven't already tinkering with those extend files.
 

Mr.N00bLaR

Dabbler
Joined
Jul 23, 2014
Messages
13
Just a little hint: Use zvol's instead of extends and replicate that. Keeping a second set of vm's is an option depending on your usage case, but a bit strange. There are far better ways to do this. I also think you should rewrite your question to specify WHAT you are tryin to attempt. All answers above were assuming you were trying to backup some documents from freenas to a windows box. Turns out you want to backup block devices.. a world of difference

Bonus tip: reading your question,i can only assume you are obviously jumping in the deep end of the pool before you started swimming class. Make sure you don't put anything of importance on those systems. You are going to lose data and you should be gratefull that you haven't already tinkering with those extend files.


Hmm, yeah I suppose I didn't really explain very well what I want to do... I plan on having ~10-20 of my home lab VMs live on FreeNAS. No data in the sense of photos, media, stuff I want to keep for ever and ever is planned to live on this FreeNAS server. As it stands right now, were I to lose my FreeNAS data (the data store for all of my VMs), it would be a week or two worth of inconvenience but I wouldn't have any scars. This is after all a home lab :)

Also, I use free ESXi so, I have none of the awesome vcenter options.

The original plan was to say good bye to the disks in my C1100 that my VMs currently live on to free up a PCIe slot. Buuuut since I could probably snag a cheap mezzanine card off of eBay its not a big deal either way.

I was hoping the back up could be as simple as save extents on a 2008 VM (supported by raid 1) that I could restore another FreeNAS implimentation from.

The extent that I copied was being used as an extra hard drive for testing purposes for my desktop and I copied it over night. I did delete that as well as entire volume to start over.

Right now I was planning on sharing 1TB worth from FreeNAS to my ESXi server. From what I read, I should plan on only filling this to 50-60% so, 500-600GB for OS's seems doable. I will of course thin provision the vms in vmware. I'm assuming I'll be ~50-55% full (of my 50-60% of the 1TB) on average.

I'm not sure what you mean by using zvols instead of iscsi extents? Do you mean do something like use a CIFS share for a datastore on vmware? I went down that road, they removed that functionality in version 2 I guess...sads. I don't know much about NFS but that would probably work, maybe..?

I may want to create another iscsi extent btw.. Think there would be a problem if I shared a few larger iscsi extents?
 
Last edited:

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
Not much sense,make i can from your post ;-)

Anyway: there are plenty of backup solutions which will allow you to backup your esx datastore, even for ESXi . Often offered for free aswell as a teaser for the enterprise products and for home labs. You should read up on those ( for example here: http://www.virtxpert.com/free-infrastructure-resources-host-network-storage-and-more/ ) no need for awesome vcenter options. In the end all you want to do is a copy of a bunch of files. This can be done using zfs snapshots or even simple rsync from the ESXi host.

I have no idea what you mean with "vm's living on to free up a PCIe slot" ? You mean passthrough ?

In theory, it should be possible to copy the file extends. But: all vm's should be turned off, preferably even iscsi turned off. Next to that, i've read about multiple attempts to recover these ( including a 3 day session i tried myself) results are unpredictable to say the least. i'd still go with datastore backup through the appropriate layer OR do a good read of the FreeNAS / ZFS manual and figure out what you want to do. If this is just some playing around for your homelab, no worries.. that's where the fun can be

Concerning zvol and File extends, you should read up in the manual or google those. In essence, zvol is a block device created over zfs. File extends does the same thing but stores this all in a file. Using thin provisioning on both is just fine ( you could even thin provision the block device) but know that you do take a performance hit if you do this over creating a thick vmdk. This will hurt you worst when you have lot's of random access ( database etc) because of defrag

Size should not really matter as long as you keep to the 40 -50% usage. I have several 3TB+ block devices with zero issues.

Point of my comment is: you need to do a lot of reading. I've got the feeling you are fiddeling with stuff, software and protocols you are not familiar with. Nothing wrong with that but google might be your friend here. First try to understand WHAT you are doing... Then, if you have specific questions, ask those.

Edit: removed remark about nfs. Just read a couple of threads clearly stating that ISCSI using ZVol's is the recommended way to go. https://forums.freenas.org/index.php?threads/esxi-nfs-datastore-what-are-best-practices.26947/
 
Last edited:

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
For $200 USD/year you could buy VMUG Advantage which includes VMware EVALExperience. I haven't done it (lack of time), but am considering doing so.

Also, I use free ESXi so, I have none of the awesome vcenter options.
 
Status
Not open for further replies.
Top