Reverting "zfs destroy" - accidentally created dataset with existing name

jm_

Member
Sep 30, 2021
6
1
8
32
Hi, yesterday I installed a fresh copy of proxmox. I imported one of my zpools from my previous install just fine. I then added a new ZFS storage on top of it via the GUI - trying to recreate my directory structure as it was before, I used the same name as on the previous install. Then I restored a VM that used this ZFS storage.

I'm pretty sure this essentially destroyed the old dataset and created a new one of the same name, as all of the data on the ZFS storage is gone.

The output of zpool history -il shows that a zfs destroy was called on the volume and shows the appropriate txg. Is it possible to somehow revert to that txg? This volume was never snapshotted as it contained unimportant data, but I would like to try to get it back anyway. Any help is appreciated
 
Last edited:
I've found a txg from before the destroy took place and tried to import the pool again, but this is the result:

# zpool import -N -o readonly=on -F -T 8947632 tank cannot import 'tank': one or more devices is currently unavailable

The pool and all its drives are ONLINE when calling zpool import. Any advice?
 
Last edited:
I have done that (otherwise it wouldn't show up in zpool import I think).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!