Initial offsite copy to USB drive then to offsite backup server question

curtishall

Dabbler
Joined
Feb 7, 2020
Messages
13
I have roughly 5TB of data that I have at one site that it would be faster if I just copied the initial dump to a USB drive and copy it to the backup server.

Is that possible? If so, will FreeNAS throw a fit about existing dataset and not overwrite to the drive? I'd prefer not to drag around a huge server if I can avoid it.

Would this work?

zfs snapshot -r SRC_POOL@backup-YYYY-MM-DD
zfs send -Rv SRC_POOL@backup-YYYY-MM-DD | zfs receive -vd /path/to/usb/drive/mounted

Thanks
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Folks have done that before... pretty much as you suggest.

Of course the USB must be formatted as ZFS first, so the mounted path would be /mnt/... together with your other pools.

I forget if the folks I have seen doing it have set up the replication first, stopped it, then replaced the target with the USB copy or if they put the USB copy there first, then set up replication... you should convince yourself first by starting with a tiny dataset and testing it out.

This post and the thread in general may be helpful (although a bit old) https://www.truenas.com/community/threads/replication-usb-drive.16808/post-99041
 
Last edited:

Adrian

Contributor
Joined
Jun 29, 2011
Messages
166
It is around a year so since I last did this, something along these lines to reconstitute a dataset within a pool. I snapshot and replicate backup my important datasets individually, not the entire pool. I do not use nested datasets other than the target structures on the remote machines (named /tank/remote/<source host>/)
With automatic snapshooting set up,
Send a snapshot to a ZFS formatted external disk (pool "transfer")
zfs send -R tank/music@auto-20191024.1808-8w > /mnt/transfer/music.zfs
Take the disk to the remote site.
Connect the disk and import it:
zpool import transfer
Receive the snapshot into the superior dataset
zfs receive -F -d tank/remote/<source host> < /mnt/transfer/music.zfs
Export the disk and disconnect it:
zpool export transfer
Set up replication.

Testing the whole process with a small dataset whose snapshot can be transferred quickly by other means (e.g.scp) would be a good idea.
 
Top