Support output type format "qcow"
- Lenguaje dominante
- Python
- Estrellas
- 518
- Forks
- 57
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
During backup, another qemu-nbd process could be mapped to a target qcow image (just like it is happening during restore). The backup data could be directly sent to this process and the resulting backup image would be a standard qcow image, instead of the proprietary "sparsestream" image. This would ease things up during restore.
Proof of concept for Full Backup using nbdcopy (this only works for full backups, the logic would need to be implemted in virtnbdbackup to create inc/diff backups, too as nbdcopy does not support specifying bitmaps, see https://gitlab.com/nbdkit/libnbd/-/issues/7).
1) start nbd backup service on socket:
`./virtnbdbackup -l full -d vm1 -s -o /tmp/bla`
2) create qcow with same size and options like original one:
`qemu-img create -f qcow2 test.qcow2 50M`
3) copy data via nbdcopy to qcow file:
`nbdcopy -p nbd+unix:///sda?socket=/var/tmp/virtnbdbackup.16561 -- [ qemu-nbd -f qcow2 test.qcow2 ]`
Implementation could look like:
virtnbdbackup:
1) is extended with another output handler for option **-t qcow**
2) uses information from qcow image file that is already backed up to create the backup target file
3) starts an qemu-nbd process mapping the file
4) reads data using the extend header and writes it to the right offsets to the mapped nbd backend (with discard option so a thin provisioned backup file is created)
5) during incremental/differencial backup the same must happen with appropriate offsets to seperate qcow files.
virtnbdrestore:
1) is extended to detect if backup was done with -t qcow
2) uses appropriate qcow commands to rebase the images back to an full backup for restore
3) copies the files to the target host/directory
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.