USB backup of ZFS pool possible?

Joined
Jun 24, 2017
Messages
338
Hey folks,

Got a really small NAS deployment to be used as a document server (single 120GB SSD drive, they won't use more than maybe 40gb of it). I have no option to install a second hard drive, but do have a slew of fairly large USB thumb drives laying around.
Question is, can I use a 128GB thumb drive to keep a fairly constant backup of the documents on the server? Or should I just make 1 or 2 external HDDS in portable shells and create a zfs from the internal SSD and 1 or 2 external (USB3) SSDs?

The other option I had considered (but have 0 ideas how to implement) were to have a removable drive that when plugged in, rayncs the entire system... Or at least the zfs pool the documents are stored on.

If any of this is possible, PLEASE point me in the right direction.

Wants (but not an actual NEED):
Encrypted external drive.
USB thumb drive(s) used
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Many different things can be done. Most depend on you or a clock initiating something.

This thread has some ideas of how to get to a scripted backup to an external drive:
 
Joined
Jun 24, 2017
Messages
338
Many different things can be done. Most depend on you or a clock initiating something.

This thread has some ideas of how to get to a scripted backup to an external drive:
Excellent. I think this is exactly what I'm looking for. And, I think, clock implemented tasks are perfect. Something like @ 6am (it's a bar/restaurant so no one is in at 6am), rsync all data to (I think I'm going to go with double redundancy and use 2 128gb USB thumb drives) USB drives. I didn't see anything in there about encryption but I think I can figure that part out on my own.

Much appreciated!

(On a side note, it looks like I probably don't want to use ZFS on a single ssd drive with non-ECC ram... Am I correct about this? And what would be the best alternative to reduce incidents of bad data? (Ext3? Ext3?) Mind you, this is strictly a document server. There are no apps or databases stored on this machine. And honestly, not even financials are kept on this PC. It is a hub for cooks/management to change menus, create ads, etc...)
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
it looks like I probably don't want to use ZFS on a single ssd drive with non-ECC ram... Am I correct about this?
It can certainly be done... what's the concern?

You will be unable to recover from the errors you can detect via ZFS checksums on that drive (unless you specify copies=2 or more).

If that drive dies, you lose it's content (which is only a backup anyway)... which is the same for any filesystem you would use.

TrueNAS will only interact (via GUI services) with ZFS.

what would be the best alternative to reduce incidents of bad data? (Ext3? Ext3?)
ZFS in a mirror is already the best option for that purpose. If it was important enough to you, you would buy ECC RAM (and a system that supports it), but it's entirely up to you.

I didn't see anything in there about encryption but I think I can figure that part out on my own
Just select encryption when you create the pool/datasets. You may want to use passphrases if you're concerned about the whole box being stolen and you want the encryption to protect the data in somebody else's hands... but then you need to input that passphrase on every boot/mount of the pool.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Joined
Jun 24, 2017
Messages
338
It can certainly be done... what's the concern?

You will be unable to recover from the errors you can detect via ZFS checksums on that drive (unless you specify copies=2 or more).

If that drive dies, you lose it's content (which is only a backup anyway)... which is the same for any filesystem you would use.

TrueNAS will only interact (via GUI services) with ZFS.


ZFS in a mirror is already the best option for that purpose. If it was important enough to you, you would buy ECC RAM (and a system that supports it), but it's entirely up to you.


Just select encryption when you create the pool/datasets. You may want to use passphrases if you're concerned about the whole box being stolen and you want the encryption to protect the data in somebody else's hands... but then you need to input that passphrase on every boot/mount of the pool.

It can certainly be done... what's the concern?

You will be unable to recover from the errors you can detect via ZFS checksums on that drive (unless you specify copies=2 or more).

If that drive dies, you lose it's content (which is only a backup anyway)... which is the same for any filesystem you would use.

TrueNAS will only interact (via GUI services) with ZFS.


ZFS in a mirror is already the best option for that purpose. If it was important enough to you, you would buy ECC RAM (and a system that supports it), but it's entirely up to you.


Just select encryption when you create the pool/datasets. You may want to use passphrases if you're concerned about the whole box being stolen and you want the encryption to protect the data in somebody else's hands... but then you need to input that passphrase on every boot/mount of the pool.
I'm only concerned about security on the USB drives. The physical system itself will be locked to a shelf system in a locked room that is only supposed to be accessed by management and is in a customer unfriendly location in the locked building. Mostly, I don't want someone just snatching the external drives and doing whatever someone would do something like that would do with that information... I assume add $2 top shelf martinis to the menu or something dumb? ;) (Honestly, bigger fear is creation of cash gift certificates that are very rarely, but occasionally created. They tend to be created for larger sums than a traditional gift certificate would be generated (normal GCs are created on credit card style GCs. The paper ones are for... Um. Larger cash transactions and the such)... I'll leave it at that.
 

rvassar

Guru
Joined
May 2, 2018
Messages
972
A couple thoughts:

ECC also defends against Rowhammer attacks. Honestly, I'm kind of surprised it hasn't been universally implemented all the way down to laptops at this point. There's really no justification other than the $$ for the extra chip at this point.

Understand USB is not considered a reliable storage bus. It's prone to disconnection, power draw limit cutoffs, etc... That doesn't mean ZFS won't use it. You can mirror your small SSD to another device, thumb drive or portable HDD, etc... over USB and do a "broken mirror" backup. If you encrypt the pool, your data will be encrypted on the portable drive when disconnected. You can also just create another pool and import / export it as needed to perform backups.
 
Top