eslam-gomaa / virt-backup

Fully backup your KVM Virtual Machines
28 stars 2 forks source link

Feature Request: Select compression level #2

Closed rbarrott closed 3 years ago

rbarrott commented 3 years ago

It could be useful to have the compression level as a command-line option. The use-case is that the user can trade speed of the backup against disk space. For example, I may want faster backups and am happy to sacrifice disk space for this.

E.g.: $ ruby virt-backup.rb --backup --original-vm MyVM --with-snapshots --save-dir ~/vmbackups --compression none

Valid options for --compression could be: none fastest smallest default

These correspond to the appropriate Zip compression options. If --compression is not provided, the default value of "default" is used.

eslam-gomaa commented 3 years ago

Hello,

Support for choosing compression level has been added

Note: the library only supports 3 levels of compression:

Possible values are Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION and Zlib::NO_COMPRESSION

Example

supported (--compression) values are: default, none, best

ruby virt-backup.rb --backup \
 --with-snapshots \
 --original-vm kubernetes-master \
 --system-disk-only \
 --compression none
 --save-dir /var/lib/libvirt/images/backup/
eslam-gomaa commented 3 years ago

Feature added, Closing the issue.