All of lore.kernel.org
 help / color / mirror / Atom feed
* Backing up BTRFS metadata
@ 2017-05-11 14:56 Marat Khalili
  2017-05-11 15:19 ` Chris Murphy
  0 siblings, 1 reply; 6+ messages in thread
From: Marat Khalili @ 2017-05-11 14:56 UTC (permalink / raw)
  To: linux-btrfs

Sorry if question sounds unorthodox, Is there some simple way to read 
(and backup) all BTRFS metadata from volume?

Motivation of course is possibility to quickly recover from catastrophic 
filesystem failures on a logical level. Some small amount of actual data 
that this metadata references may be overwritten between backup and 
restore moments, but due to checksumming it can easily be caught (and 
either individually restored from backup or discarded).

--

With Best Regards,
Marat Khalili

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Backing up BTRFS metadata
  2017-05-11 14:56 Backing up BTRFS metadata Marat Khalili
@ 2017-05-11 15:19 ` Chris Murphy
  2017-05-11 15:23   ` Marat Khalili
  2017-05-11 19:22   ` Roman Mamedov
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Murphy @ 2017-05-11 15:19 UTC (permalink / raw)
  To: Marat Khalili; +Cc: Btrfs BTRFS

On Thu, May 11, 2017 at 8:56 AM, Marat Khalili <mkh@rqc.ru> wrote:
> Sorry if question sounds unorthodox, Is there some simple way to read (and
> backup) all BTRFS metadata from volume?

btrfs-image



-- 
Chris Murphy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Backing up BTRFS metadata
  2017-05-11 15:19 ` Chris Murphy
@ 2017-05-11 15:23   ` Marat Khalili
  2017-05-11 19:22   ` Roman Mamedov
  1 sibling, 0 replies; 6+ messages in thread
From: Marat Khalili @ 2017-05-11 15:23 UTC (permalink / raw)
  Cc: Btrfs BTRFS


On 11/05/17 18:19, Chris Murphy wrote:
> btrfs-image
Looks great, thank you!

--

With Best Regards,
Marat Khalili

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Backing up BTRFS metadata
  2017-05-11 15:19 ` Chris Murphy
  2017-05-11 15:23   ` Marat Khalili
@ 2017-05-11 19:22   ` Roman Mamedov
  2017-05-11 19:37     ` Hugo Mills
  1 sibling, 1 reply; 6+ messages in thread
From: Roman Mamedov @ 2017-05-11 19:22 UTC (permalink / raw)
  To: Chris Murphy; +Cc: Marat Khalili, Btrfs BTRFS

On Thu, 11 May 2017 09:19:28 -0600
Chris Murphy <lists@colorremedies.com> wrote:

> On Thu, May 11, 2017 at 8:56 AM, Marat Khalili <mkh@rqc.ru> wrote:
> > Sorry if question sounds unorthodox, Is there some simple way to read (and
> > backup) all BTRFS metadata from volume?
> 
> btrfs-image

Hm, I thought that's for debugging only, and that you can't actually restore
metadata onto a data-containing FS and have anything mountable/readable as a
result.

Seems not to be the case, and in fact, could this be one of the "missing
links" in the Fsck story, 

       -w
           Walk all the trees manually and copy any blocks that are
           referenced. Use this option if your extent tree is corrupted to
           make sure that all of the metadata is captured.

This certainly does sound like something to try for some of those broken
filesystems where Btrfsck refuses to do anything. Save image with this manual
walking/reconstruction of the trees, then restore. Too bad I already nuked
mine, so can't experiment with that.

-- 
With respect,
Roman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Backing up BTRFS metadata
  2017-05-11 19:22   ` Roman Mamedov
@ 2017-05-11 19:37     ` Hugo Mills
  2017-05-12  6:06       ` Marat Khalili
  0 siblings, 1 reply; 6+ messages in thread
From: Hugo Mills @ 2017-05-11 19:37 UTC (permalink / raw)
  To: Roman Mamedov; +Cc: Chris Murphy, Marat Khalili, Btrfs BTRFS

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

On Fri, May 12, 2017 at 12:22:00AM +0500, Roman Mamedov wrote:
> On Thu, 11 May 2017 09:19:28 -0600
> Chris Murphy <lists@colorremedies.com> wrote:
> 
> > On Thu, May 11, 2017 at 8:56 AM, Marat Khalili <mkh@rqc.ru> wrote:
> > > Sorry if question sounds unorthodox, Is there some simple way to read (and
> > > backup) all BTRFS metadata from volume?
> > 
> > btrfs-image
> 
> Hm, I thought that's for debugging only, and that you can't actually restore
> metadata onto a data-containing FS and have anything mountable/readable as a
> result.

   Indeed. This has been tried before, and I don't think it came to
anything.

> Seems not to be the case, and in fact, could this be one of the "missing
> links" in the Fsck story, 
> 
>        -w
>            Walk all the trees manually and copy any blocks that are
>            referenced. Use this option if your extent tree is corrupted to
>            make sure that all of the metadata is captured.
> 
> This certainly does sound like something to try for some of those broken
> filesystems where Btrfsck refuses to do anything. Save image with this manual
> walking/reconstruction of the trees, then restore. Too bad I already nuked
> mine, so can't experiment with that.

   I suspect it's still only capturing metadata, rather than data.

   Hugo.

-- 
Hugo Mills             | Would you like an ocelot with that non-sequitur?
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Backing up BTRFS metadata
  2017-05-11 19:37     ` Hugo Mills
@ 2017-05-12  6:06       ` Marat Khalili
  0 siblings, 0 replies; 6+ messages in thread
From: Marat Khalili @ 2017-05-12  6:06 UTC (permalink / raw)
  To: Btrfs BTRFS

>     Indeed. This has been tried before, and I don't think it came to
> anything.
What can/did go wrong?


>     I suspect it's still only capturing metadata, rather than data.
Yes. But data should still be there, on disk, right?


--

With Best Regards,
Marat Khalili


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-12  6:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 14:56 Backing up BTRFS metadata Marat Khalili
2017-05-11 15:19 ` Chris Murphy
2017-05-11 15:23   ` Marat Khalili
2017-05-11 19:22   ` Roman Mamedov
2017-05-11 19:37     ` Hugo Mills
2017-05-12  6:06       ` Marat Khalili

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.