LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-17-2016, 12:03 PM   #1
-Snake-
Member
 
Registered: Feb 2014
Location: /home/snake
Distribution: Archlinux and Debian
Posts: 56

Rep: Reputation: Disabled
Server dead and restore image in other computer


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?

My old/broken computer is:

CPU: amd 64 bits monocore
RAM: 1GB

The "new" computer is:

CPU: 64 bits dual core "intel"
RAM: 1GB

The operative system is Debian 8.

Any ideas?

Thanks.
 
Old 11-17-2016, 03:29 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
1 members found this post helpful.
Old 11-17-2016, 07:26 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
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.

Last edited by jefro; 11-17-2016 at 07:28 PM.
 
Old 11-19-2016, 11:12 AM   #4
-Snake-
Member
 
Registered: Feb 2014
Location: /home/snake
Distribution: Archlinux and Debian
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hello, thanks for response to 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?

Thanks.
 
Old 11-19-2016, 03:07 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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"
 
Old 11-19-2016, 04:38 PM   #6
-Snake-
Member
 
Registered: Feb 2014
Location: /home/snake
Distribution: Archlinux and Debian
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
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.

lsblk -f

Code:
NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
sda                                                      
├─sda1 ext4         102002c2-79f5-4dd0-baf5-7996126ea7ce /
├─sda2                                                   
└─sda5 swap         927e70ff-1bf3-4279-acb4-772d4b2874cf [SWAP]
parted /dev/sda "print free"

Code:
Model: ATA WDC WD2500AAJS-0 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
        32,3kB  1049kB  1016kB            Free Space
 1      1049kB  158GB   158GB   primary   ext4            boot
        158GB   158GB   1048kB            Free Space
 2      158GB   160GB   2145MB  extended
 5      158GB   160GB   2145MB  logical   linux-swap(v1)
        160GB   250GB   90,0GB            Free Space
Thanks.
 
Old 11-19-2016, 05:16 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
Old 11-20-2016, 04:16 AM   #8
-Snake-
Member
 
Registered: Feb 2014
Location: /home/snake
Distribution: Archlinux and Debian
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux server is dead, how to restore? sam_nyc Linux - Newbie 1 05-16-2012 11:31 AM
Image restore noony123 Linux - Newbie 2 02-27-2011 08:20 AM
iptables-restore ubuntu server does not restore at boot R03L Ubuntu 4 02-09-2010 08:14 PM
clonezilla clone disk to image, when restore from image to destination hdd problem. hocheetiong Linux - Newbie 3 05-06-2008 07:59 PM
LXer: Creating a dd/dcfldd Image Using Automated Image & Restore (AIR) LXer Syndicated Linux News 0 03-07-2007 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration