In my case I've got RAID1 (zfs mirroring) setup on 2x 4TB HDD - one of them start dying, loose data and have some broken sectors and require replacement.
1. I've detach old, broken one HDD and add new, empty one
2. My accident - copied partition table from new (empty) drive to current healthy one and lost data
3. Detach new one, attach old (dying) and copy partition tables back (so I've got m data back)
4. Replace HDD once again and resyc raid again - this time in correct direction (so from my working drive to new one )
On the end - I've got all my data back and RAID rebuild.
1. I've detach old, broken one HDD and add new, empty one
2. My accident - copied partition table from new (empty) drive to current healthy one and lost data
3. Detach new one, attach old (dying) and copy partition tables back (so I've got m data back)
4. Replace HDD once again and resyc raid again - this time in correct direction (so from my working drive to new one )
On the end - I've got all my data back and RAID rebuild.