archedraft Posted April 1, 2015 Share Posted April 1, 2015 I would like to make copies of my Virtual Machine .img files to my array in order to quickly recover from an accidental .img deletes. Some of my VM images are partitioned to use 400 GB but are only currently using around 50 GB. I am thinking that creating a RAR backup of the image file would be a pretty good idea to save space. Anyone else have any other ideas that I should consider? Quote Link to comment
archedraft Posted April 1, 2015 Author Share Posted April 1, 2015 Hmmm, it would appear that the RAR program (to create rar archives) is shareware and will require a licence after 40 days. I suppose in addition to my orginal question I would like to know if unRAID has any sort of built in function to compress files? If not, is there a recommend compression program that is good and free? Quote Link to comment
archedraft Posted April 1, 2015 Author Share Posted April 1, 2015 Appears that the tar function is baked in. Never used it before so I might give it a shot. **Notes to myself** To compress the file as tar.bz2 tar cvfj Windows.img.tar.bz2 /mnt/user/VM\ BACKUP/ Uncompress tar.bz2 Archive File tar -xvf Windows.img.tar.bz2 -C /mnt/vmdisk/mnt/vmdisk/vm_images/ Reference Link Quote Link to comment
pinion Posted April 1, 2015 Share Posted April 1, 2015 You would have to cleanly shut down the vms before you tar and mv right? Quote Link to comment
archedraft Posted April 1, 2015 Author Share Posted April 1, 2015 Correct, I tried the above but the compression is super slow. I'm probably going to have to look into other options due to the large img sizes. Quote Link to comment
archedraft Posted April 1, 2015 Author Share Posted April 1, 2015 Well creating tar files was much too slow. I decided to just convert my .img files to .qcow2 which greatly reduced the space. I can then decide later on if I want to convert them back to .img files if I need to put the original image back. qemu-img convert -O qcow2 /mnt/vmdisk-2/vm_images/Windows.img /mnt/user/VM\ BACKUP/Windows.qcow2 qemu-img convert -O raw image-converted.qcow2 image-converted-from-qcow2.img Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.