HOWTO: Backup and Restore FreeNAS Bootable USB Keys

I have several RAID5 NAS devices at home that are built upon the excellent FreeNAS.  One of the catches to using FreeNAS is that you must dedicate an entire drive to the operating system.  This means if you have say 3 1.5TB drives, you have to allocate (and therefore lose) 1.5TB of disk space to host a couple of hundred meg of operating system.  That’s obviously crazy and so the alternative is to simply boot off of USB.  I’ve been running this way for years and it’s been fantastic.  I got to thinking recently though – what happens if my USB key that I’m booting from fails?  I manually periodically backup the configuration so I can restore that but that only works once I’ve gone through all the trouble of rebuilding a new FreeNAS installation.  Wouldn’t it be easier if I could just clone the USB key and be done with it?

In my quest to do just this I discovered an excellent free piece of software called ImageUSB from Passmark. The software performed bit for bit duplication of a USB drive. It’s primary use case appears to be for mass duplication of USB drives (say to hand out at trade shows) but it has one feature in particular we want to take advantage of and that is the ability to save an image of a USB drive to a file.  Here’s how:

  • Download ImageUSB from http://www.osforensics.com/tools/write-usb-images.html
  • Notably, this software does not require installation and it’s a single standalone executable (yeah!)
  • Make sure the USB key you wish to copy is already inserted into your machine and run the application
  • In this case, you see that I have an 8GB USB Key with an Unknown File System.  This is because the key contains a FreeBSD bootable image

image

  • Select the USB drive, select Create from UFD (USB Flash Drive) and select an output file.  Then press Create Image
  • That’s it.  Congratulations you now have a backup of your FreeNAS USB Boot Drive (or WinPE image or anything else)

To complete a restore, simply insert a new USB key, launch the application and choose Write to UFD, select the file you made above and press Write to UFD.  It’s beautiful in its simplicity.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.