linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Calvin Walton <calvin.walton@kepstin.ca>
To: Martin Steigerwald <Martin@lichtvoll.de>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Safe fsck / consistent backup while mounted
Date: Sat, 04 Jun 2011 12:07:31 -0400	[thread overview]
Message-ID: <1307203653.3582.3.camel@ayu> (raw)
In-Reply-To: <201106041225.56028.Martin@lichtvoll.de>

On Sat, 2011-06-04 at 12:25 +0200, Martin Steigerwald wrote:
> Hi!
>=20
> Now I thought about a way to safely backup a MySQL or other database =
-=20
> without long service interruption:
>=20
> - Tell DB to turn itself into consistent state and freeze there
> - sync / btrfs filesystem sync ; fsfreeze -f /mountpoint
> - btrfs subvolume snapshot
> - fsfreeze -u /mountpoint
> - Tell DB to continue business as usual
>=20
> My questions are:
> 2) Is the sync needed?

I'm not sure. In some cases it might not be: E.g. If the database uses
fsync() to save the data when you tell it to go into a consistent state=
,
there would be no need to have a separate sync. It shouldn't hurt,
however.

> 3) Is the fsfreeze needed at all? Does btrfs subvolume freeze the=20
> filesystem prior to the snapshot? The manpage doesn=C2=B4t tell it.

The fsfreeze should not be needed. The btrfs subvolume snapshot command
takes an atomic snapshot of the current subvolume state.

--=20
Calvin Walton <calvin.walton@kepstin.ca>

--
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

  parent reply	other threads:[~2011-06-04 16:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-04 10:25 Safe fsck / consistent backup while mounted Martin Steigerwald
2011-06-04 14:13 ` Arne Jansen
2011-06-04 16:07 ` Calvin Walton [this message]
2011-06-05  7:58 ` David Pottage
  -- strict thread matches above, loose matches on Subject: below --
2011-06-04 13:46 Tomasz Chmielewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307203653.3582.3.camel@ayu \
    --to=calvin.walton@kepstin.ca \
    --cc=Martin@lichtvoll.de \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).