Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-01-2013, 02:28 PM   #1
LQ Newbie
Registered: Jun 2006
Posts: 19

Rep: Reputation: 0
How to restore a TAR backup to a new drive

Hello all,
I have been using a small script to perform a backup of my entire system every week for a few years, to a RAID5 Array of 10 SCSI drives.
I have never had any need to restore my system from my Backup, and I could use some advise and/or assistance.

The OS involved is CentOS 5.2 x86 (32bit).

My Backup Script :

OF=MOM-3_BU-Full-$(date +%m%d%Y).tgz
tar cvpzf $TGTD$OF --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/media --exclude=/sys $SRCD

I have had an unrecoverable disk failure, and find I shall have to restore the entire system to a new drive.

I do have both the CentOS "Install" and "Live CD" to use if needed.
My atempts to find the answer as to the proper method to use for restoring this to a new drive; ie... can I use this method to restore a new "bare metal" drive, or does the drive need more preparation prior to the restoration (some sort of install of CentOS, etc...). My attempts to use the OS's Archive Manager to restore the BU to a drive have not been successful. I do not have the background/experience to feel comfortable wiht this restoration without the guidance of someone more Experienced/Knowledge than myself.

I have tried to figure this out for myself, but my attempts have not been successful....



Any assistance or advice will be most appreciated.

Last edited by TexasMike; 03-01-2013 at 02:56 PM.
Old 03-02-2013, 08:42 PM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
All this script did was make a TAR file of the entire filesystem (minus a few things), it's not really the kind of thing you can just image to a bare drive and get a workable system.

You'll still need to manually partition and format the drives, and those partitions will need to more or less match what was done previously so things like fstab will work properly. You'll also need to install a bootloader to the drive's MBR.

After that, you should be able to simply extract one of the .tgz files into the blank drive, and hope for the best. Since the archive was made of a running system, there is a fairly good chance there will be a few glitches, but it will probably boot.
Old 03-04-2013, 12:01 AM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,518

Rep: Reputation: 2415Reputation: 2415Reputation: 2415Reputation: 2415Reputation: 2415Reputation: 2415Reputation: 2415Reputation: 2415Reputation: 2415Reputation: 2415Reputation: 2415
You could try for a tool that does that for you.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
Backup and Restore with TAR jay2809 Linux - Newbie 7 08-25-2004 04:47 PM
tar to restore backup -- goes to sleep?!? JZL240I-U Linux - Software 4 05-10-2004 02:55 AM
backup and restore using tar AZDAVE Linux - General 6 11-28-2003 08:40 PM
how can I restore a tar backup len snelly Linux - Newbie 1 04-30-2002 12:29 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:38 AM.

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