Menu

Choice of Parts to restore from Disk Image

Help
Jerry w
2013-12-12
2013-12-14
  • Jerry w

    Jerry w - 2013-12-12

    Hi
    I was wondering if, from my saved "disk" images I could then restore certain partitions from them.
    I have tried swapping restoredisk to restoreparts in the command strings and it lists all the images but when I select an image it goes off and restores all of them. I was hoping once the disk was selected it would also ask me to choose a partition 1,2, or 3 etc. from within that disk. Is there a way to do it? Many thanks :_)

    here are some menu entry samples I tried:

    title Restore Parts From Domain Image Repository(keep part info)\
    kernel /live/vmlinuz boot=live quiet live-config noswap nolocales edd=on nomodeset ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 5" ocs_prerun3="sudo mount -t cifs -o user=administrator,password=**,domain=CTS.local 192.168.0.14:/Share/clonezilla /home/partimag/" ocs_live_run="ocs-sr --batch -e1 auto -e2 -j2 -k -r -p reboot restoreparts ask_user sda" ocs_live_extra_param="fsck /dev/sda" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 ip=frommedia live-media-path=/live bootfrom=/dev/sdb1 toram=filesystem.squashfs
    initrd /live/initrd.img
    boot

    title Restore Parts From Domain Image Repository(trash part info)\
    kernel /live/vmlinuz boot=live quiet live-config noswap nolocales edd=on nomodeset ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 5" ocs_prerun3="sudo mount -t cifs -o user=administrator,password=***,domain=CTS.local 192.168.0.14:/Share/clonezilla /home/partimag/" ocs_live_run="ocs-sr --batch -e1 auto -e2 -j2 -k1 -r -p reboot restoreparts ask_user sda" ocs_live_extra_param="fsck /dev/sda" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 ip=frommedia live-media-path=/live bootfrom=/dev/sdb1 toram=filesystem.squashfs
    initrd /live/initrd.img
    boot

     
  • Steven Shiau

    Steven Shiau - 2013-12-14

    Basically yes. However, you will need to do:
    1. Create the partition table on the destination disk first.
    Make sure the destination partition size is equal or larger than the source one.
    2. Use "cnvt-ocs-dev" to convert the image to proper partition device name:
    http://drbl.org/management/techrpt.php?c=cnvt-ocs-dev&t=To%20change%20the%20device%20name%20in%20saved%20clonezilla%20image

    With that, you should be able to use "restoreparts" to restore the image.

    Steven.

     

Log in to post a comment.