Re: Howto: Backup and restore your system!
Originally Posted by
hub_cap
I backed up my system using:
sudo tar cvpzf /media/Ubuntu_2_Backup/12.04LTS-backup-`date +%F`.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/media --exclude=/mnt --exclude=/sys --exclude=/home/fred/Downloads /
I am attemping to restore a broken system using a Live CD, with the following commands.
cd /
sudo tar xvpfz /media/Ubuntu_2_Backup/12.04LTS-backup-2012-05-06.tgz -C /
The backup is not going to my internal partition.
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x30683067
Device Boot Start End Blocks Id System
/dev/sda1 63 88132574 44066256 7 HPFS/NTFS/exFAT
/dev/sda2 88133630 312580095 112223233 5 Extended
/dev/sda5 88133632 190579094 51222731+ 83 Linux
/dev/sda6 303372288 312580095 4603904 82 Linux swap / Solaris
/dev/sda7 190579158 242915327 26168085 83 Linux
/dev/sda8 242917376 303370239 30226432 83 Linux
Where sda5 in my Ubuntu and sda1 is windows xp.
What command do I use to reinstall the backup on to the proper partition?
From what I can see, your not far wrong. Except if your running a live CD it will be trying to restore to the root directory of the Live CD session as that's the active system. I'd mount sda5, find where it's mounted (other wise mounted it to a pre-determined dir, e.g. /media/root_drive). Now lets say that it's mounted and it's mounted under "/media/sda5". then you want to use something like the following;
Code:
sudo tar xvpfz /media/Ubuntu_2_Backup/12.04LTS-backup-2012-05-06.tgz -C /media/sda5
This is all based on the fact that sda5 is the partition that want for root. you'll also need to continue on and update grub etc.
Last edited by Jonny87; May 30th, 2012 at 10:15 AM.
Ubuntu 16.04 / Linux 18
“To mess up a Linux box, you need to work at it; to mess up your Windows
box, you just need to work on it”.
Bookmarks