backup to usb drive

phaelax

Dabbler
Joined
Sep 1, 2022
Messages
18
I'm looking to create a backup of my data and apps but need it on an external device. If it's not already obvious as to why, qnap gave me another reason when my old nas got hit with ransomware (exploit in their firmware) a few years ago and made local snapshots useless. I don't want to leave the drive connected to truenas and will likely only be doing monthly backups if that. I read that if I attach a usb drive I have to create a new data pool, but how would it be affected if I remove that usb drive? Would I be better off connecting it to another system and backing up over ssh? I still have my qnap but I don't think the drives are large enough anymore, unless maybe I stripe all 4 drives and drop the mirroring (i'll have to check). I'm kind of holding off on trying to use the qnap because it does still have encrypted files that I hope I can recover some day, but maybe I can just move those off to an external instead.

An older thread (2015) advised against using a usb drive with zfs. I'm just looking for ideas on best course of action for creating an external backup.
 
Joined
Oct 22, 2019
Messages
3,641
You can do this, and there's nothing stopping you. A single-drive USB backup is better than no backup at all.

Just keep in mind that without redundancy, ZFS cannot repair corruption or resilver the pool on the sole USB drive. (OpenZFS 2.2 introduces "corrective receives", which can come in handy for these use-cases, if dealing with corruption / bit-rot on the destination. But it's not yet available in TrueNAS Core.)

You will have to create a new pool, using the sole USB drive as a striped vdev. ("Striped", when in reality it's just a single drive by itself.)

Every time you want to replicate, you'll need to plug in the USB drive, import the pool, run the replication, and then export the pool and disconnect the drive.

There are some "gotchas" and caveats, though.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Here are some hints:
 

exeter_acres

Explorer
Joined
Oct 8, 2020
Messages
54
I am a home user... not mission critical, so, Maybe not the best, but I just attach a USB drive to a client PC and then copy the files via the client to the USB drive... once the initial copy was done (yes, it takes a long time) I then use Synctoy to keep them up to date....
 

kiriak

Contributor
Joined
Mar 2, 2020
Messages
122
I use both ways

snaphot replication to an ext USB HDD -> it superfast, keeps snaphots and has some (even limited) of the ZFS filesystem advantages

backup to an ext USB HHH with a PC backup application -> in case I misconfigure the snapshot replication and in case my children will need an easy access to the data
 
Top