Journal 2THV Backing up FreeNAS to external drives

Backing up FreeNAS to external drives

by
in freenas on (#2THV)
I love this little device: it's an iXsystems MiniNAS running FreeNAS 9.2, with tons of disk space, RAM, fast network connections, all on a low-profile device that uses precious little energy (30W). Nice! And having all my important stuff on one box not only gives me the freedom to screw around with my desktops but simplifies and centralizes the work that goes into backing up my information.

It's tempting to be lulled into security by a hefty NAS running the ZFS file system on RAID-6. Yes you've got some redundancy and a resistant file system. But RAID is not backup - a mistake too many make. And here I ran into some trouble. FreeNAS gives you tons of options for transferring zpool datasets around, and since it's networked you can rsync your heart's content to other systems, but what if you just want to back the stuff up to a hard drive locally? Like an external, USB hard drive? Turns out, there's a way, but it requires a bit of Unix-foo.

Fortunately, this is FreeBSD, so lots of things are possible. The rest is at my website, www.therandymon.com.
Reply 5 comments

Removable File System (Score: 1)

by bryan@pipedot.org on 2014-10-22 06:34 (#2TJY)

The world is sorely lacking a sane removable file system. FAT has tons of technical and political problems and yet it remains the only filesystem that is even remotely feasable for cross platform removable disks.
  • Small single file size limit (4.2 GB)
  • Small total drive capacity
  • Microsoft's long filename patents
  • Non-free extensions that only work with Microsoft operating systems
If you live completely in Linux, you can format your drives as ext4. But good luck trying to get Windows or Macs to see it.
If you live completely in Apple-land, you can format your drives as HFS+. But good luck trying to get either Windows or Linux to see it.
If you live completely in Windows, you can format your drives as NTFS. Linux does have multiple competing options of supporting NTFS, but they all basically suck (read only, disables journal, etc.)

Case in point:
My car's stereo system has a USB port that you stick a thumb drive into to play mp3s. Guess what the only supported file system is?
New smart TVs have USB ports that you can stick a thumb drive into to play MP4s, MKVs, and AVIs. Guess what the only supported file system is?
My digital camera uses an SD card to store photos and videos that I take. Guess what the only supported file system is?

Re: Removable File System (Score: 2, Interesting)

by evilviper@pipedot.org on 2014-10-22 16:06 (#2TK5)

Ext2 is more compatible than you'd expect. There are 3rd party drivers for Windows and OS X that work very well. The problem is, Windows won't read anything but the first partition on a USB drive, so you can't have a small FAT partition with the drivers, and the rest Ext2. Some firmware tricks could do it, but no companies seem to care about the patent licenses and other problems with FAT32/exFAT, so I end up carrying around two USB thumb drives.

Plus, a surprising number of embedded systems are Linux based, and the developers just don't disable Ext2, so it sometimes works even when not mentioned anywhere.

It would just take a couple digital camera manufacturers to adopt Ext2 (instead of exFAT) and include it in their drivers, and Google making Ext2 the default for Android. Then Microsoft and Apple would quickly be forced to include it by default to avoid being left out and seen as OSes that don't "just work" with accessories.

Use ZFS send/receive. (Score: 2, Interesting)

by entropy@pipedot.org on 2014-10-22 22:48 (#2TKR)

Use zfs send/receive..either locally or via network. It should work great with minimal fuss. As to restoration FreeBSD/Linux/OpenSolaris should all work just fine. A backup doesn't need to be read by "anything", afterall..just read by something sufficiently common.

Re: Use ZFS send/receive. (Score: 1)

by zafiro17@pipedot.org on 2014-10-23 16:42 (#2TMN)

Good tips - that's my future strategy, once this one "ages" out. For the moment though, it's working well and I'm happy with it. You're right that backups don't have to be read by anyone other than the receiving system, but it's a nice bonus if you can test the drives' readability on a different machine/system, just to verify the writes are happening and the data is being correctly backed up. I had a database nearly get destroyed because I didn't verify the backups, and when it came time to use them I discovered to my horror they were bad. I won't forget that feeling soon, let me tell you.

Bryan makes some good points about the lack of universal file systems, too. NTFS, UFS, ZFS, HFS+ all have their positives and negatives, but it would be nice if manufacturers and systems-builders took into consideration of the need for something more transversal. FAT as a lowest common denominator is really f*cking low.

Re: Use ZFS send/receive. (Score: 1)

by entropy@pipedot.org on 2014-10-24 00:05 (#2TNM)

So load the backup on another machine of any ZFS-supported-OS. Perhaps for added benefit use one that isn't the originating platform. Since you seem to be sourced from FreeBSD, why not use one of the opensolaris variants? Import the disks, run a ZFS scrub(this is by definition how you're supposed to verify data)...and feel safe :)

For more familiarity Linux has a native ZFS implemenation now as well.

It truly would be great if certain commercial operating systems adopted ZFS. Their filesystems often seem dinosaur-like in comparison..because they are.