ZFS Syncoid : merge two sets of snapshots together (feature request) #906
Replies: 3 comments
-
For a more complex examples:
|
Beta Was this translation helpful? Give feedback.
-
What you're asking for isn't really possible in ZFS, let alone sanoid/syncoid. The closest thing to what you're looking for would be to make certain you do NOT delete the last common snapshot MAIN1 had with BACKUP1 before you send BACKUP1 off to Drivesavers or whoever. Then you build your BACKUP2. Then when BACKUP1 returns from the drive recovery outfit--which, honestly, it's probably not going to in the way that you think it is; they typically are only going to recover files from the main filesystem, not restore every snapshot--but assuming you did, in fact, get your actual original BACKUP1 system back with its pool intact, you could then simply replicate BACKUP2--which will still contain the last common snapshot between MAIN1 and BACKUP1--onto BACKUP1. At that point, you just back up directly from MAIN1 to BACKUP1 again, and you tear down BACKUP2 for parts, repurpose it for something else, whatever. Your second idea, of mixing and matching snapshots that are "not exactly sequential" and "on a mix of different days"--is literally impossible to do with ZFS replication, sorry. |
Beta Was this translation helpful? Give feedback.
-
thanks for your input on this, Jim |
Beta Was this translation helpful? Give feedback.
-
Would be handy to help merge two sets of ZFS snapshots together into one clean separate filesystem with all snapshots.
For example,
If there are 3 servers, each have the same ZFS version.
MAIN
,BACKUP1
,BACKUP2
MAIN
server data files/main-pool/data
(in ZFS filesystemmain-pool/data
)main-pool
toBACKUP1
zfs poolbackup1-pool/main-pool/data
. (i.e. offsite backup)BACKUP1
server)After 3 months, offsite server room fire damages the computer and SSD drives. Bummer !
So I create a new server
BACKUP2
.MAIN
'main-pool' toBACKUP2
zfs poolbackup2-pool/main-pool/data
.After 69 days,
BACKUP1
SSD drive data has been recovered, and back up and runningI now have two older snapshot sets that I want to merge together into one complete set.
BACKUP1
backup1-pool/mail-pool/data
(first 90 days of MAIN)BACKUP2
backup2-pool/mail-pool/data
(day 91-160 of MAIN)One method is make a list of all snapshots and sort by date, then create a new filesystem based on the oldest to newest.
Would be great if syncoid could take several parameters and do the 'hand-waving with smoke-and-mirrors' automagically.
Something like...
$ syncoid --merge-source BACKUP1:backup1-pool/mail-pool/data --merge-source BACKUP2:backup2-pool/mail-pool/data --merge-dest BACKUP1:backup1-pool/mail-pool/data
NOTE:
Beta Was this translation helpful? Give feedback.
All reactions