I accidentally executed
sudo shred -v -n 0 -z /dev/sdb
to prepare a thumb drive for formatting. But /dev/sdb was my external hdd. Although I immediately became aware of my mistake and pressed ctrl+c
lsblk
shows that the ext4 partition on the external hdd got lost. I think shred copied some zeros into the space where the partition table was.
Is there any hope, that I can get my data back? I already tried the data rescue option in gparted but the programm hangs on different devices when attempting this.
As there is limited information about the drive type it might help to say that from past experience with thumb drives you should firstly copy the whole disk using something like Win32DiskImager or if the HDD is too large for this then you might be able to copy the stored data area. Some of the recovery tools can potentially make things worse.
Next, there does seem to be some hope of restoring the data, these links should give more information.
http://www.tldp.org/HOWTO/Partition/recovering.html
https://www.linux.com/learn/how-fix-mangled-partition-table-linux
https://unix.stackexchange.com/questions/33284/recovering-ext4-superblocks