{"id":703,"date":"2008-08-25T15:21:49","date_gmt":"2008-08-25T19:21:49","guid":{"rendered":"http:\/\/www.psychocats.net\/ubuntucat\/?p=703"},"modified":"2008-08-25T15:21:49","modified_gmt":"2008-08-25T19:21:49","slug":"photorec-saves-the-day-again","status":"publish","type":"post","link":"https:\/\/www.psychocats.net\/ubuntucat\/photorec-saves-the-day-again\/","title":{"rendered":"Photorec saves the day again"},"content":{"rendered":"<p>Every now and then my friends seem to accidentally have their files deleted. You can read <a href=\"http:\/\/www.psychocats.net\/ubuntucat\/file-recovery-fun\/\">here<\/a> about last year&#8217;s incident. This year, another friend, who keeps her photos on one laptop with no backups had some folders mysteriously go empty. I had no idea how they got deleted, but I assured her we could probably get most of them back. I didn&#8217;t realize what it would take, though! <\/p>\n<p> First of all, I had to borrow an external hard drive, since mine didn&#8217;t have enough free space to copy over her entire drive. I booted up a Ubuntu live CD and installed <i>testdisk<\/i> and tried to run <\/p>\n<div class=\"terminal\">sudo photorec<\/div>\n<p> on the drive. It appeared to work until it got to 1464 files. Then it just froze up. So I stopped it and restarted it. Froze on 1464 again. Clearly something was wrong. So I tried scanning only the unallocated space on the drive and Photorec gave me a <i>segmentation fault<\/i> error. I knew the drive was probably damaged in some way. <\/p>\n<p> I figured imaging the drive with <i>ddrescue<\/i> would solve the problem. I ran it overnight and the next day I realized the external hard drive I&#8217;d borrowed was formatted as FAT32 and so would not hold a disk image larger than 4 GB. I resized the partition and created a new NTFS partition and ran <i>ddrescue<\/i> again. There were a lot of bad blocks on that drive in various places. Running front to back and then running back to front, <i>ddrescue<\/i> took almost 40 hours to image that 80 GB hard drive with bad blocks. <\/p>\n<p> Then it took another four hours for Photorec to scan the imaged drive and recover the photos. I don&#8217;t think it ended up getting everything, but it got a lot, and my friend was grateful and felt a little guilty that I&#8217;d spent so much time recovering her data. Instead of accepting a thank-you from her, I told her, &#8220;Just buy an external hard drive and back up your photos.&#8221; <\/p>\n<p> I think it&#8217;s human nature to have to learn the hard way. Most people don&#8217;t start backing up until they&#8217;ve lost important files.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every now and then my friends seem to accidentally have their files deleted. You can read here about last year&#8217;s incident. This year, another friend, who keeps her photos on one laptop with no backups had some folders mysteriously go empty. I had no idea how they got deleted, but I assured her we could&hellip; <a class=\"more-link\" href=\"https:\/\/www.psychocats.net\/ubuntucat\/photorec-saves-the-day-again\/\">Continue reading <span class=\"screen-reader-text\">Photorec saves the day again<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,12,21],"tags":[374,422,911,421,919],"class_list":["post-703","post","type-post","status-publish","format-standard","hentry","category-computers","category-linux","category-ubuntu","tag-data-recovery","tag-dd_rescue","tag-linux","tag-photorec","tag-ubuntu","entry"],"_links":{"self":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/comments?post=703"}],"version-history":[{"count":5,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/703\/revisions"}],"predecessor-version":[{"id":708,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/703\/revisions\/708"}],"wp:attachment":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/media?parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/categories?post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/tags?post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}