From: Kai Krakow <hurikhan77@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs send extremely slow (almost stuck)
Date: Mon, 29 Aug 2016 19:50:18 +0200 [thread overview]
Message-ID: <20160829195018.7a87a1fd@jupiter.sol.kaishome.de> (raw)
In-Reply-To: CA+X5Wn6BPhSR4Zsjp9xOgOap=GXKE2bCcgFtbpouMJ2y+++Qwg@mail.gmail.com
Am Sun, 28 Aug 2016 17:41:22 -0400
schrieb james harvey <jamespharvey20@gmail.com>:
> On Sun, Aug 28, 2016 at 12:15 PM, Oliver Freyermuth
> <o.freyermuth@googlemail.com> wrote:
> > For me, this means I have to stay with rsync backups, which are
> > sadly incomplete since special FS attrs like "C" for nocow are not
> > backed up.
>
> Should be able to make a script that creates a textfile with lsattr
> for every file. Then either just leave that file as part of the
> backup in case it's needed some day, or making a corresponding script
> on the backup machine to restore those.
The problem with this idea is that chattr +C will only work on empty
files, so it needs to be applied in the "middle", read: upon creating
the file and before filling it with content.
It would be possible to let a script first create empty files according
to this list and then use "rsync --no-whole-file --inplace" so it will
build upon the empty files instead of its usual behavior to create
files temporarily and then rename them into place. I'd recommend to use
these options anyways if writing to btrfs snapshots to take advantage
of shared extents. Apparently rsync cannot handle sparse files in this
mode (tho there should be a patch to make this possible by using the
hole-punching feature of newer kernels but it makes the rsync protocol
incompatible to unpatched versions AFAIR).
I think borgbackup suffers from the same problem. While in latest
version it seems to support attrs, it does apply them after filling the
files with contents (as most programs do, also attributes like mtime,
owner etc are applied after closing the written file, for obvious
reasons). This simply doesn't work for +C on btrfs.
--
Regards,
Kai
Replies to list-only preferred.
next prev parent reply other threads:[~2016-08-29 17:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-28 16:15 btrfs send extremely slow (almost stuck) Oliver Freyermuth
2016-08-28 21:41 ` james harvey
2016-08-29 17:50 ` Kai Krakow [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-04-14 15:33 J. Hart
2016-08-28 3:38 Oliver Freyermuth
2016-08-28 7:53 ` Duncan
2016-08-29 2:11 ` Qu Wenruo
2016-08-29 2:12 ` Qu Wenruo
2016-08-31 1:35 ` Jeff Mahoney
2016-08-31 1:54 ` Qu Wenruo
2016-08-29 10:02 ` Oliver Freyermuth
2016-08-30 0:48 ` Qu Wenruo
2016-09-04 21:41 ` Oliver Freyermuth
2016-09-05 5:21 ` Qu Wenruo
2016-09-05 21:29 ` Oliver Freyermuth
2016-09-06 2:13 ` Duncan
2016-09-06 22:24 ` Oliver Freyermuth
2016-09-06 2:46 ` Qu Wenruo
2016-09-06 21:53 ` Oliver Freyermuth
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=20160829195018.7a87a1fd@jupiter.sol.kaishome.de \
--to=hurikhan77@gmail.com \
--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).