* Can you keep reflink relationship during a copy/backup to another filesystem?
@ 2014-01-29 7:50 Marc MERLIN
2014-01-29 8:05 ` Hugo Mills
0 siblings, 1 reply; 3+ messages in thread
From: Marc MERLIN @ 2014-01-29 7:50 UTC (permalink / raw)
To: linux-btrfs
So I used to use hardlinks to do historical backups of the same filesystem
but I know it's preferable to use refllink with btrfs to avoid having too
many hardlinks.
But if I need to backup this filesystem to another one some other way than
btrfs send/receive (let's say cp -a, tar, or rsync), is it correct to say
that reflink relationships will be lost and my data will take more space?
That is unless the target filesytem can do deduplication like btrs now can?
(I haven't tried it yet, but it's about time that I do)
Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can you keep reflink relationship during a copy/backup to another filesystem?
2014-01-29 7:50 Can you keep reflink relationship during a copy/backup to another filesystem? Marc MERLIN
@ 2014-01-29 8:05 ` Hugo Mills
2014-02-07 23:05 ` Marc MERLIN
0 siblings, 1 reply; 3+ messages in thread
From: Hugo Mills @ 2014-01-29 8:05 UTC (permalink / raw)
To: Marc MERLIN; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
On Tue, Jan 28, 2014 at 11:50:25PM -0800, Marc MERLIN wrote:
> So I used to use hardlinks to do historical backups of the same filesystem
> but I know it's preferable to use refllink with btrfs to avoid having too
> many hardlinks.
If you use btrfstune to set the "extended inode refs" option on the
device, then there's no hardlink limit (and the limit was only on the
number of hardlinks to the same thing *in the same directory*).
> But if I need to backup this filesystem to another one some other way than
> btrfs send/receive (let's say cp -a, tar, or rsync), is it correct to say
> that reflink relationships will be lost and my data will take more space?
>
> That is unless the target filesytem can do deduplication like btrs now can?
> (I haven't tried it yet, but it's about time that I do)
Correct.
Hugo.
--
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- vi vi vi: the Editor of the Beast. ---
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can you keep reflink relationship during a copy/backup to another filesystem?
2014-01-29 8:05 ` Hugo Mills
@ 2014-02-07 23:05 ` Marc MERLIN
0 siblings, 0 replies; 3+ messages in thread
From: Marc MERLIN @ 2014-02-07 23:05 UTC (permalink / raw)
To: Hugo Mills, linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 2170 bytes --]
On Wed, Jan 29, 2014 at 08:05:14AM +0000, Hugo Mills wrote:
> On Tue, Jan 28, 2014 at 11:50:25PM -0800, Marc MERLIN wrote:
> > So I used to use hardlinks to do historical backups of the same filesystem
> > but I know it's preferable to use refllink with btrfs to avoid having too
> > many hardlinks.
>
> If you use btrfstune to set the "extended inode refs" option on the
> device, then there's no hardlink limit (and the limit was only on the
I'm not too clear about that part:
https://btrfs.wiki.kernel.org/index.php/Btrfstune
doesn't seem to match what you're saying.
> number of hardlinks to the same thing *in the same directory*).
I didn't catch the 'same directory' part. I used hardlinks.py to compare
all my files from many backups across filesystems and hardlink files
together if they were the same.
You're saying that I could have 500 hardlinks to the same file as long as
they are in 500 different directories, and that this is not a performance
problem or limitation for btrfs (maybe anymore? I could swear I had issues
with this in the past).
If the limit is now hardlinking many times to the same file in the same
directory, I don't actually have a need for that use case.
> > But if I need to backup this filesystem to another one some other way than
> > btrfs send/receive (let's say cp -a, tar, or rsync), is it correct to say
> > that reflink relationships will be lost and my data will take more space?
> >
> > That is unless the target filesytem can do deduplication like btrs now can?
> > (I haven't tried it yet, but it's about time that I do)
>
> Correct.
Thanks.
I just noticed that on the fly deduplication wasn't in 3.12 yet, so I'm
better off keeping my hardlinks for backups since it's easy to keep that
relationship when copying my backup tree to a backup device (backups of
backups, of course, y'all don't do that? :) ).
Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 308 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-07 23:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29 7:50 Can you keep reflink relationship during a copy/backup to another filesystem? Marc MERLIN
2014-01-29 8:05 ` Hugo Mills
2014-02-07 23:05 ` Marc MERLIN
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).