-
Notifications
You must be signed in to change notification settings - Fork 6
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
Send stream could be sent compressed if the dataset is compressed #60
Comments
Thanks for the interest! We set the raw flag https://openzfs.github.io/openzfs-docs/man/8/zfs-send.8.html#w zfs_uploader/zfs_uploader/zfs.py Line 73 in d8af96e
I'm not sure why your dataset would be sent uncompressed. Which version of ZFS are you using? |
Interesting, I had looked at the raw flag but didn't quite realise it was supposed to be doing anything with compression on unencrypted datasets. The ZFS version I was/is using for that is admittedly a little old since it's from the Ubuntu 20.04 repos:
Perhaps a newer version may handle it better? The dataset in question is unencrypted and has When I tried without the
That size went down to 24837 MB after adding |
Could you check the file size in the S3 bucket? The file size should not change when adding I think the problem is that we're not setting zfs_uploader/zfs_uploader/zfs.py Lines 55 to 67 in d8af96e
|
You're right, in the past I was cancelling the job before it could actually finish uploading which is how I never saw the distinction, my bad there. Running it with my latest incremental snapshot and leaving it to complete shows that it is indeed only the estimate that's incorrect, and the compressed dataset is what's sent:
It estimates that the size will be 8200 MB but finishes with the last progress being 3764 MB. |
If the dataset being backed up has a
compression
property set to anything other thanoff
, the default behaviour ofzfs send
is to decompress on the fly and send the full uncompressed dataset.Simply by adding a
-c, --compressed
flag tozfs send
, this will instead be sent compressed and takes up significantly less space on the remote. In my case this reduced a full backup of a PostgreSQL database from 56 GB to 24 GB.I added this flag to my personal fork in Erisa@c192333 and noticed no regressions or repercussions, however since users may not always have their dataset set to compress or want this behaviour to change across versions, I believe the best way forward would be to add a zfs_uploader config variable that will enable this compressed flag.
The text was updated successfully, but these errors were encountered: