All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Salter <jim@jrs-s.net>
To: linux-btrfs@vger.kernel.org
Subject: btrfs send size
Date: Wed, 27 Nov 2013 15:09:18 -0500	[thread overview]
Message-ID: <5296516E.8000201@jrs-s.net> (raw)

Hi list -

Long time ZFS guy here trying to move everything over from ZFS to btrfs, 
which entails a lot of re-scripting and re-learning.

Question of the day: how can I determine the size of a btrfs send 
operation before hand?  I'd like to be able to provide a progress bar 
(I'm accustomed to using pv to do this), but I would need to know a 
rough approximation at least of how much data I'm going to transfer in 
order to be able to do that.

Under ZFS, you can do this:

root@box:~# zfs send -nvi 
data/images@autosnap_2013-11-27_14:00:01_hourly 
data/images@autosnap_2013-11-27_15:00:01_hourly
send from @autosnap_2013-11-27_14:00:01_hourly to 
data/images@autosnap_2013-11-27_15:00:01_hourly estimated size is 42.7M
total estimated size is 42.7M

Which then lets me do this:

root@box:~# zfs send -i data/images@autosnap_2013-11-27_14:00:01_hourly 
data/images@autosnap_2013-11-27_15:00:01_hourly | pv -s 42.7M | ssh 
otherbox zfs receive backup/images

And get a nice progress bar.

I can't find a manpage for the btrfs command that lists ANY information 
about btrfs send, and I haven't found anything online about doing a size 
check on send operations without actually sending the data.  Anybody got 
any help for this?  This is officially a Big Deal for those of us who 
customarily do asynchronous replication, so it would be really, really 
awesome if this could get addressed. =)

Thank you!

             reply	other threads:[~2013-11-27 20:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 20:09 Jim Salter [this message]
2013-11-28 10:22 ` btrfs send size Duncan

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=5296516E.8000201@jrs-s.net \
    --to=jim@jrs-s.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.