Undeleting a whole reiserfs partition
Quoted 8 lines
Yesterday, by error, a 'rm -fr' slipped through to my /music partition, a 20GB reiserfs which was at arounf 85% full. SInce then no other activity took place on it. Is there any easy way to recover my files?
In the docs, it says you cannot undelete files in reiserfs partitions, since what you delete is most probable overwritten by the next comitted data. In my case, there has been no additional modification of the partition, though.
Today I did exactly the same thing (on a 3.9 GB partition though). I could have killed myself for doing it!
I first backed up the partition just to be safe:
dd if=/dev/hdsomething of=backupfie
losetup /dev/loop5 backupfile
then I tried:
reiserfsck --rebuild-tree --scan-whole-partition /dev/loop5 mount /dev/loop5 <mountpoint>
and what do you know! All my deleted stuff reappeared. As we speak I am restoring now the original partition.
I guess this only worked because immediatly unmounted the partition after my unfortunate error to prevent writing new nodes and data.
Also: Making backups of your data is never wasted time nor a waste of CD's
and it is better for your nervous system too (I think this cost me another year of my life ;) )
Hope this works out for you,
Z.
Quoted 8 lines · zephod (by way of zephod )
Quoted 8 lines
Yesterday, by error, a 'rm -fr' slipped through to my /music partition, a 20GB reiserfs which was at arounf 85% full. SInce then no other activity took place on it. Is there any easy way to recover my files?
In the docs, it says you cannot undelete files in reiserfs partitions, since what you delete is most probable overwritten by the next comitted data.
Where does it say that? It needs correcting.....
Quoted 37 lines
Quoted 4 lines
In my case, there has been no additional modification of the partition, though.
Today I did exactly the same thing (on a 3.9 GB partition though). I could have killed myself for doing it!
I first backed up the partition just to be safe:
dd if=/dev/hdsomething of=backupfie
losetup/dev/loop5backupfilethen I tried:
reiserfsck --rebuild-tree --scan-whole-partition /dev/loop5 mount /dev/loop5 <mountpoint>and what do you know! All my deleted stuff reappeared. As we speak I am restoring now the original partition.
I guess this only worked because immediatly unmounted the partition after my unfortunate error to prevent writing new nodes and data.
Also: Making backups of your data is never wasted time nor a waste of CD's and it is better for your nervous system too (I think this cost me another year of my life ;) )
Hope this works out for you,
Z.
Signature · 1 line
Hans