masc3d / btrfs-sxbackup

Incremental btrfs snapshot backups with push/pull support via SSH
GNU General Public License v2.0
117 stars 20 forks source link

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

Open madsl opened 1 year ago

madsl commented 1 year ago

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.

masc3d commented 1 year ago

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 commented 1 year ago
       --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.