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

Add "--proto 0" to send/receive #76

Open
madsl opened this issue Oct 27, 2022 · 2 comments
Open

Add "--proto 0" to send/receive #76

madsl opened this issue Oct 27, 2022 · 2 comments

Comments

@madsl
Copy link

madsl commented Oct 27, 2022

Send/receive has received support for a new send protocol in kernel 5.19. Btrfs-sxbackup should default to the newest protocol supported given that the kernel version and btrfs-progs version supports it.

Using "btrfs send --proto 0" should be a safe way to do it.

@madsl madsl changed the title Add "--proto 0" to send/receive if kernel version is >= 5.19 Add "--proto 0" to send/receive Oct 27, 2022
@masc3d
Copy link
Owner

masc3d commented Jan 31, 2023

doesn't this break backups running older kernels. imho btrfs send / receive should negotiate their protocol version and until that happens its probably better sticking with default. what's the concrete benefits of running newest protocol via --proto 0?

@madsl
Copy link
Author

madsl commented Jan 31, 2023

       --proto <N>
              use send protocol version N

              The default is 1, which was the original protocol version. Version 2 encodes file data slightly more efficiently; it is also required for sending compressed data directly
              (see  --compressed-data).  Version  2 requires at least btrfs-progs 5.18 on both the sender and receiver and at least Linux 5.18 on the sender. **Passing 0 means to use the
              highest version supported by the running kernel.**

So if I understand this correctly, I think proto 0 means it finds out itself what is safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants