lxc-start --versionPlease add --compression off switch to the lxc export command
I export large images from my laptop to another computer on my local network.
gzip puts a lot of load on the laptop CPU. I would prefer to have an option to switch off the compression since moving large images in a local network is not a problem.
This should be implemented the same way things are done for lxc publish.
Note that a current workaround is to set backups.compression_algorithm as a global setting, if you set it to none then it won't compress.
thanks @stgraber I'll try to use workaround until the solution is implemented
hey @stgraber would something like this work? https://github.com/lxc/lxd/compare/master...srados:no-compression-backup
it's not finished but I wanted to see if this is the way to go.
oh, or shall I copy the lxc publish approach to maintain uniformity?
I'd prefer it work the same way we've done for lxc publish.
Assigning to you since you seem to have most of the pieces figured out already :)
As far as how we usually split commits for this type of work, it'd look like:
shared/version/api.godoc/api-extensions.mdInstanceBackupsPostInstanceBackupsPost in shared/api/instance_backup.goAPI extension: backup_compression_algorithm comment which is itself preceded by a line break (see image.go for examples).--compression optionmake i18n.Let me know if you need any help with this!
Thanks!
I may ping you in order to find out how you test the changes, otherwise I think I'll be fine ;)
@stgraber shall I log backup_compression_algorithm to instances_backups table? If yes, where do I create migration to add new field to that table?
No, we don't need to record the compression algorithm, we have logic to figure it out from the on-disk files.
is there an easy way to test my changes? I ran make and I have binaries, but I'm not sure how to set the whole system up
If you're using the snap, you can move your locally built binaries to:
Then reload LXD with systemctl reload snap.lxd.daemon which will then have it start from the debug binaries.
Thanks for the tip...this would definitely help me stop programming in the dark :)
Seems to be working well from a quick local test.
Great. Thanks for all the help and such an awesome project!
Np, thanks for the contribution!
Most helpful comment
This should be implemented the same way things are done for
lxc publish.Note that a current workaround is to set
backups.compression_algorithmas a global setting, if you set it tononethen it won't compress.