From: Chris Murphy <lists@colorremedies.com>
To: siranee.ja@tpc.co.th
Cc: Chris Murphy <lists@colorremedies.com>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>,
voravat@tpcorp.co.th
Subject: Re: btrfs issue with mariadb incremental backup
Date: Sun, 13 Aug 2017 13:31:56 -0600 [thread overview]
Message-ID: <CAJCQCtQ24iT-q3mDBxLj92UosDJGDchFYiJKAVL7xk8rLNOeCg@mail.gmail.com> (raw)
In-Reply-To: <7251.49.228.115.25.1502621355.squirrel@mail>
On Sun, Aug 13, 2017 at 4:49 AM, <siranee.ja@tpc.co.th> wrote:
> [root@backuplogC7 ~]# btrfs send /var/lib/mariadb/mysql_201708090830 | ssh
> 192.168.45.166 btrfs receive /var/lib/mariadb
> At subvol /var/lib/mariadb/mysql_201708090830
> At subvol mysql_201708090830
> [root@backuplogC7 ~]# rsync -avnc /var/lib/mariadb/mysql_201708090830/
> root@192.168.45.166:/var/lib/mariadb/mysql_201708090830/
> sending incremental file list
> ./
>
> sent 3773 bytes received 19 bytes 842.67 bytes/sec
> total size is 718361496 speedup is 189441.32 (DRY RUN)
OK so the full send is sane. That suggests the file systems on both
sides are OK, and that the problem is related strictly to incremental
send/receive. It suggests that in a critical way either an origin
parent or its copy on the destination are not identical. Why will be
hard to figure out, and I'm not even sure it's worth it.
Right now you basically have a work around: a known good full send,
you can start doing incremental send/receive again using this full
send/receive snapshot as the parent (with -p).
Where confusion can happen is if you have to restore a snapshot, I
think you must commit to a whole new canonical tree with the reverse
send/receive being a full one, NOT incremental. I'm asserting this, I
do not know if it is true, I don't know if the tools should prevent
reverse incremental send/receive, but the very idea of reversing an
incremental send receive to me just seems logically problematic. Any
time you reverse the send/receive direction it must be full. I think.
I did once get into trouble with this myself, having to do a restore
from backup, to a new file system. I then took a rw snapshot of it,
and made that the canonical live modify subvolume. I then ro
snapshotted it, and tried to do an incremental send *back* to backup
and it failed with an error I don't remember but I think it was later
send/receive versions than 4.4 where there's some extract sanity
checking to prevent this. And I was able to work around it with -c
(clone) option. Anyway, I got sufficiently confused myself after all
of that, that I pretty much gave up on such a strategy, blew away all
the ro snapshots on both sides, and started from scratch with a new
full send, and then resumed the incrementals unidirectionally. And
anytime they are reversed I assume it must be a full send.
Anyway, I think it's perilous to reverse directions while also trying
to do incremental send/receive without a lot of testing to thoroughly
understand what's going on. And I basically got to fuck this, not
worth the complexity.
--
Chris Murphy
next prev parent reply other threads:[~2017-08-13 19:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 4:32 btrfs issue with mariadb incremental backup siranee.ja
2017-08-09 5:46 ` Chris Murphy
2017-08-09 6:36 ` siranee.ja
2017-08-09 17:59 ` Chris Murphy
2017-08-10 2:03 ` siranee.ja
2017-08-11 4:40 ` siranee.ja
2017-08-11 6:00 ` siranee.ja
2017-08-11 15:35 ` Chris Murphy
2017-08-12 2:38 ` siranee.ja
2017-08-12 4:31 ` Chris Murphy
2017-08-12 5:08 ` siranee.ja
2017-08-12 21:34 ` Chris Murphy
2017-08-12 22:41 ` Janos Toth F.
2017-08-12 23:07 ` Chris Murphy
2017-08-12 22:49 ` Hugo Mills
2017-08-12 23:14 ` Chris Murphy
2017-08-13 2:20 ` siranee.ja
2017-08-13 2:59 ` Chris Murphy
2017-08-13 3:40 ` siranee.ja
2017-08-13 4:34 ` Chris Murphy
2017-08-13 10:49 ` siranee.ja
2017-08-13 19:31 ` Chris Murphy [this message]
2017-08-13 6:20 ` A L
2017-08-13 10:52 ` siranee.ja
2017-08-13 12:51 ` A L
2017-08-13 14:00 ` siranee.ja
2017-08-13 21:31 ` A L
2017-08-14 1:57 ` siranee.ja
2017-08-13 19:50 ` Chris Murphy
2017-08-14 2:04 ` siranee.ja
2017-08-11 15:06 ` Chris Murphy
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=CAJCQCtQ24iT-q3mDBxLj92UosDJGDchFYiJKAVL7xk8rLNOeCg@mail.gmail.com \
--to=lists@colorremedies.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=siranee.ja@tpc.co.th \
--cc=voravat@tpcorp.co.th \
/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).