[SOLVED] Server dead and restore image in other computer
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello everyone, my server computer is dead, its a +10 years old (was my first pc) and hdd is broken. I dont want pay for other hdd for a 10 years old computer and i have for house a computer with dual core processor, the same memory RAM (1 GB).
The problem is that i did generate monthly image from full hdd server with dd command, but the question is... how can i restore the image in other different computer?
The "simple" answer is to dd the image to a new disk and boot it. This is unlikely to be satisfactory as the backup was of a system built for the hardware it had, not the new system it is to be restored to. Might work though.
Another option is to mount the partition(s) contained in the image and extract your data onto the new system - might (probably will) require re-installing some packages and reconfiguring the same. Might be worth fsck'ing the filesystems in the image before using them - hmmm, take another copy of the image before doing this. How did you dd the backup; with the system running, or from a livecd ?.
I have ranted in the past about dd being the worst backup option - certainly better than no backup at all.
Last edited by syg00; 11-17-2016 at 03:43 PM.
Reason: strike, and comment.
I might be tempted to do a clean install on a new system. I say this only because there might be lingering remnants of who knows what on dd image.
Then I'd boot up a virtual machine with that dd image as raw or as above mount it to a file location. (agreed that a copy of dd image is better) Then copy off data as needed. If the image had any sort of malware then it could be copied over to the new install so you'd want to be aware of best practices.
Debian works pretty good on a dd to different hardware. Video and nic tend to be the issues if at all.
Finally I restore iso image in the other computer, After fighting with the new network card the server is working 100%, and more fast that before because is a dual core CPU.
Only one question more, The new hdd is more big that old, the old is 160 GB and new is 230 GB, how can i use 230 GB and not 160?
This is another reason dd is a bad option - devise a better backup strategy.
May be as simple as adding new partitions, may be you need to resize and/or move partitions to accommodate - depends on current layout and your plans. If you want assistance post the output of these (use [code] tags so we can read it) - change /dev/sda as appropriate in need.
This is another reason dd is a bad option - devise a better backup strategy.
May be as simple as adding new partitions, may be you need to resize and/or move partitions to accommodate - depends on current layout and your plans. If you want assistance post the output of these (use [code] tags so we can read it) - change /dev/sda as appropriate in need.
Code:
sudo lsblk -f
sudo parted /dev/sda "print free"
Yes, now i think that dd is not the better option, but is very simple.
If you simply want to extend the root, swapoff then delete the swap and extended partition - reallocate the swap at end of disk; fix fstab if it uses UUID.
Reboot to check, then use gparted liveCD to extend the root partition - it will also adjust the ext4 filesystem at the same time. Simple and effective.
You can also do the swap from gparted if you wish.
If you simply want to extend the root, swapoff then delete the swap and extended partition - reallocate the swap at end of disk; fix fstab if it uses UUID.
Reboot to check, then use gparted liveCD to extend the root partition - it will also adjust the ext4 filesystem at the same time. Simple and effective.
You can also do the swap from gparted if you wish.
Thanks very much!!! I did not think it was that easy, now i use full new hdd
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.