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 option to compress zfs send #62

Open
totalAldo opened this issue Mar 7, 2024 · 0 comments
Open

add option to compress zfs send #62

totalAldo opened this issue Mar 7, 2024 · 0 comments

Comments

@totalAldo
Copy link

totalAldo commented Mar 7, 2024

Hi Allan,

Is there is a recommended way to compress the zfs send portion when using ssh? I looked at the -D option but that doesn't seem to work when using ssh to send because it's not escaped.

I added experimental support for piping zfs send through zstd -3 and then decompressing using zstd -d on the receiving host.

If this functionality is useful, I'd be happy to clean up the implementation and submit a pull request.
totalAldo/zxfer

example:
zxfer -v -d -F -z -O user@host -R zroot localpool/backup/zroot

which generates something like:
ssh user@host "zfs send -i start_snap end_snap | zstd -3" | zstd -d /sbin/zfs receive -F dest

and the zstd command can be customized using -Z
zxfer -v -d -F -Z "zstd -T0 -9" -O user@host -R zroot localpool/backup/zroot

I saw on open pull request that uses -z and -Z for different purposes so if the options need to change, can do that as well.

Here's a link to the relevant code:
https://github.com/totalAldo/zxfer/blob/9a7b4e1da5305952863ddbe518403b8c8c18521b/zxfer#L1355-L1462

@totalAldo totalAldo changed the title add option to compress zfs send when -O specified add option to compress zfs send Mar 9, 2024
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

1 participant