I have an Ubuntu system that I want to set up in the following way, but would like to know whether it will work with Clonezilla because I want to backup/restore everything EXCEPT the /mydata logical volume below:
/boot partition Encrypted LVM partition (made up of 4 logical volumes)
- root ("/")
- swap
- /home - /mydata (a storage partition for media files - this is several hundred GBs)
Let's imagine I corrupt something in the installed operating system and want to revert to a Clonezilla backup, would it be possible for me to restore /boot, root ("/"), swap, and /home but leave /mydata as is?
Will such a setup work with Clonezilla, or will I need to set it up differently, for example making /mydata not part of the LVM partition? (But I still do need it to be encrypted.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So far Clonezilla deals the partition with LVM, i.e. you can not choose the LV only.
However, you can manually run "partclone.*" (e.g. partclone.ext4) to save the LV as an image, and use "partclone.restore" to restore the image to LV.
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your reply. In the case of running partclone.* to save multiple LVs as images, would it clone the entire encrypted LVs or could I decrypt it and clone only the used portions? For example, if my /home LV is 100GB but there's only 3GB of data on it, would I be saving a 100GB encrypted copy of that entire LV, or could I somehow save just the 3GB in its unencrypted form?
I'd really prefer saving just the 3GB unencrypted because that way I could get bigger savings from compressing the image file and skip the free blocks. (The storage that I'm putting the images onto are encrypted so I'm not worried about the safety of these clones, it's okay that they're unencrypted.)
Is it possible, and if so could you provide some general guidelines on how it could be done so I have a starting point of conceptualizing it in my head, and a starting point for how to search online for more help (if I google it with my current knowledge of how this works I get no good results). Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"/home LV is 100GB but there's only 3GB of data on it, would I be saving a 100GB encrypted copy of that entire LV, or could I somehow save just the 3GB in its unencrypted form?" -> It depends on the encryption. If the encryption is above the file system, i.e. Linux still can read the file system, then only 3GB of blocks will be read and saved as image. However, if Linux can not read the file system, then 100GB data will be saved.
As for partclone usage, you can refer to partclone's website: partclone.org.
The basic commands for partclone:
clone /dev/hda1 to hda1.img and display debug information.
partclone.ext3 -c -d -s /dev/hda1 -o hda1.img
restore /dev/hda1 from hda1.img and display debug information.
partclone.extfs -r -d -s hda1.img -o /dev/hda1
I have an Ubuntu system that I want to set up in the following way, but would like to know whether it will work with Clonezilla because I want to backup/restore everything EXCEPT the /mydata logical volume below:
/boot partition
Encrypted LVM partition (made up of 4 logical volumes)
- root ("/")
- swap
- /home
- /mydata (a storage partition for media files - this is several hundred GBs)
Let's imagine I corrupt something in the installed operating system and want to revert to a Clonezilla backup, would it be possible for me to restore /boot, root ("/"), swap, and /home but leave /mydata as is?
Will such a setup work with Clonezilla, or will I need to set it up differently, for example making /mydata not part of the LVM partition? (But I still do need it to be encrypted.)
So far Clonezilla deals the partition with LVM, i.e. you can not choose the LV only.
However, you can manually run "partclone.*" (e.g. partclone.ext4) to save the LV as an image, and use "partclone.restore" to restore the image to LV.
Steven.
Thanks for your reply. In the case of running partclone.* to save multiple LVs as images, would it clone the entire encrypted LVs or could I decrypt it and clone only the used portions? For example, if my /home LV is 100GB but there's only 3GB of data on it, would I be saving a 100GB encrypted copy of that entire LV, or could I somehow save just the 3GB in its unencrypted form?
I'd really prefer saving just the 3GB unencrypted because that way I could get bigger savings from compressing the image file and skip the free blocks. (The storage that I'm putting the images onto are encrypted so I'm not worried about the safety of these clones, it's okay that they're unencrypted.)
Is it possible, and if so could you provide some general guidelines on how it could be done so I have a starting point of conceptualizing it in my head, and a starting point for how to search online for more help (if I google it with my current knowledge of how this works I get no good results). Thanks.
"/home LV is 100GB but there's only 3GB of data on it, would I be saving a 100GB encrypted copy of that entire LV, or could I somehow save just the 3GB in its unencrypted form?" -> It depends on the encryption. If the encryption is above the file system, i.e. Linux still can read the file system, then only 3GB of blocks will be read and saved as image. However, if Linux can not read the file system, then 100GB data will be saved.
As for partclone usage, you can refer to partclone's website: partclone.org.
The basic commands for partclone:
clone /dev/hda1 to hda1.img and display debug information.
partclone.ext3 -c -d -s /dev/hda1 -o hda1.img
restore /dev/hda1 from hda1.img and display debug information.
partclone.extfs -r -d -s hda1.img -o /dev/hda1
restore image from clonezilla(split, gzip,) with stdin source
cat sda1.ext3-ptcl-img.gz.a* | gunzip -c | partclone.ext3 -d -r -s - -o /dev/sda1
Steven.