We have moved to a new Sailfish OS Forum. Please start new discussions there.
5

Restore deleted files?

asked 2015-01-05 02:54:00 +0300

sturk gravatar image

I was wondering if itś possible to get deleted files and in this case notes back somehow? On new years a friend deleted a long note text when he was trying to open it, haha poor android bastard.

So is it lost forever or? And no I have no backup of it.

Sorry if this has been asked before but I couldn't find an answer.

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
6

answered 2015-01-05 11:25:21 +0300

Keeper-of-the-Keys gravatar image

updated 2015-03-09 21:56:00 +0300

Depends on the filesystem settings, in theory BTRFS is a Copy-on-Write FileSystem which should leave the original alone until it needs to actually reuse the space the file is taking.

You will have to get "down and dirty" with your phone to do this though (most likely you will need to enable developer mode to gain access to a root shell), some useful links about btrfs recovery:

https://btrfs.wiki.kernel.org/index.php/Restore

http://superuser.com/questions/603708/btrfs-undelete-file

http://superuser.com/questions/415132/how-to-undelete-files-on-btrfs-partition

If it was stored on an SD-card formatted in ext[3,4]/FAT/exFAT/NTFS you can of course use their respective undelete tools to recover the files...

edit flag offensive delete publish link more

Comments

For ext4 is the...? I acidently deleted all files (one folder) with file meneger. edit: OK, I found testdisk and got the files but not directory structure. Better something than nothing :\

McCloud ( 2015-03-08 03:13:00 +0300 )edit

The tool would be extundelete (iirc), the best way to run it is on an unmounted filesystem or a block by block copy (made with dd) so you can try several times on the computer.

https://ext4.wiki.kernel.org/index.php/Undeletion

http://manpages.ubuntu.com/manpages/precise/man1/extundelete.1.html

http://unix.stackexchange.com/questions/122305/undelete-a-just-deleted-file-on-ext4-with-extundelete

http://askubuntu.com/questions/217606/undelete-files-on-ext4

Keeper-of-the-Keys ( 2015-03-09 21:55:20 +0300 )edit

Hy,

I am having the same issue. Not, when I try to issue the command

btrfs-find-root /dev/mmcblk0p28

I get this long list:

 Well block XXXXXX seems great, but generation doesn't match, have=N, want=YYYYYYY level 0

And after some fiddling I tried:

btrfs restore /dev/mmcblk0p28 /mnt/restore

And got:

 /dev/mmcblk0p28 is currently mounted.  Aborting.

Being a linux noob I started in recovery mode, hoping to circumvent the mount problem - I do not know how to mount or unmount the file system... Now in Recovery Mode I selected option 4 for the bash and used the command:

  btrfs restore /dev/mmcblk0p28 /mnt/restore

Which gave me no errors. But I did not get any file either.

I also tried the command

btrfs restore -t N /dev/mmcblk0p28 /mnt/restore

But whatever N i tried I would not get anywhere. I am a total noob with this.

Please, can anybody help me recover the file step by step? I do not know how to get any further... Thanks!

Anonymouse ( 2015-06-29 11:54:15 +0300 )edit

I also have the same issue of having the device mounted resulting an abort. The btrfs wiki states: "he btrfs restore utility is a non-destructive method for attempting to recover data from an unmountable filesystem", so I'm a bit puzzled because of that.

Yeah, I'm also a noob as well with Linux still.

Pheet ( 2016-03-11 23:22:42 +0300 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2015-01-05 02:54:00 +0300

Seen: 3,581 times

Last updated: Nov 28 '16