LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 04-10-2009, 11:38 AM   #1
ssvirdi
Member
 
Registered: Apr 2009
Location: Ludhiana, Punjab, India.
Distribution: Ubuntu
Posts: 45

Rep: Reputation: 15
Post Complete System Backup


Hi,

I am using Ubuntu 8.10, also I am new to linux.

I want to create Complete System Backup so that while learning the linux if I tried something wrong then I can Restore the system.

Please help me to solve the problem.

Thanks
 
Old 04-10-2009, 11:48 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

Rep: Reputation: Disabled
Plenty of tools are available for the purpose.

If you want copies of whole partitions or hard disks, then consider mondo, partimage, gddrescue
etc

gnomereset can help with restoring settings.
 
Old 04-11-2009, 04:06 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
I use Bootitng. It makes a compressed image of only allocated sectors of the partition your installation is in. My Ubuntu images are around 1GB in size, doesn't matter what the partition size is. Personal data is not stored in the Ubuntu partition, rather it is stored in a shared NTFS partition, so this is just operating system and installed applications.
Because my Linux partitions are 10GB and I have Bootitng installed as boot manager, I wipe the partition squeaky clean first with it's wipe feature, rebuild the partition and restore a copy of the image that's stored in the shared data partition.
On my Dell XPS Gen2 laptop with Pentium M 2.13GHz processor, this entire process takes around 8 or 9 minutes. I can hack up my OSs and restore them as new 20 times an evening without swearing. Creating the image is about 4 or 5 minutes, and they are perfectly flawless.

You don't need to install Bootitng to use the partitioning tools, nor will you get warnings after 30 days trial asking you to pay for it.
But as a boot manager, being able to put Windows or Mac OS anywhere in the partition order (198th partition if you want), it's partitioning tools...the best part is the image backups, it's the best investment I've ever made in computers.
 
Old 04-12-2009, 01:21 AM   #4
ssvirdi
Member
 
Registered: Apr 2009
Location: Ludhiana, Punjab, India.
Distribution: Ubuntu
Posts: 45

Original Poster
Rep: Reputation: 15
Dear, Thanks for answering

But I want to know which tool a good for my purpose. I want to create backup CD like that backup cd which come with new Laptop for restoring the system.
 
Old 04-12-2009, 11:28 AM   #5
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

Rep: Reputation: Disabled
Mondo, of course
 
Old 04-12-2009, 11:30 AM   #6
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

Rep: Reputation: Disabled
You can also use a parted magic live CD for making image backups. That will be easy.
 
Old 04-12-2009, 10:12 PM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Quote:
Originally Posted by ssvirdi View Post
Dear, Thanks for answering

But I want to know which tool a good for my purpose. I want to create backup CD like that backup cd which come with new Laptop for restoring the system.
I posted a link, it is the third word in my post. By following the link and actually reading (something most people can't do apparently), you'll find the product I recommended does exactly what you're looking for.
Quote:
Imaging (including directly to CD-R/RW or DVD+R/+RW/-R/-RW)
 
Old 04-13-2009, 12:47 PM   #8
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6 on my desktop, Ubuntu 12.04 LTS on my server, Ubuntu 12.04 on my netbook and the wife's PC
Posts: 1,207

Rep: Reputation: 96
Hi ssvirdi,

I consider backup an ongoing process. There is no magic bullet. Here is how I backup my Ubuntu systems - and I HAVE successfully restored after a problem...

First I design the hard drive layout to facilitate backup. I use a small partition for the root "/" file system. This is the hardest one to backup - it is best backed up "cold" i.e. when the system is not running.

I place the /home file system on its own partition. Again, I do not make it too large. I also back this one up cold although a hot backup is possible.

The bulk of the hard drive I use for a file system mounted as /data. This is where I download stuff to, do backups to, store large files for Virtual Machines etc. This data can be hot backed up to another drive or machine.

Here is a typical machine layout on a 160GB drive:

sda1 - 8 GB mounted as /
sda2 - 1 GB formatted as swap
sda3 - 20 GB mounted as /home
sda4 - the rest mounted as /data

The first thing I do after installation is to grab the following two pieces of the puzzle:

1 - backup the mbr (master boot record) This is done from within a Ubuntu terminal thusly:

sudo dd if=/dev/sda of=Desktop/backup-sda.mbr count=1 bs=512

Save the file backup-sda.mbr from the Desktop to a USB flash drive or some place else safe.

2 - backup the partition layout of the hard drive - a lot easier than writing it all down and repartitioning by hand.

Again from a Ubuntu terminal...

sudo sfdisk -d /dev/sda > Desktop/backup-sda.sf

Save the file backup-sda.sf from the Desktop to a USB flash drive or some place else safe.

These steps can be reversed in case of a hard drive crash thusly. Start from a live CD and provide the files saved above on a USB drive

1 - In a Ubuntu terminal window issue the command to create the partitions on the new drive:
sudo sfdisk /dev/sda < {wherever the USB is mounted}backup-sda.sf
2 - In a Ubuntu terminal window issue the command to restore the mbr:
sudo dd if={wherever the USB is mounted}/backup-sda.mbr of=/dev/sda

This will give you a newly partitioned drive which should be ready to boot. You may need to tweak Grub but this whole thing is a low probability scenario as hard drives are rather reliable these days. So...

As to the main backup process... I use g4l (AKA Ghost for Linux). This is a bootable CD which works much like the Symantec product for Windows.

Step 1 - remove unnecessary files from / and /home. Generally I only worry about removing the stuff in/var/cache/apt/archives which contains the update packages which have been downloaded. Other than that I do not store too much extra stuff in / or /home.

Step 2 - boot the PC from the g4l CD and run "g4l" from the command prompt - g4l is menu driven and reasonably straight forward

Step 3 - Select sda4 as the target partition to write the backups to

Step 4 - Invoke the g4l client (from the menu) and backup sda1 (/) to /mount/local/bkup_sda1 (this creates files bkup_sda1.000, bkup_sda1.001 etc. on sda4).

Step 5 - Repeat steps 3 and 4 for sda3 (/home).

No need to backup swap of course.

Reboot the PC and find the backup files on /data. I then copy the backup files bkup_sda1.000, bkup_sda3.000 etc. to a DVD for safe keeping. I leave a copy of them on /data for convenience.

To restore the system after a problem... Boot with the g4l CD and invoke g4l as before. Select sda4 as the source of the backup files. Select the file to restore such as /mnt/local/bkup_sda1.000 (be sure to specify the .000 - if there are more files in the series g4l will find them) and restore the partition.

This should keep you reasonably safe as you explore Linux. Of course you will want to copy any important data files such as documents you create, pictures from your digital camera etc. to another location frequently as you should do with any operating system. These files are the most important and irreplaceable. They are also the easiest to backup (but probably the most overlooked by users).

Hope this helps.

Regards,

Ken
 
  


Reply

Tags
backup, complete, system


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
complete system backup Completely Clueless Linux - Software 7 04-03-2008 07:35 AM
Complete system backup Schreiberling Linux - General 16 09-03-2006 08:06 AM
System backup takes several hours to complete lagu2653 Suse/Novell 2 07-02-2005 06:03 AM
Complete System Backup? surrealdumbo Linux - Software 6 05-28-2004 11:14 AM
Complete System Backup top111 Linux - Newbie 1 08-20-2001 07:31 AM


All times are GMT -5. The time now is 05:51 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration