* Re: Undelete files / directory
2014-08-28 17:04 ` Jean-Denis Girard
@ 2014-08-28 20:21 ` Chris Murphy
2014-08-28 21:23 ` Jean-Denis Girard
2014-08-28 21:30 ` Chris Murphy
2014-08-29 7:40 ` Konstantinos Skarlatos
2 siblings, 1 reply; 18+ messages in thread
From: Chris Murphy @ 2014-08-28 20:21 UTC (permalink / raw)
To: Jean-Denis Girard; +Cc: linux-btrfs
On Aug 28, 2014, at 11:04 AM, Jean-Denis Girard <jd.girard@sysnux.pf> wrote:
> Hi Chris,
>
> Thanks for your detailed answer.
>
> Le 28/08/2014 06:25, Chris Murphy a écrit :
>> 9. btrfs-find-root /dev/sdc
>> Super think's the tree root is at 29917184, chunk root 20987904
>> Well block 4194304 seems great, but generation doesn't match, have=2, want=9 level 0
>> Well block 4243456 seems great, but generation doesn't match, have=3, want=9 level 0
>> Well block 29376512 seems great, but generation doesn't match, have=4, want=9 level 0
>> Well block 29474816 seems great, but generation doesn't match, have=5, want=9 level 0
>> Well block 29556736 seems great, but generation doesn't match, have=6, want=9 level 0
>> Well block 29736960 seems great, but generation doesn't match, have=7, want=9 level 0
>> Well block 29900800 seems great, but generation doesn't match, have=8, want=9 level 0
>
> Here is what the command returns :
>
> [root@x220 ~]# btrfs-find-root /dev/mapper/home
> Super think's the tree root is at 115230801920, chunk root 131072
> Went past the fs size, exiting[root@x220 ~]#
>
> I just tried with latest btrfs-progs (from git), it returns exactly the
> same.
>
> The btrfs partition is on top of dm-crypt, could it be a problem?
Doubtful.
What do you get for
btrfs-debug-tree -R /dev/sdc
Under each listed "btrfs root backup slot" is a line for tree root block with a generation and a block number listed. Good chance the generation with the highest value will not contain your file; or any generation more than 30 seconds from the time of the deletion. But since it's a read only command you can't really mess it up, just try each of those tree root block values in reverse (descending) order for the btrfs restore -t value.
Obviously you should not mount the volume rw.
Chris Murphy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Undelete files / directory
2014-08-28 20:21 ` Chris Murphy
@ 2014-08-28 21:23 ` Jean-Denis Girard
2014-08-28 21:39 ` Chris Murphy
0 siblings, 1 reply; 18+ messages in thread
From: Jean-Denis Girard @ 2014-08-28 21:23 UTC (permalink / raw)
To: linux-btrfs
Le 28/08/2014 10:21, Chris Murphy a écrit :
> What do you get for
[root@x220 ~]# btrfs-debug-tree -R /dev/mapper/home
root tree: 115230801920 level 1
chunk tree: 131072 level 1
extent tree key (EXTENT_TREE ROOT_ITEM 0) 115230806016 level 2
device tree key (DEV_TREE ROOT_ITEM 0) 115191881728 level 0
fs tree key (FS_TREE ROOT_ITEM 0) 115215908864 level 3
checksum tree key (CSUM_TREE ROOT_ITEM 0) 115230842880 level 3
uuid tree key (UUID_TREE ROOT_ITEM 0) 115196645376 level 0
data reloc tree key (DATA_RELOC_TREE ROOT_ITEM 0) 115623051264 level 0
btrfs root backup slot 0
tree root gen 138441 block 115220434944
extent root gen 138441 block 115217117184
chunk root gen 73727 block 131072
device root gen 130645 block 115191881728
csum root gen 138441 block 115216838656
fs root gen 138441 block 115215908864
26813235200 used 42947575808 total 1 devices
btrfs root backup slot 1
tree root gen 138442 block 115230801920
extent root gen 138442 block 115230806016
chunk root gen 73727 block 131072
device root gen 130645 block 115191881728
csum root gen 138442 block 115230842880
fs root gen 138441 block 115215908864
26813235200 used 42947575808 total 1 devices
btrfs root backup slot 2
tree root gen 138439 block 115231158272
extent root gen 138439 block 115230871552
chunk root gen 73727 block 131072
device root gen 130645 block 115191881728
csum root gen 138440 block 115231473664
fs root gen 138440 block 115231453184
26818527232 used 42947575808 total 1 devices
btrfs root backup slot 3
tree root gen 138440 block 115210838016
extent root gen 138440 block 115233878016
chunk root gen 73727 block 131072
device root gen 130645 block 115191881728
csum root gen 138441 block 115216838656
fs root gen 138441 block 115215908864
26813243392 used 42947575808 total 1 devices
total bytes 42947575808
bytes used 26813235200
uuid ca93d247-9076-4aa7-862b-a6add3a5c16c
Btrfs v3.14.2
So this seems fine; why is btrfs-find-root not working for me?
Then I tried to use the root with oldest generation:
[root@x220 ~]# btrfs restore -t 115231158272 -v /dev/mapper/home
--path-regex '^/(|jdg(|/tmp(|/.*)))$' .
It did recover many files / directories, but unfortunately not my
photos. Does it mean I discovered my mistake and unmounted the partition
too late, and the info is lost?
I made a dump of the device to another computer (using dd), I think the
data are still here (hexedit).
What else could I try?
Thanks,
Jean-Denis Girard
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: Undelete files / directory
2014-08-28 21:23 ` Jean-Denis Girard
@ 2014-08-28 21:39 ` Chris Murphy
0 siblings, 0 replies; 18+ messages in thread
From: Chris Murphy @ 2014-08-28 21:39 UTC (permalink / raw)
To: Jean-Denis Girard; +Cc: linux-btrfs
On Aug 28, 2014, at 3:23 PM, Jean-Denis Girard <jd.girard@sysnux.pf> wrote:
> So this seems fine; why is btrfs-find-root not working for me?
Don't know. btrfs-progs 3.16 is current in git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git master branch. It's already built since yesterday in koji for Fedora if you can use RPMs.
> It did recover many files / directories, but unfortunately not my
> photos. Does it mean I discovered my mistake and unmounted the partition
> too late, and the info is lost?
I don't know. How much time between deletion and unmount? And was anything written after deletion and before unmount? I think there is a -d option to only go into a specified directory for recovery. And -D will do a dry run and should show what files will be recovered without recovering them. It may take a long time to actually do a restore only to find out the files you want aren't in it so maybe -D is useful.
Chris Murphy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Undelete files / directory
2014-08-28 17:04 ` Jean-Denis Girard
2014-08-28 20:21 ` Chris Murphy
@ 2014-08-28 21:30 ` Chris Murphy
2014-08-29 7:40 ` Konstantinos Skarlatos
2 siblings, 0 replies; 18+ messages in thread
From: Chris Murphy @ 2014-08-28 21:30 UTC (permalink / raw)
To: Jean-Denis Girard; +Cc: linux-btrfs
On Aug 28, 2014, at 11:04 AM, Jean-Denis Girard <jd.girard@sysnux.pf> wrote:
> Hi Chris,
>
> Thanks for your detailed answer.
>
> Le 28/08/2014 06:25, Chris Murphy a écrit :
>> 9. btrfs-find-root /dev/sdc
>> Super think's the tree root is at 29917184, chunk root 20987904
>> Well block 4194304 seems great, but generation doesn't match, have=2, want=9 level 0
>> Well block 4243456 seems great, but generation doesn't match, have=3, want=9 level 0
>> Well block 29376512 seems great, but generation doesn't match, have=4, want=9 level 0
>> Well block 29474816 seems great, but generation doesn't match, have=5, want=9 level 0
>> Well block 29556736 seems great, but generation doesn't match, have=6, want=9 level 0
>> Well block 29736960 seems great, but generation doesn't match, have=7, want=9 level 0
>> Well block 29900800 seems great, but generation doesn't match, have=8, want=9 level 0
>
> Here is what the command returns :
>
> [root@x220 ~]# btrfs-find-root /dev/mapper/home
> Super think's the tree root is at 115230801920, chunk root 131072
> Went past the fs size, exiting[root@x220 ~]#
>
> I just tried with latest btrfs-progs (from git), it returns exactly the
> same.
>
> The btrfs partition is on top of dm-crypt, could it be a problem?
So I'm working with a really rudimentary case here. However, this might also be possible:
# btrfs-show-super /dev/sdc
[snip]
generation 11
[snip]
That's the current generation at unmount time. If nothing at all was being written to the volume between delete time and unmount time, the generation you want will be one less than this.
Then you can use, for example:
# btrfs-debug-tree -g 10 /dev/sdc
And that'll hopefully return a tree block for that generation. In my case it wouldn't be good news because I had already had several remounts, so the generation had rolled over a few times since I'd deleted the file so it's not in generation 10, or even generation 8. So I tried generation 7 again where I found it before:
# btrfs-find-root -g 7 /dev/sdc
Super think's the tree root is at 29491200, chunk root 20987904
Well block 4194304 seems great, but generation doesn't match, have=2, want=7 level 0
Well block 4243456 seems great, but generation doesn't match, have=3, want=7 level 0
Well block 29409280 seems great, but generation doesn't match, have=10, want=7 level 0
Well block 29491200 seems great, but generation doesn't match, have=11, want=7 level 0
Well block 29556736 seems great, but generation doesn't match, have=6, want=7 level 0
Unfortunately there's no gen 7. So I'm not sure how to discover the tree block number.
I still have it written down from before of course, and it still works:
btrfs restore -v -t 29736960 /dev/sdc /home/chris/
parent transid verify failed on 29736960 wanted 12 found 7
parent transid verify failed on 29736960 wanted 12 found 7
parent transid verify failed on 29736960 wanted 12 found 7
parent transid verify failed on 29736960 wanted 12 found 7
Ignoring transid failure
Restoring /home/chris/pics
Restoring /home/chris/pics/IMG_3327.tif
Done searching /pics
Done searching
The shasum for this file though doesn't match the original. Size is correct though. But it doesn't open, application says it's corrupted. So it might take some work to recover that, if even possible. So I'd definitely say (again) don't mount the volume rw. And hopefully nothing was written between directory delete time and unmount time.
Chris Murphy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Undelete files / directory
2014-08-28 17:04 ` Jean-Denis Girard
2014-08-28 20:21 ` Chris Murphy
2014-08-28 21:30 ` Chris Murphy
@ 2014-08-29 7:40 ` Konstantinos Skarlatos
2014-08-30 20:12 ` Jean-Denis Girard
2 siblings, 1 reply; 18+ messages in thread
From: Konstantinos Skarlatos @ 2014-08-29 7:40 UTC (permalink / raw)
To: Jean-Denis Girard, linux-btrfs
On 28/8/2014 8:04 μμ, Jean-Denis Girard wrote:
> Hi Chris,
>
> Thanks for your detailed answer.
>
> Le 28/08/2014 06:25, Chris Murphy a écrit :
>> 9. btrfs-find-root /dev/sdc
>> Super think's the tree root is at 29917184, chunk root 20987904
>> Well block 4194304 seems great, but generation doesn't match, have=2, want=9 level 0
>> Well block 4243456 seems great, but generation doesn't match, have=3, want=9 level 0
>> Well block 29376512 seems great, but generation doesn't match, have=4, want=9 level 0
>> Well block 29474816 seems great, but generation doesn't match, have=5, want=9 level 0
>> Well block 29556736 seems great, but generation doesn't match, have=6, want=9 level 0
>> Well block 29736960 seems great, but generation doesn't match, have=7, want=9 level 0
>> Well block 29900800 seems great, but generation doesn't match, have=8, want=9 level 0
Hi all,
I did a successful btrfs restore a few months ago, saving all of my
deleted files except 2 (So i lost about 1GB on a 4TB filesystem)
Here is what i did (this is from memory and from my .zsh_history file,
so i may be missing something)
btrfs-find-root /dev/sdd -o 5 > b1.txt
I think the -o 5 option is quite important here.
After that, i ran this
for i in `awk '{print $3}' b1.txt`; do echo "------------------------
$i --------------------" && btrfs restore /dev/sdd /storage/A3/ -Dv -f
$i ; done
I think i did that in order to brute force a correct offset
I also have done this, in order to find the offset that gave the largest
number of files
for i in `awk '{print $3}' b1.txt`; do echo "------------------------
$i --------------------" && btrfs restore /dev/sdd /storage/A3/ -Dv -f
$i |wc -l ; done
Then i did some test restores using various addresses
btrfs restore /dev/sdd /storage/A3/B1/ -vD -f 2149617336320
btrfs restore /dev/sdd /storage/A3/B1/ -vD -f 1607682736128
btrfs restore /dev/sdd /storage/A3/B1/ -vD -f 2688721551360
and then i finally did the restore using the offset that looked best
btrfs restore /dev/sdd /storage/A3/B1/ -v -f 2688721551360
I hope this helps, good luck!
> Here is what the command returns :
>
> [root@x220 ~]# btrfs-find-root /dev/mapper/home
> Super think's the tree root is at 115230801920, chunk root 131072
> Went past the fs size, exiting[root@x220 ~]#
>
> I just tried with latest btrfs-progs (from git), it returns exactly the
> same.
>
> The btrfs partition is on top of dm-crypt, could it be a problem?
>
>
> Thanks,
> Jean-Denis Girard
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Konstantinos Skarlatos
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: Undelete files / directory
2014-08-29 7:40 ` Konstantinos Skarlatos
@ 2014-08-30 20:12 ` Jean-Denis Girard
2014-08-30 21:26 ` Jean-Denis Girard
0 siblings, 1 reply; 18+ messages in thread
From: Jean-Denis Girard @ 2014-08-30 20:12 UTC (permalink / raw)
To: linux-btrfs
Le 28/08/2014 21:40, Konstantinos Skarlatos a écrit :
> On 28/8/2014 8:04 μμ, Jean-Denis Girard wrote:
>> Hi Chris,
>>
>> Thanks for your detailed answer.
>>
>> Le 28/08/2014 06:25, Chris Murphy a écrit :
>>> 9. btrfs-find-root /dev/sdc
>>> Super think's the tree root is at 29917184, chunk root 20987904
>>> Well block 4194304 seems great, but generation doesn't match, have=2,
>>> want=9 level 0
>>> Well block 4243456 seems great, but generation doesn't match, have=3,
>>> want=9 level 0
>>> Well block 29376512 seems great, but generation doesn't match,
>>> have=4, want=9 level 0
>>> Well block 29474816 seems great, but generation doesn't match,
>>> have=5, want=9 level 0
>>> Well block 29556736 seems great, but generation doesn't match,
>>> have=6, want=9 level 0
>>> Well block 29736960 seems great, but generation doesn't match,
>>> have=7, want=9 level 0
>>> Well block 29900800 seems great, but generation doesn't match,
>>> have=8, want=9 level 0
> Hi all,
>
> I did a successful btrfs restore a few months ago, saving all of my
> deleted files except 2 (So i lost about 1GB on a 4TB filesystem)
> Here is what i did (this is from memory and from my .zsh_history file,
> so i may be missing something)
>
> btrfs-find-root /dev/sdd -o 5 > b1.txt
> I think the -o 5 option is quite important here.
Thanks for the reply, but for some reason btrfs-fins-root does not work
on this file system. Here is what I get:
[jdg@tiare tmp]$ btrfs-find-root x220_home.img -o 5
Super think's the tree root is at 115230801920, chunk root 131072
Went past the fs size, exiting[jdg@tiare tmp]$
I can mount the file system, access the files, though obviously not the
deleted directory.
Regards,
Jean-Denis Girard
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Undelete files / directory
2014-08-30 20:12 ` Jean-Denis Girard
@ 2014-08-30 21:26 ` Jean-Denis Girard
2014-09-01 16:27 ` Marc MERLIN
0 siblings, 1 reply; 18+ messages in thread
From: Jean-Denis Girard @ 2014-08-30 21:26 UTC (permalink / raw)
To: linux-btrfs
So I commented out the break on line 238 of btrfs-find-root so that it
continues even if it thinks it went past the fs size, rerun the command,
and I finally got a list of blocks to try!
Then as you suggested I did:
for i in `awk '{print $3}' root.txt`
do echo "------------------------ $i --------------------"
btrfs restore -v -f $i --path-regex '^/(|jdg(|/tmp(|/.*)))$' \
../x220_home.img .
done
And I now have back my ~2800 photos (~13 Gb).
Many thanks to those who helped!
Best regards,
Jean-Denis Girard
Le 30/08/2014 10:12, Jean-Denis Girard a écrit :
> Le 28/08/2014 21:40, Konstantinos Skarlatos a écrit :
>> On 28/8/2014 8:04 μμ, Jean-Denis Girard wrote:
>>> Hi Chris,
>>>
>>> Thanks for your detailed answer.
>>>
>>> Le 28/08/2014 06:25, Chris Murphy a écrit :
>>>> 9. btrfs-find-root /dev/sdc
>>>> Super think's the tree root is at 29917184, chunk root 20987904
>>>> Well block 4194304 seems great, but generation doesn't match, have=2,
>>>> want=9 level 0
>>>> Well block 4243456 seems great, but generation doesn't match, have=3,
>>>> want=9 level 0
>>>> Well block 29376512 seems great, but generation doesn't match,
>>>> have=4, want=9 level 0
>>>> Well block 29474816 seems great, but generation doesn't match,
>>>> have=5, want=9 level 0
>>>> Well block 29556736 seems great, but generation doesn't match,
>>>> have=6, want=9 level 0
>>>> Well block 29736960 seems great, but generation doesn't match,
>>>> have=7, want=9 level 0
>>>> Well block 29900800 seems great, but generation doesn't match,
>>>> have=8, want=9 level 0
>> Hi all,
>>
>> I did a successful btrfs restore a few months ago, saving all of my
>> deleted files except 2 (So i lost about 1GB on a 4TB filesystem)
>> Here is what i did (this is from memory and from my .zsh_history file,
>> so i may be missing something)
>>
>> btrfs-find-root /dev/sdd -o 5 > b1.txt
>> I think the -o 5 option is quite important here.
>
> Thanks for the reply, but for some reason btrfs-fins-root does not work
> on this file system. Here is what I get:
>
> [jdg@tiare tmp]$ btrfs-find-root x220_home.img -o 5
> Super think's the tree root is at 115230801920, chunk root 131072
> Went past the fs size, exiting[jdg@tiare tmp]$
>
> I can mount the file system, access the files, though obviously not the
> deleted directory.
>
>
>
> Regards,
> Jean-Denis Girard
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: Undelete files / directory
2014-08-30 21:26 ` Jean-Denis Girard
@ 2014-09-01 16:27 ` Marc MERLIN
2014-09-01 17:00 ` Konstantinos Skarlatos
0 siblings, 1 reply; 18+ messages in thread
From: Marc MERLIN @ 2014-09-01 16:27 UTC (permalink / raw)
To: Jean-Denis Girard; +Cc: linux-btrfs
On Sat, Aug 30, 2014 at 11:26:52AM -1000, Jean-Denis Girard wrote:
> So I commented out the break on line 238 of btrfs-find-root so that it
Thanks for that report.
Can a developer review this and see if it should be made an option or
removed entirely?
Marc
> continues even if it thinks it went past the fs size, rerun the command,
> and I finally got a list of blocks to try!
>
> Then as you suggested I did:
> for i in `awk '{print $3}' root.txt`
> do echo "------------------------ $i --------------------"
> btrfs restore -v -f $i --path-regex '^/(|jdg(|/tmp(|/.*)))$' \
> ../x220_home.img .
> done
>
> And I now have back my ~2800 photos (~13 Gb).
>
> Many thanks to those who helped!
>
>
> Best regards,
> Jean-Denis Girard
>
>
> Le 30/08/2014 10:12, Jean-Denis Girard a écrit :
> > Le 28/08/2014 21:40, Konstantinos Skarlatos a écrit :
> >> On 28/8/2014 8:04 μμ, Jean-Denis Girard wrote:
> >>> Hi Chris,
> >>>
> >>> Thanks for your detailed answer.
> >>>
> >>> Le 28/08/2014 06:25, Chris Murphy a écrit :
> >>>> 9. btrfs-find-root /dev/sdc
> >>>> Super think's the tree root is at 29917184, chunk root 20987904
> >>>> Well block 4194304 seems great, but generation doesn't match, have=2,
> >>>> want=9 level 0
> >>>> Well block 4243456 seems great, but generation doesn't match, have=3,
> >>>> want=9 level 0
> >>>> Well block 29376512 seems great, but generation doesn't match,
> >>>> have=4, want=9 level 0
> >>>> Well block 29474816 seems great, but generation doesn't match,
> >>>> have=5, want=9 level 0
> >>>> Well block 29556736 seems great, but generation doesn't match,
> >>>> have=6, want=9 level 0
> >>>> Well block 29736960 seems great, but generation doesn't match,
> >>>> have=7, want=9 level 0
> >>>> Well block 29900800 seems great, but generation doesn't match,
> >>>> have=8, want=9 level 0
> >> Hi all,
> >>
> >> I did a successful btrfs restore a few months ago, saving all of my
> >> deleted files except 2 (So i lost about 1GB on a 4TB filesystem)
> >> Here is what i did (this is from memory and from my .zsh_history file,
> >> so i may be missing something)
> >>
> >> btrfs-find-root /dev/sdd -o 5 > b1.txt
> >> I think the -o 5 option is quite important here.
> >
> > Thanks for the reply, but for some reason btrfs-fins-root does not work
> > on this file system. Here is what I get:
> >
> > [jdg@tiare tmp]$ btrfs-find-root x220_home.img -o 5
> > Super think's the tree root is at 115230801920, chunk root 131072
> > Went past the fs size, exiting[jdg@tiare tmp]$
> >
> > I can mount the file system, access the files, though obviously not the
> > deleted directory.
> >
> >
> >
> > Regards,
> > Jean-Denis Girard
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: Undelete files / directory
2014-09-01 16:27 ` Marc MERLIN
@ 2014-09-01 17:00 ` Konstantinos Skarlatos
2014-09-02 4:08 ` Jean-Denis Girard
2014-09-02 9:00 ` David Sterba
0 siblings, 2 replies; 18+ messages in thread
From: Konstantinos Skarlatos @ 2014-09-01 17:00 UTC (permalink / raw)
To: Marc MERLIN, Jean-Denis Girard; +Cc: linux-btrfs
On 1/9/2014 7:27 μμ, Marc MERLIN wrote:
> On Sat, Aug 30, 2014 at 11:26:52AM -1000, Jean-Denis Girard wrote:
>> So I commented out the break on line 238 of btrfs-find-root so that it
> Thanks for that report.
> Can a developer review this and see if it should be made an option or
> removed entirely?
I think that is the best way to proceed, or maybe even better make a
"brute force" option for btrfs restore that does something like my for
loop, recovering what it can through the filesystem.
Until then, can we make this into a concise set of instructions so we
can post it on the wiki?
>
> Marc
>
>> continues even if it thinks it went past the fs size, rerun the command,
>> and I finally got a list of blocks to try!
>>
>> Then as you suggested I did:
>> for i in `awk '{print $3}' root.txt`
>> do echo "------------------------ $i --------------------"
>> btrfs restore -v -f $i --path-regex '^/(|jdg(|/tmp(|/.*)))$' \
>> ../x220_home.img .
>> done
>>
>> And I now have back my ~2800 photos (~13 Gb).
>>
>> Many thanks to those who helped!
I am glad i could help!
>>
>>
>> Best regards,
>> Jean-Denis Girard
>>
>>
>> Le 30/08/2014 10:12, Jean-Denis Girard a écrit :
>>> Le 28/08/2014 21:40, Konstantinos Skarlatos a écrit :
>>>> On 28/8/2014 8:04 μμ, Jean-Denis Girard wrote:
>>>>> Hi Chris,
>>>>>
>>>>> Thanks for your detailed answer.
>>>>>
>>>>> Le 28/08/2014 06:25, Chris Murphy a écrit :
>>>>>> 9. btrfs-find-root /dev/sdc
>>>>>> Super think's the tree root is at 29917184, chunk root 20987904
>>>>>> Well block 4194304 seems great, but generation doesn't match, have=2,
>>>>>> want=9 level 0
>>>>>> Well block 4243456 seems great, but generation doesn't match, have=3,
>>>>>> want=9 level 0
>>>>>> Well block 29376512 seems great, but generation doesn't match,
>>>>>> have=4, want=9 level 0
>>>>>> Well block 29474816 seems great, but generation doesn't match,
>>>>>> have=5, want=9 level 0
>>>>>> Well block 29556736 seems great, but generation doesn't match,
>>>>>> have=6, want=9 level 0
>>>>>> Well block 29736960 seems great, but generation doesn't match,
>>>>>> have=7, want=9 level 0
>>>>>> Well block 29900800 seems great, but generation doesn't match,
>>>>>> have=8, want=9 level 0
>>>> Hi all,
>>>>
>>>> I did a successful btrfs restore a few months ago, saving all of my
>>>> deleted files except 2 (So i lost about 1GB on a 4TB filesystem)
>>>> Here is what i did (this is from memory and from my .zsh_history file,
>>>> so i may be missing something)
>>>>
>>>> btrfs-find-root /dev/sdd -o 5 > b1.txt
>>>> I think the -o 5 option is quite important here.
>>> Thanks for the reply, but for some reason btrfs-fins-root does not work
>>> on this file system. Here is what I get:
>>>
>>> [jdg@tiare tmp]$ btrfs-find-root x220_home.img -o 5
>>> Super think's the tree root is at 115230801920, chunk root 131072
>>> Went past the fs size, exiting[jdg@tiare tmp]$
>>>
>>> I can mount the file system, access the files, though obviously not the
>>> deleted directory.
>>>
>>>
>>>
>>> Regards,
>>> Jean-Denis Girard
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
--
Konstantinos Skarlatos
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: Undelete files / directory
2014-09-01 17:00 ` Konstantinos Skarlatos
@ 2014-09-02 4:08 ` Jean-Denis Girard
2014-09-02 4:12 ` Marc MERLIN
2014-09-02 9:00 ` David Sterba
1 sibling, 1 reply; 18+ messages in thread
From: Jean-Denis Girard @ 2014-09-02 4:08 UTC (permalink / raw)
To: linux-btrfs
Le 01/09/2014 07:00, Konstantinos Skarlatos a écrit :
> Until then, can we make this into a concise set of instructions so we
> can post it on the wiki?
I would be happy to contribute to the wiki, but I'm not sure where to
add this: a new paragraph in the "Problem FAQ" or a new page?
Thanks,
Jean-Denis Girard
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Undelete files / directory
2014-09-02 4:08 ` Jean-Denis Girard
@ 2014-09-02 4:12 ` Marc MERLIN
0 siblings, 0 replies; 18+ messages in thread
From: Marc MERLIN @ 2014-09-02 4:12 UTC (permalink / raw)
To: Jean-Denis Girard; +Cc: linux-btrfs
On Mon, Sep 01, 2014 at 06:08:28PM -1000, Jean-Denis Girard wrote:
> Le 01/09/2014 07:00, Konstantinos Skarlatos a écrit :
> > Until then, can we make this into a concise set of instructions so we
> > can post it on the wiki?
>
> I would be happy to contribute to the wiki, but I'm not sure where to
> add this: a new paragraph in the "Problem FAQ" or a new page?
If it fits in a couple of paragraphs, the FAQ page sounds fine.
If it's longer than that and is becoming more of a HOWTO, a separate
page with links to it, like a link from the FAQ page, would work great.
It sounds like the latter might be best here, but up to you.
Marc
> Thanks,
> Jean-Denis Girard
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Undelete files / directory
2014-09-01 17:00 ` Konstantinos Skarlatos
2014-09-02 4:08 ` Jean-Denis Girard
@ 2014-09-02 9:00 ` David Sterba
1 sibling, 0 replies; 18+ messages in thread
From: David Sterba @ 2014-09-02 9:00 UTC (permalink / raw)
To: Konstantinos Skarlatos; +Cc: Marc MERLIN, Jean-Denis Girard, linux-btrfs
On Mon, Sep 01, 2014 at 08:00:03PM +0300, Konstantinos Skarlatos wrote:
> On 1/9/2014 7:27 μμ, Marc MERLIN wrote:
> >On Sat, Aug 30, 2014 at 11:26:52AM -1000, Jean-Denis Girard wrote:
> >>So I commented out the break on line 238 of btrfs-find-root so that it
> >Thanks for that report.
> >Can a developer review this and see if it should be made an option or
> >removed entirely?
> I think that is the best way to proceed, or maybe even better make a "brute
> force" option for btrfs restore that does something like my for loop,
> recovering what it can through the filesystem.
Agreed, let's make 'find-root' a subcommand of 'rescue' instead of a
standalone utility. Then we can add options to allow inspecting a more
broken filesystem, eg. like the 'block out of fs'.
^ permalink raw reply [flat|nested] 18+ messages in thread