From: Andy Smith <andy@strugglers.net>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Copying a btrfs filesystem from one host to another, reflinks, compression
Date: Thu, 5 Dec 2024 04:25:56 +0000 [thread overview]
Message-ID: <Z1ErVJYZJKMiFJb0@mail.bitfolk.com> (raw)
In-Reply-To: <f6470c12-6601-4776-a738-cf073e3bcffa@gmail.com>
Hi Andrei,
Thanks for your reply.
On Thu, Dec 05, 2024 at 07:11:59AM +0300, Andrei Borzenkov wrote:
> 05.12.2024 01:24, Andy Smith wrote:
> > rsync or tar | ssh | tar are not going to handle reflinked files,
> > are they?
> >
> > Should I be using btrfs-send?
>
> btrfs send/receive has better support for sharing data between files, yes.
> It is not guaranteed, that destination will have exactly the same data
> layout though; btrfs send may decide to send full data instead of sending
> clone request. I am not sure about exact conditions, IIRC one requirement
> for cloning is proper alignment.
Hmm. I don't mind if the destination has a bit of a different layout
but I would not like if a significant number of the regions on the
source got deduplicated…
I guess I will have to try it and see what happens (time-consuming,
given the size).
If it expands too much I may have to try again with dd.
> > Would that preserve compression or would I have to go through and force
> > recompression of everything?
> >
> > Source host's kernel is 5.10.0-32; btrfs-progs v5.10.1 (Debian 11).
> > Destination would be Debian 12 so kernel 6.1.0-28 and btrfs-progs v6.2
> >
>
> According to man btrfs-send, --compressed-data should preserve compression.
Looks like I would have to install a newer btrfs-progs on the sender as
I read in:
https://btrfs.readthedocs.io/en/latest/btrfs-send.html
--proto <N>
Version 2 requires at least btrfs-progs 6.0 on both the sender and
receiver and at least Linux 6.0 on the sender.
--compressed-data
This requires protocol version 2 or higher. If --proto was not used,
then --compressed-data implies --proto 2.
Thanks,
Andy
next prev parent reply other threads:[~2024-12-05 4:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 22:24 Copying a btrfs filesystem from one host to another, reflinks, compression Andy Smith
2024-12-05 4:11 ` Andrei Borzenkov
2024-12-05 4:25 ` Andy Smith [this message]
2024-12-27 22:21 ` Nicholas D Steeves
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=Z1ErVJYZJKMiFJb0@mail.bitfolk.com \
--to=andy@strugglers.net \
--cc=arvidjaar@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