little problem, smart solution;
i’m backing up my citrix xenserver vm’s using the command
-
xe template-export
i write the backup directly to a cifs-mounted share on the network. however, i need to compress those images, ideally before i send them over the network. the problem is that the template-export command doesn’t support writing to stdout, which would allow me to pipe it through gzip.
fortunately, there’s a way which allows me to pipe it through gzip nevertheless. i’m using a fifo;
1st step: create a fifo
-
mkfifo gzipfifo
2nd: start gzip and let it wait for data from the fifo and write to another file (in my case on the cifs-share)
-
gzip -c > /mnt/backup/PMIRZ_Firewall_Demo.xva.gz < gzipfifo &
3rd: write your backup to the fifo, instead of the mounted volume
NHAAAA, just noticed that the template-export command doesn’t want to write to files that already exist… but the above works for other things as well

Trackback URI | Comments RSS
Leave a Reply