Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show transfer status with pv #42

Closed
quantumphaze opened this issue Aug 15, 2015 · 4 comments
Closed

Show transfer status with pv #42

quantumphaze opened this issue Aug 15, 2015 · 4 comments

Comments

@quantumphaze
Copy link

Have an option flag that pipes the transfer through the pv utility. pv monitors data going through a pipe, alowing things like counting the bytes transfered.

Should be something like

btrfs send $SRC | pv | btrfs receive $DEST

Note that pv has no way of knowing the total amount of data that needs to be tranfered since send/receive doesn't know, it just counts the bytes. (If I am mistakened and there is a way to determine the side of a snapshot then there is a flag to add that.)

@digint
Copy link
Owner

digint commented Aug 15, 2015

Thanks for the input, should be pretty easy to implement, and is definitvely useful when starting btrbk interactively.
The output looks promising:

# btrfs send /mnt/btr_pool/_btrbk_snap/rootfs.20150815 | pv > /dev/null
At subvol /mnt/btr_pool/_btrbk_snap/rootfs.20150815
317MiB 0:00:03 [577.2MiB/s] [   <=>                                                      ]

I guess I will implement a "-V" option switch for this.

@quantumphaze
Copy link
Author

I would suguest a --progress flag similar to the equivalent flag in rsync because -V is often used as shorthand for --version

@digint
Copy link
Owner

digint commented Aug 15, 2015

Yes you're right. The problem is that btrbk does not support long ("--") arguments. On the other side, as btrbk grows I'll have to support this anyways some day.

@digint
Copy link
Owner

digint commented Aug 15, 2015

implemented "--progress" option in: d8e8df0

@quantumphaze feel free to reopen this issue if you have more suggestions!

@digint digint closed this as completed Aug 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants