Idea is to create offsite/offline backup scenario. I plan to use large hard disks (connected to hot-swap usb dock) and to basically use disks as tapes.
Now, I have made my tests and I can replicate my datasets and zvols to this disk, it will move encryption settings as well and all works well.
My offsite disk is a single member of the Offsite Backup pool, but if I have more of those (in my case four) I need to create four offsite backup pools and also four sets of replication tasks which will be executed depending on which of the disks is currently attached to usb dock. Replication tasks will be triggered manually when fresh disk is attached.
My question is following; Is there a way to add all four disks into mirrored four way Offsite backup pool and then replicate only to the disk which is currently connected (there will likely be all kinds of alerts going on, but they happen in current scenario as well since my pool has only one drive in it). But is it possible to add disks to pool one by one even if other disk members are not present?
Also, how far off is this idea from some good practice? Any other ideas to make this simpler and more robust?
It sounds like it will cause problems. I think ZFS will not like it. I see you ending up with four disks, set up in a four way mirror, that do not match each other. I think ZFS will be looking for the latest disk you used and when the others are attached, the transactions will be out of sync.
I don’t know if a hot swap, USB dock is a good idea with TrueNAS. If it isn’t allowing ZFS to see the disks serial numbers, etc, it will be a cause for problems too.
Depending on the volume of data, consider making that a SATA/SAS enclosure.
I think that the replcation task works by pool name only. So, if the four disks hold four pools with the same name, a single task should take care to replicate to whatever avatar of the backup pool is present. The only requirement would be that the destination and backup still have a common snapshot.
Now you have a single backup pool that is a 4-way mirror instead of four single drive backup pools… And the idea involve bringing one member of the mirror way ahead of the others. I do not see happiness in there.
Maybe the trick Is just create all the pool with the same name, and always export the one “refreshed” without delete configuration. But you will obv limited to import only 1 disk at time.
Oh, I didn’t know that, if pool can not see serial number it will always think that same disk is inserted (that is the same effect as four way mirror setup).
Backup disks are only for offsite backup, they are not meant to be read or synced. Every time I pull disk from offsite backup back to truenas it should rewrite whatever is on it.
Just to be clear, in my truenas there are production pools (spinner pool and nvme pool), backup pool (separate spinner pool with copy of production data) and idea is to add offsite/offline pool.
As already pointed, if you lose snapshot in common, you have to destroy data before replicate again (or replicate from scratch).
If your snapshot retention policy Is too short, rotate 4 disks can be a lot of effort
So I have few pools (NVME with zvols of virtual machines and spinners with SMB shares and iscsi zvols).
Idea (task) is how to replicate only current state of the data to external USB disk fpr offsite backup.
The specific issue is how to replicate only current state of data, I need only a full copy of the current state; when I make replication it will copy the data and all of the snapshots (which I do not need, only current state).
Is there an option in replication to provide that?
You can setup a snapshot schedule so that you have a regular snapshot, and a retention such that only one or two snapshots are kept.
And then you can set the replication up so that “pending snapshots” are retained, until replicated.
If you chose a daily snapshot, then the replicated state would not necessarily be the “current” state,
Anyway, pended for removal snapshots are removed after they are replicated.
So, you can have a situation where you have only one or two snapshots in the backup, but the in-between ones will be kept until the replication is run.
[quote=“Stux, post:10, topic:26755”]You can setup a snapshot schedule so that you have a regular snapshot, and a retention such that only one or two snapshots are kept.
And then you can set the replication up so that “pending snapshots” are retained, until replicated.[/quote]
Ok, so let me see if I understand this correctly:
I can make multiple/parallel snapshot schedules (didn’t think of that, I have googled a bit and of course it works). I can have as many snapshot schedules as I wish, it is just that I have to be careful with naming scheme in order to keep them from conflicting with each other.
One might be my regular daily snapshot (with for example 30 days of retention) and other might be my offsite backup snapshot schedule. This snapshot could be (for example) also daily but with 2 day retention, and then when I make replication task to external media it will replicate full dataset and 1 older snapshot (one being current state of dataset, second being last day snapshot)?