How to handle zpool on external USB drive (command line)

Status
Not open for further replies.

divB

Dabbler
Joined
Aug 20, 2012
Messages
41
Hi,

As indicated in another post, I want to 'zfs send' y snapshots once each month to an external USB disk. I want to do this programmatically over ssh. I think of something like:

Code:
activate zpool into system
zfs send -i plvl5i0/dsvz1szcs@backup-20120820 plvl5i0/dsvz1szcs@backup-20120823 | zfs recv usbdrive/dsvz1szcs
zfs send -i plvl5i0/dsvz1szcs@backup-20120821 plvl5i0/dsvz1szcs@backup-20120823 | zfs recv usbdrive/dsvz1szcs
zfs send -i plvl5i0/dsvz1szcs@backup-20120822 plvl5i0/dsvz1szcs@backup-20120823 | zfs recv usbdrive/dsvz1szcs
deactivate zpool (so that it is not visible in system any more)


What is the best practice to do this? Can I add/remove a specific pool from the system without deleting it? Can I make sure that the USB drive's zpool is not automatically activated in the system until I manually do it?

Creating it would work like zpool create usbdrive /dev/da0 ?

Related question: Most probably I will use 2 drives to increase security which will be used in an alternating way. Is it wise to choose two different-named zpools or equal ones? For my script which does the zfs send/receive stuff it would be easier if they have the same name ....

Regards, divB
 
Status
Not open for further replies.
Top