How to correctly restore system partition (iso image) with 'Disks'

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












I have been able to backup and restore a Linux Mint system partition with 'Disks' (command to run: gnome-disks; package to install: gnome-disk-utility) from a live session, but I am not sure that was the best way to do it: on the contrary!



I need advice on what I did wrong in order to have a proper procedure available next time I need it.



My initial configuration was this:



enter image description here



The backup/restoration procedure involved the /dev/sda2 partition (ext4). With the swap space (that I'll not discuss anymore in order to simplify the description), it involves about 70 GB. The rest are ntfs partitions, one a Windows system partition, the other a "Depo" partition accessible from both Windows and Linux.



This is what I did:



BACKUP:



  • with gparted in a live session shrunk the partition to the smallest size (from 70 to 30 GB)


  • made the backup (30 GB) with Disks (as an iso image that I saved on an external device)


(After creating an extended partition and testing different Linux systems like Ubuntu Gnome and Solus, I wanted to go back to the initial situation, as I decided I preferred my original single Linux Mint stable and well customized system.)



RESTORATION:



  • with Gparted, deleted the entire (70 GB) extended partition and created a new 70 GB ext4 primary partition


  • with Disks, restored the 30 GB partition (from the iso image) onto the 70 GB one!!!! ---- maybe I should have restored it onto unformatted space? - IS THIS THE ERROR?


  • at this point the entire 70 GB partition seemed almost full, although the restored image had only 30 GB; boot-repair complained about lack of space when trying to install grub on that partition and failed to install grub


  • and gparted reported only 600 MB free, while c 40 GB free space was somehow visible but ONLY in the image gparted showed, not in the numbers; RESIZING WAS NOT POSSIBLE

  • after restarting in a new live session: gparted reported only 600 MB free but resizing was possible: reducing the partition to real full space of 30 GB, 40 GB appeared unallocated all of a sudden, then extending entire partition to full 70 GB was possible

  • at this point only grub was missing, and running boot-repair in live session all went fine (I selected advanced options: install grub on sda, boot from the given partition (sda2), un-checked "purge grub" as there was no grub installed anyway)

After booting from local drive, the old grub list was available and the old system was in place. The only problem, it took a lot of time first time to enter session, and I also think the boot time is now generally somewhat longer..




So, my question is: should one restore a system partition image onto an empty partition the way I did or on an not-formatted space? or in a somehow different way?







share|improve this question






















  • Did you unmounted the 70GB partition before restoring? Restoring Linux is straight forward. Just copy back all files, install bootloader & configure it. Done.
    – Abhik Bose
    Nov 21 '17 at 23:20










  • @AbhikBose - I do not remember whether I unmounted or not... You mean I could back-up by just copy/paste all files (without copying as iso the entire partition?)
    – cipricus
    Nov 22 '17 at 11:16






  • 1




    Yah.. I had written a procedure of restoring linux at unix.stackexchange.com/questions/403166/…. Please have a look once. This worked for me. You need not to have minimal installation as you're restoring on same hardware. And remember to reinstall grub after restoring.
    – Abhik Bose
    Nov 22 '17 at 11:40











  • @AbhikBose - Very interesting. The drivers issue is minimal: I recently simply moved a HDD with both Win7 and Linux from a HP to a Sony laptop with no issues for Linux (some for Windows). But your procedure per se doesn't seem simpler than what I did. It is mostly a matter of time. - My action was a success, but what I want to know is how to prepare the location where the iso is to be restored?
    – cipricus
    Nov 22 '17 at 14:03






  • 1




    Ok. I think you shall format the partition and unmount it before restore. Theoretically that shall work without issue.
    – Abhik Bose
    Nov 22 '17 at 14:10














up vote
1
down vote

favorite
1












I have been able to backup and restore a Linux Mint system partition with 'Disks' (command to run: gnome-disks; package to install: gnome-disk-utility) from a live session, but I am not sure that was the best way to do it: on the contrary!



I need advice on what I did wrong in order to have a proper procedure available next time I need it.



My initial configuration was this:



enter image description here



The backup/restoration procedure involved the /dev/sda2 partition (ext4). With the swap space (that I'll not discuss anymore in order to simplify the description), it involves about 70 GB. The rest are ntfs partitions, one a Windows system partition, the other a "Depo" partition accessible from both Windows and Linux.



This is what I did:



BACKUP:



  • with gparted in a live session shrunk the partition to the smallest size (from 70 to 30 GB)


  • made the backup (30 GB) with Disks (as an iso image that I saved on an external device)


(After creating an extended partition and testing different Linux systems like Ubuntu Gnome and Solus, I wanted to go back to the initial situation, as I decided I preferred my original single Linux Mint stable and well customized system.)



RESTORATION:



  • with Gparted, deleted the entire (70 GB) extended partition and created a new 70 GB ext4 primary partition


  • with Disks, restored the 30 GB partition (from the iso image) onto the 70 GB one!!!! ---- maybe I should have restored it onto unformatted space? - IS THIS THE ERROR?


  • at this point the entire 70 GB partition seemed almost full, although the restored image had only 30 GB; boot-repair complained about lack of space when trying to install grub on that partition and failed to install grub


  • and gparted reported only 600 MB free, while c 40 GB free space was somehow visible but ONLY in the image gparted showed, not in the numbers; RESIZING WAS NOT POSSIBLE

  • after restarting in a new live session: gparted reported only 600 MB free but resizing was possible: reducing the partition to real full space of 30 GB, 40 GB appeared unallocated all of a sudden, then extending entire partition to full 70 GB was possible

  • at this point only grub was missing, and running boot-repair in live session all went fine (I selected advanced options: install grub on sda, boot from the given partition (sda2), un-checked "purge grub" as there was no grub installed anyway)

After booting from local drive, the old grub list was available and the old system was in place. The only problem, it took a lot of time first time to enter session, and I also think the boot time is now generally somewhat longer..




So, my question is: should one restore a system partition image onto an empty partition the way I did or on an not-formatted space? or in a somehow different way?







share|improve this question






















  • Did you unmounted the 70GB partition before restoring? Restoring Linux is straight forward. Just copy back all files, install bootloader & configure it. Done.
    – Abhik Bose
    Nov 21 '17 at 23:20










  • @AbhikBose - I do not remember whether I unmounted or not... You mean I could back-up by just copy/paste all files (without copying as iso the entire partition?)
    – cipricus
    Nov 22 '17 at 11:16






  • 1




    Yah.. I had written a procedure of restoring linux at unix.stackexchange.com/questions/403166/…. Please have a look once. This worked for me. You need not to have minimal installation as you're restoring on same hardware. And remember to reinstall grub after restoring.
    – Abhik Bose
    Nov 22 '17 at 11:40











  • @AbhikBose - Very interesting. The drivers issue is minimal: I recently simply moved a HDD with both Win7 and Linux from a HP to a Sony laptop with no issues for Linux (some for Windows). But your procedure per se doesn't seem simpler than what I did. It is mostly a matter of time. - My action was a success, but what I want to know is how to prepare the location where the iso is to be restored?
    – cipricus
    Nov 22 '17 at 14:03






  • 1




    Ok. I think you shall format the partition and unmount it before restore. Theoretically that shall work without issue.
    – Abhik Bose
    Nov 22 '17 at 14:10












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have been able to backup and restore a Linux Mint system partition with 'Disks' (command to run: gnome-disks; package to install: gnome-disk-utility) from a live session, but I am not sure that was the best way to do it: on the contrary!



I need advice on what I did wrong in order to have a proper procedure available next time I need it.



My initial configuration was this:



enter image description here



The backup/restoration procedure involved the /dev/sda2 partition (ext4). With the swap space (that I'll not discuss anymore in order to simplify the description), it involves about 70 GB. The rest are ntfs partitions, one a Windows system partition, the other a "Depo" partition accessible from both Windows and Linux.



This is what I did:



BACKUP:



  • with gparted in a live session shrunk the partition to the smallest size (from 70 to 30 GB)


  • made the backup (30 GB) with Disks (as an iso image that I saved on an external device)


(After creating an extended partition and testing different Linux systems like Ubuntu Gnome and Solus, I wanted to go back to the initial situation, as I decided I preferred my original single Linux Mint stable and well customized system.)



RESTORATION:



  • with Gparted, deleted the entire (70 GB) extended partition and created a new 70 GB ext4 primary partition


  • with Disks, restored the 30 GB partition (from the iso image) onto the 70 GB one!!!! ---- maybe I should have restored it onto unformatted space? - IS THIS THE ERROR?


  • at this point the entire 70 GB partition seemed almost full, although the restored image had only 30 GB; boot-repair complained about lack of space when trying to install grub on that partition and failed to install grub


  • and gparted reported only 600 MB free, while c 40 GB free space was somehow visible but ONLY in the image gparted showed, not in the numbers; RESIZING WAS NOT POSSIBLE

  • after restarting in a new live session: gparted reported only 600 MB free but resizing was possible: reducing the partition to real full space of 30 GB, 40 GB appeared unallocated all of a sudden, then extending entire partition to full 70 GB was possible

  • at this point only grub was missing, and running boot-repair in live session all went fine (I selected advanced options: install grub on sda, boot from the given partition (sda2), un-checked "purge grub" as there was no grub installed anyway)

After booting from local drive, the old grub list was available and the old system was in place. The only problem, it took a lot of time first time to enter session, and I also think the boot time is now generally somewhat longer..




So, my question is: should one restore a system partition image onto an empty partition the way I did or on an not-formatted space? or in a somehow different way?







share|improve this question














I have been able to backup and restore a Linux Mint system partition with 'Disks' (command to run: gnome-disks; package to install: gnome-disk-utility) from a live session, but I am not sure that was the best way to do it: on the contrary!



I need advice on what I did wrong in order to have a proper procedure available next time I need it.



My initial configuration was this:



enter image description here



The backup/restoration procedure involved the /dev/sda2 partition (ext4). With the swap space (that I'll not discuss anymore in order to simplify the description), it involves about 70 GB. The rest are ntfs partitions, one a Windows system partition, the other a "Depo" partition accessible from both Windows and Linux.



This is what I did:



BACKUP:



  • with gparted in a live session shrunk the partition to the smallest size (from 70 to 30 GB)


  • made the backup (30 GB) with Disks (as an iso image that I saved on an external device)


(After creating an extended partition and testing different Linux systems like Ubuntu Gnome and Solus, I wanted to go back to the initial situation, as I decided I preferred my original single Linux Mint stable and well customized system.)



RESTORATION:



  • with Gparted, deleted the entire (70 GB) extended partition and created a new 70 GB ext4 primary partition


  • with Disks, restored the 30 GB partition (from the iso image) onto the 70 GB one!!!! ---- maybe I should have restored it onto unformatted space? - IS THIS THE ERROR?


  • at this point the entire 70 GB partition seemed almost full, although the restored image had only 30 GB; boot-repair complained about lack of space when trying to install grub on that partition and failed to install grub


  • and gparted reported only 600 MB free, while c 40 GB free space was somehow visible but ONLY in the image gparted showed, not in the numbers; RESIZING WAS NOT POSSIBLE

  • after restarting in a new live session: gparted reported only 600 MB free but resizing was possible: reducing the partition to real full space of 30 GB, 40 GB appeared unallocated all of a sudden, then extending entire partition to full 70 GB was possible

  • at this point only grub was missing, and running boot-repair in live session all went fine (I selected advanced options: install grub on sda, boot from the given partition (sda2), un-checked "purge grub" as there was no grub installed anyway)

After booting from local drive, the old grub list was available and the old system was in place. The only problem, it took a lot of time first time to enter session, and I also think the boot time is now generally somewhat longer..




So, my question is: should one restore a system partition image onto an empty partition the way I did or on an not-formatted space? or in a somehow different way?









share|improve this question













share|improve this question




share|improve this question








edited Mar 30 at 12:15

























asked Nov 20 '17 at 12:46









cipricus

2,595850122




2,595850122











  • Did you unmounted the 70GB partition before restoring? Restoring Linux is straight forward. Just copy back all files, install bootloader & configure it. Done.
    – Abhik Bose
    Nov 21 '17 at 23:20










  • @AbhikBose - I do not remember whether I unmounted or not... You mean I could back-up by just copy/paste all files (without copying as iso the entire partition?)
    – cipricus
    Nov 22 '17 at 11:16






  • 1




    Yah.. I had written a procedure of restoring linux at unix.stackexchange.com/questions/403166/…. Please have a look once. This worked for me. You need not to have minimal installation as you're restoring on same hardware. And remember to reinstall grub after restoring.
    – Abhik Bose
    Nov 22 '17 at 11:40











  • @AbhikBose - Very interesting. The drivers issue is minimal: I recently simply moved a HDD with both Win7 and Linux from a HP to a Sony laptop with no issues for Linux (some for Windows). But your procedure per se doesn't seem simpler than what I did. It is mostly a matter of time. - My action was a success, but what I want to know is how to prepare the location where the iso is to be restored?
    – cipricus
    Nov 22 '17 at 14:03






  • 1




    Ok. I think you shall format the partition and unmount it before restore. Theoretically that shall work without issue.
    – Abhik Bose
    Nov 22 '17 at 14:10
















  • Did you unmounted the 70GB partition before restoring? Restoring Linux is straight forward. Just copy back all files, install bootloader & configure it. Done.
    – Abhik Bose
    Nov 21 '17 at 23:20










  • @AbhikBose - I do not remember whether I unmounted or not... You mean I could back-up by just copy/paste all files (without copying as iso the entire partition?)
    – cipricus
    Nov 22 '17 at 11:16






  • 1




    Yah.. I had written a procedure of restoring linux at unix.stackexchange.com/questions/403166/…. Please have a look once. This worked for me. You need not to have minimal installation as you're restoring on same hardware. And remember to reinstall grub after restoring.
    – Abhik Bose
    Nov 22 '17 at 11:40











  • @AbhikBose - Very interesting. The drivers issue is minimal: I recently simply moved a HDD with both Win7 and Linux from a HP to a Sony laptop with no issues for Linux (some for Windows). But your procedure per se doesn't seem simpler than what I did. It is mostly a matter of time. - My action was a success, but what I want to know is how to prepare the location where the iso is to be restored?
    – cipricus
    Nov 22 '17 at 14:03






  • 1




    Ok. I think you shall format the partition and unmount it before restore. Theoretically that shall work without issue.
    – Abhik Bose
    Nov 22 '17 at 14:10















Did you unmounted the 70GB partition before restoring? Restoring Linux is straight forward. Just copy back all files, install bootloader & configure it. Done.
– Abhik Bose
Nov 21 '17 at 23:20




Did you unmounted the 70GB partition before restoring? Restoring Linux is straight forward. Just copy back all files, install bootloader & configure it. Done.
– Abhik Bose
Nov 21 '17 at 23:20












@AbhikBose - I do not remember whether I unmounted or not... You mean I could back-up by just copy/paste all files (without copying as iso the entire partition?)
– cipricus
Nov 22 '17 at 11:16




@AbhikBose - I do not remember whether I unmounted or not... You mean I could back-up by just copy/paste all files (without copying as iso the entire partition?)
– cipricus
Nov 22 '17 at 11:16




1




1




Yah.. I had written a procedure of restoring linux at unix.stackexchange.com/questions/403166/…. Please have a look once. This worked for me. You need not to have minimal installation as you're restoring on same hardware. And remember to reinstall grub after restoring.
– Abhik Bose
Nov 22 '17 at 11:40





Yah.. I had written a procedure of restoring linux at unix.stackexchange.com/questions/403166/…. Please have a look once. This worked for me. You need not to have minimal installation as you're restoring on same hardware. And remember to reinstall grub after restoring.
– Abhik Bose
Nov 22 '17 at 11:40













@AbhikBose - Very interesting. The drivers issue is minimal: I recently simply moved a HDD with both Win7 and Linux from a HP to a Sony laptop with no issues for Linux (some for Windows). But your procedure per se doesn't seem simpler than what I did. It is mostly a matter of time. - My action was a success, but what I want to know is how to prepare the location where the iso is to be restored?
– cipricus
Nov 22 '17 at 14:03




@AbhikBose - Very interesting. The drivers issue is minimal: I recently simply moved a HDD with both Win7 and Linux from a HP to a Sony laptop with no issues for Linux (some for Windows). But your procedure per se doesn't seem simpler than what I did. It is mostly a matter of time. - My action was a success, but what I want to know is how to prepare the location where the iso is to be restored?
– cipricus
Nov 22 '17 at 14:03




1




1




Ok. I think you shall format the partition and unmount it before restore. Theoretically that shall work without issue.
– Abhik Bose
Nov 22 '17 at 14:10




Ok. I think you shall format the partition and unmount it before restore. Theoretically that shall work without issue.
– Abhik Bose
Nov 22 '17 at 14:10










3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










While creating backup of a Linux system and restoring following shall be helpful.



  1. The destination partition must be unmounted before restoration. Format the partition while mounted and then unmount it.

  2. Size of the destination partition doesn't matter unless it's not smaller than the image file to be restored.

  3. After restoration the free volume can be shrunk.

  4. During shrinking the disk shall be shrunk from end. If it's shrunk from starting the bootloader must be re installed in case of legacy BIOS based system

  5. A Linux system can be backed up and restored without image creation as mentioned in this article How to install CentOS 7 into a directory (without booting an install system)?





share|improve this answer






















  • that sounds very reasonable; my gparted problem was either related to the partition not being unmounted (although in that case the restoration should have failed completely I guess - shouldn't it?), or, more probable, that misconfiguration/misreporting in gparted was something like a bug, easily fixed by restart and shrinking/resizing.
    – cipricus
    Nov 22 '17 at 21:38











  • I can confirm that even with un-mounted partition the free space that remains on it after restoring the backup is somehow reported as non-allocated and the restored system lacks space in case the back-up partition was shrunk before being exported. That can be fixed by gparted with the "Check" option. Therefore, it is not a good idea to reduce partition to minimum before backup. - Also: grub-repair is always needed.
    – cipricus
    Dec 8 '17 at 12:33

















up vote
0
down vote













In these case I always say: Unplug the hard drive first! That must be the first step if you want to restore data from it. This is because every operation may overwrite a sector that you might want to restore. Let's skip this part since you are already over it.



Gather the following:



  • Another computer with a separate OS (Windows, Linux, depends on your restore application)

  • A HDD Dock where you can plug your faulty hard disk

  • A partition specific software

Next: always save as many data as many you can! I would search in google what applications can restore data from an Ext4 partition. There is one for windows, that can be used. Get yourself a data recovery software and install it. It doesn't matter if it is a Windows or Linux application. And lastly you'll need another hard drive that is at least as big as the disk where you've lost the data. You'll save your lost files here. When it is all done and ready to scan drives for data, only then start up the hard drive. Then just follow instructions and save/backup/copy (NOT MOVE!!) all your files to the new disk. This is required if you cannot restore the disk to it's former status, then you can at least re-install faster by having all your configs and files ready on another disk. Now you can start trying to recover the disk to it's previous status.



Using Gparted and the Disks utility was a good idea since they are pretty good restoring partitions if they are not so badly corrupted. A more specific application like TestDisk could be better, but I've not lost any Ext4 disks so far, so I can't really tell you if this works or not. For Ext3 and NTFS I've used GetDataBack and that worked like a charm. But that is not good for Ext4. LVM could also be an issue but there you can use snapshots to get back to a previous state.






share|improve this answer




















  • thank you for all the good advice, but my question is more limited; it specifically refers to Disks: how should I configure the target space/partition where I want to restore a partition saved as iso?. I have marked in my question the step in my action that I am concerned with.
    – cipricus
    Nov 22 '17 at 14:49

















up vote
0
down vote













On RHEL/CentOS based systems, I use rear (Relax-and-Recover http://relax-and-recover.org/download/). This is also released for Ubuntu , so you may consider this tool, which permits to create bootable backups (on USB stick for example).






share|improve this answer




















  • Has it also a gui or only cli?
    – cipricus
    Nov 22 '17 at 14:45










  • I only know about the CLI (which fits my needs)...
    – tonioc
    Nov 22 '17 at 18:10










  • my question specifically refers to 'Disks' (gnome-disks): how should I configure the target space/partition where I want to restore a partition saved as iso?. I think I have received an answer on that (namely: it should be a formatted partition, it should not be mounted, being larger than the iso is not a problem). Thanks.
    – cipricus
    Nov 22 '17 at 21:32











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405767%2fhow-to-correctly-restore-system-partition-iso-image-with-disks%23new-answer', 'question_page');

);

Post as a guest






























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










While creating backup of a Linux system and restoring following shall be helpful.



  1. The destination partition must be unmounted before restoration. Format the partition while mounted and then unmount it.

  2. Size of the destination partition doesn't matter unless it's not smaller than the image file to be restored.

  3. After restoration the free volume can be shrunk.

  4. During shrinking the disk shall be shrunk from end. If it's shrunk from starting the bootloader must be re installed in case of legacy BIOS based system

  5. A Linux system can be backed up and restored without image creation as mentioned in this article How to install CentOS 7 into a directory (without booting an install system)?





share|improve this answer






















  • that sounds very reasonable; my gparted problem was either related to the partition not being unmounted (although in that case the restoration should have failed completely I guess - shouldn't it?), or, more probable, that misconfiguration/misreporting in gparted was something like a bug, easily fixed by restart and shrinking/resizing.
    – cipricus
    Nov 22 '17 at 21:38











  • I can confirm that even with un-mounted partition the free space that remains on it after restoring the backup is somehow reported as non-allocated and the restored system lacks space in case the back-up partition was shrunk before being exported. That can be fixed by gparted with the "Check" option. Therefore, it is not a good idea to reduce partition to minimum before backup. - Also: grub-repair is always needed.
    – cipricus
    Dec 8 '17 at 12:33














up vote
1
down vote



accepted










While creating backup of a Linux system and restoring following shall be helpful.



  1. The destination partition must be unmounted before restoration. Format the partition while mounted and then unmount it.

  2. Size of the destination partition doesn't matter unless it's not smaller than the image file to be restored.

  3. After restoration the free volume can be shrunk.

  4. During shrinking the disk shall be shrunk from end. If it's shrunk from starting the bootloader must be re installed in case of legacy BIOS based system

  5. A Linux system can be backed up and restored without image creation as mentioned in this article How to install CentOS 7 into a directory (without booting an install system)?





share|improve this answer






















  • that sounds very reasonable; my gparted problem was either related to the partition not being unmounted (although in that case the restoration should have failed completely I guess - shouldn't it?), or, more probable, that misconfiguration/misreporting in gparted was something like a bug, easily fixed by restart and shrinking/resizing.
    – cipricus
    Nov 22 '17 at 21:38











  • I can confirm that even with un-mounted partition the free space that remains on it after restoring the backup is somehow reported as non-allocated and the restored system lacks space in case the back-up partition was shrunk before being exported. That can be fixed by gparted with the "Check" option. Therefore, it is not a good idea to reduce partition to minimum before backup. - Also: grub-repair is always needed.
    – cipricus
    Dec 8 '17 at 12:33












up vote
1
down vote



accepted







up vote
1
down vote



accepted






While creating backup of a Linux system and restoring following shall be helpful.



  1. The destination partition must be unmounted before restoration. Format the partition while mounted and then unmount it.

  2. Size of the destination partition doesn't matter unless it's not smaller than the image file to be restored.

  3. After restoration the free volume can be shrunk.

  4. During shrinking the disk shall be shrunk from end. If it's shrunk from starting the bootloader must be re installed in case of legacy BIOS based system

  5. A Linux system can be backed up and restored without image creation as mentioned in this article How to install CentOS 7 into a directory (without booting an install system)?





share|improve this answer














While creating backup of a Linux system and restoring following shall be helpful.



  1. The destination partition must be unmounted before restoration. Format the partition while mounted and then unmount it.

  2. Size of the destination partition doesn't matter unless it's not smaller than the image file to be restored.

  3. After restoration the free volume can be shrunk.

  4. During shrinking the disk shall be shrunk from end. If it's shrunk from starting the bootloader must be re installed in case of legacy BIOS based system

  5. A Linux system can be backed up and restored without image creation as mentioned in this article How to install CentOS 7 into a directory (without booting an install system)?






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 22 '17 at 14:57









cipricus

2,595850122




2,595850122










answered Nov 22 '17 at 14:51









Abhik Bose

1,5341217




1,5341217











  • that sounds very reasonable; my gparted problem was either related to the partition not being unmounted (although in that case the restoration should have failed completely I guess - shouldn't it?), or, more probable, that misconfiguration/misreporting in gparted was something like a bug, easily fixed by restart and shrinking/resizing.
    – cipricus
    Nov 22 '17 at 21:38











  • I can confirm that even with un-mounted partition the free space that remains on it after restoring the backup is somehow reported as non-allocated and the restored system lacks space in case the back-up partition was shrunk before being exported. That can be fixed by gparted with the "Check" option. Therefore, it is not a good idea to reduce partition to minimum before backup. - Also: grub-repair is always needed.
    – cipricus
    Dec 8 '17 at 12:33
















  • that sounds very reasonable; my gparted problem was either related to the partition not being unmounted (although in that case the restoration should have failed completely I guess - shouldn't it?), or, more probable, that misconfiguration/misreporting in gparted was something like a bug, easily fixed by restart and shrinking/resizing.
    – cipricus
    Nov 22 '17 at 21:38











  • I can confirm that even with un-mounted partition the free space that remains on it after restoring the backup is somehow reported as non-allocated and the restored system lacks space in case the back-up partition was shrunk before being exported. That can be fixed by gparted with the "Check" option. Therefore, it is not a good idea to reduce partition to minimum before backup. - Also: grub-repair is always needed.
    – cipricus
    Dec 8 '17 at 12:33















that sounds very reasonable; my gparted problem was either related to the partition not being unmounted (although in that case the restoration should have failed completely I guess - shouldn't it?), or, more probable, that misconfiguration/misreporting in gparted was something like a bug, easily fixed by restart and shrinking/resizing.
– cipricus
Nov 22 '17 at 21:38





that sounds very reasonable; my gparted problem was either related to the partition not being unmounted (although in that case the restoration should have failed completely I guess - shouldn't it?), or, more probable, that misconfiguration/misreporting in gparted was something like a bug, easily fixed by restart and shrinking/resizing.
– cipricus
Nov 22 '17 at 21:38













I can confirm that even with un-mounted partition the free space that remains on it after restoring the backup is somehow reported as non-allocated and the restored system lacks space in case the back-up partition was shrunk before being exported. That can be fixed by gparted with the "Check" option. Therefore, it is not a good idea to reduce partition to minimum before backup. - Also: grub-repair is always needed.
– cipricus
Dec 8 '17 at 12:33




I can confirm that even with un-mounted partition the free space that remains on it after restoring the backup is somehow reported as non-allocated and the restored system lacks space in case the back-up partition was shrunk before being exported. That can be fixed by gparted with the "Check" option. Therefore, it is not a good idea to reduce partition to minimum before backup. - Also: grub-repair is always needed.
– cipricus
Dec 8 '17 at 12:33












up vote
0
down vote













In these case I always say: Unplug the hard drive first! That must be the first step if you want to restore data from it. This is because every operation may overwrite a sector that you might want to restore. Let's skip this part since you are already over it.



Gather the following:



  • Another computer with a separate OS (Windows, Linux, depends on your restore application)

  • A HDD Dock where you can plug your faulty hard disk

  • A partition specific software

Next: always save as many data as many you can! I would search in google what applications can restore data from an Ext4 partition. There is one for windows, that can be used. Get yourself a data recovery software and install it. It doesn't matter if it is a Windows or Linux application. And lastly you'll need another hard drive that is at least as big as the disk where you've lost the data. You'll save your lost files here. When it is all done and ready to scan drives for data, only then start up the hard drive. Then just follow instructions and save/backup/copy (NOT MOVE!!) all your files to the new disk. This is required if you cannot restore the disk to it's former status, then you can at least re-install faster by having all your configs and files ready on another disk. Now you can start trying to recover the disk to it's previous status.



Using Gparted and the Disks utility was a good idea since they are pretty good restoring partitions if they are not so badly corrupted. A more specific application like TestDisk could be better, but I've not lost any Ext4 disks so far, so I can't really tell you if this works or not. For Ext3 and NTFS I've used GetDataBack and that worked like a charm. But that is not good for Ext4. LVM could also be an issue but there you can use snapshots to get back to a previous state.






share|improve this answer




















  • thank you for all the good advice, but my question is more limited; it specifically refers to Disks: how should I configure the target space/partition where I want to restore a partition saved as iso?. I have marked in my question the step in my action that I am concerned with.
    – cipricus
    Nov 22 '17 at 14:49














up vote
0
down vote













In these case I always say: Unplug the hard drive first! That must be the first step if you want to restore data from it. This is because every operation may overwrite a sector that you might want to restore. Let's skip this part since you are already over it.



Gather the following:



  • Another computer with a separate OS (Windows, Linux, depends on your restore application)

  • A HDD Dock where you can plug your faulty hard disk

  • A partition specific software

Next: always save as many data as many you can! I would search in google what applications can restore data from an Ext4 partition. There is one for windows, that can be used. Get yourself a data recovery software and install it. It doesn't matter if it is a Windows or Linux application. And lastly you'll need another hard drive that is at least as big as the disk where you've lost the data. You'll save your lost files here. When it is all done and ready to scan drives for data, only then start up the hard drive. Then just follow instructions and save/backup/copy (NOT MOVE!!) all your files to the new disk. This is required if you cannot restore the disk to it's former status, then you can at least re-install faster by having all your configs and files ready on another disk. Now you can start trying to recover the disk to it's previous status.



Using Gparted and the Disks utility was a good idea since they are pretty good restoring partitions if they are not so badly corrupted. A more specific application like TestDisk could be better, but I've not lost any Ext4 disks so far, so I can't really tell you if this works or not. For Ext3 and NTFS I've used GetDataBack and that worked like a charm. But that is not good for Ext4. LVM could also be an issue but there you can use snapshots to get back to a previous state.






share|improve this answer




















  • thank you for all the good advice, but my question is more limited; it specifically refers to Disks: how should I configure the target space/partition where I want to restore a partition saved as iso?. I have marked in my question the step in my action that I am concerned with.
    – cipricus
    Nov 22 '17 at 14:49












up vote
0
down vote










up vote
0
down vote









In these case I always say: Unplug the hard drive first! That must be the first step if you want to restore data from it. This is because every operation may overwrite a sector that you might want to restore. Let's skip this part since you are already over it.



Gather the following:



  • Another computer with a separate OS (Windows, Linux, depends on your restore application)

  • A HDD Dock where you can plug your faulty hard disk

  • A partition specific software

Next: always save as many data as many you can! I would search in google what applications can restore data from an Ext4 partition. There is one for windows, that can be used. Get yourself a data recovery software and install it. It doesn't matter if it is a Windows or Linux application. And lastly you'll need another hard drive that is at least as big as the disk where you've lost the data. You'll save your lost files here. When it is all done and ready to scan drives for data, only then start up the hard drive. Then just follow instructions and save/backup/copy (NOT MOVE!!) all your files to the new disk. This is required if you cannot restore the disk to it's former status, then you can at least re-install faster by having all your configs and files ready on another disk. Now you can start trying to recover the disk to it's previous status.



Using Gparted and the Disks utility was a good idea since they are pretty good restoring partitions if they are not so badly corrupted. A more specific application like TestDisk could be better, but I've not lost any Ext4 disks so far, so I can't really tell you if this works or not. For Ext3 and NTFS I've used GetDataBack and that worked like a charm. But that is not good for Ext4. LVM could also be an issue but there you can use snapshots to get back to a previous state.






share|improve this answer












In these case I always say: Unplug the hard drive first! That must be the first step if you want to restore data from it. This is because every operation may overwrite a sector that you might want to restore. Let's skip this part since you are already over it.



Gather the following:



  • Another computer with a separate OS (Windows, Linux, depends on your restore application)

  • A HDD Dock where you can plug your faulty hard disk

  • A partition specific software

Next: always save as many data as many you can! I would search in google what applications can restore data from an Ext4 partition. There is one for windows, that can be used. Get yourself a data recovery software and install it. It doesn't matter if it is a Windows or Linux application. And lastly you'll need another hard drive that is at least as big as the disk where you've lost the data. You'll save your lost files here. When it is all done and ready to scan drives for data, only then start up the hard drive. Then just follow instructions and save/backup/copy (NOT MOVE!!) all your files to the new disk. This is required if you cannot restore the disk to it's former status, then you can at least re-install faster by having all your configs and files ready on another disk. Now you can start trying to recover the disk to it's previous status.



Using Gparted and the Disks utility was a good idea since they are pretty good restoring partitions if they are not so badly corrupted. A more specific application like TestDisk could be better, but I've not lost any Ext4 disks so far, so I can't really tell you if this works or not. For Ext3 and NTFS I've used GetDataBack and that worked like a charm. But that is not good for Ext4. LVM could also be an issue but there you can use snapshots to get back to a previous state.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 '17 at 14:21









Bert

1065




1065











  • thank you for all the good advice, but my question is more limited; it specifically refers to Disks: how should I configure the target space/partition where I want to restore a partition saved as iso?. I have marked in my question the step in my action that I am concerned with.
    – cipricus
    Nov 22 '17 at 14:49
















  • thank you for all the good advice, but my question is more limited; it specifically refers to Disks: how should I configure the target space/partition where I want to restore a partition saved as iso?. I have marked in my question the step in my action that I am concerned with.
    – cipricus
    Nov 22 '17 at 14:49















thank you for all the good advice, but my question is more limited; it specifically refers to Disks: how should I configure the target space/partition where I want to restore a partition saved as iso?. I have marked in my question the step in my action that I am concerned with.
– cipricus
Nov 22 '17 at 14:49




thank you for all the good advice, but my question is more limited; it specifically refers to Disks: how should I configure the target space/partition where I want to restore a partition saved as iso?. I have marked in my question the step in my action that I am concerned with.
– cipricus
Nov 22 '17 at 14:49










up vote
0
down vote













On RHEL/CentOS based systems, I use rear (Relax-and-Recover http://relax-and-recover.org/download/). This is also released for Ubuntu , so you may consider this tool, which permits to create bootable backups (on USB stick for example).






share|improve this answer




















  • Has it also a gui or only cli?
    – cipricus
    Nov 22 '17 at 14:45










  • I only know about the CLI (which fits my needs)...
    – tonioc
    Nov 22 '17 at 18:10










  • my question specifically refers to 'Disks' (gnome-disks): how should I configure the target space/partition where I want to restore a partition saved as iso?. I think I have received an answer on that (namely: it should be a formatted partition, it should not be mounted, being larger than the iso is not a problem). Thanks.
    – cipricus
    Nov 22 '17 at 21:32















up vote
0
down vote













On RHEL/CentOS based systems, I use rear (Relax-and-Recover http://relax-and-recover.org/download/). This is also released for Ubuntu , so you may consider this tool, which permits to create bootable backups (on USB stick for example).






share|improve this answer




















  • Has it also a gui or only cli?
    – cipricus
    Nov 22 '17 at 14:45










  • I only know about the CLI (which fits my needs)...
    – tonioc
    Nov 22 '17 at 18:10










  • my question specifically refers to 'Disks' (gnome-disks): how should I configure the target space/partition where I want to restore a partition saved as iso?. I think I have received an answer on that (namely: it should be a formatted partition, it should not be mounted, being larger than the iso is not a problem). Thanks.
    – cipricus
    Nov 22 '17 at 21:32













up vote
0
down vote










up vote
0
down vote









On RHEL/CentOS based systems, I use rear (Relax-and-Recover http://relax-and-recover.org/download/). This is also released for Ubuntu , so you may consider this tool, which permits to create bootable backups (on USB stick for example).






share|improve this answer












On RHEL/CentOS based systems, I use rear (Relax-and-Recover http://relax-and-recover.org/download/). This is also released for Ubuntu , so you may consider this tool, which permits to create bootable backups (on USB stick for example).







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 '17 at 14:37









tonioc

1,12457




1,12457











  • Has it also a gui or only cli?
    – cipricus
    Nov 22 '17 at 14:45










  • I only know about the CLI (which fits my needs)...
    – tonioc
    Nov 22 '17 at 18:10










  • my question specifically refers to 'Disks' (gnome-disks): how should I configure the target space/partition where I want to restore a partition saved as iso?. I think I have received an answer on that (namely: it should be a formatted partition, it should not be mounted, being larger than the iso is not a problem). Thanks.
    – cipricus
    Nov 22 '17 at 21:32

















  • Has it also a gui or only cli?
    – cipricus
    Nov 22 '17 at 14:45










  • I only know about the CLI (which fits my needs)...
    – tonioc
    Nov 22 '17 at 18:10










  • my question specifically refers to 'Disks' (gnome-disks): how should I configure the target space/partition where I want to restore a partition saved as iso?. I think I have received an answer on that (namely: it should be a formatted partition, it should not be mounted, being larger than the iso is not a problem). Thanks.
    – cipricus
    Nov 22 '17 at 21:32
















Has it also a gui or only cli?
– cipricus
Nov 22 '17 at 14:45




Has it also a gui or only cli?
– cipricus
Nov 22 '17 at 14:45












I only know about the CLI (which fits my needs)...
– tonioc
Nov 22 '17 at 18:10




I only know about the CLI (which fits my needs)...
– tonioc
Nov 22 '17 at 18:10












my question specifically refers to 'Disks' (gnome-disks): how should I configure the target space/partition where I want to restore a partition saved as iso?. I think I have received an answer on that (namely: it should be a formatted partition, it should not be mounted, being larger than the iso is not a problem). Thanks.
– cipricus
Nov 22 '17 at 21:32





my question specifically refers to 'Disks' (gnome-disks): how should I configure the target space/partition where I want to restore a partition saved as iso?. I think I have received an answer on that (namely: it should be a formatted partition, it should not be mounted, being larger than the iso is not a problem). Thanks.
– cipricus
Nov 22 '17 at 21:32


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405767%2fhow-to-correctly-restore-system-partition-iso-image-with-disks%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?