LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Complete System Backup (https://www.linuxquestions.org/questions/ubuntu-63/complete-system-backup-718225/)

ssvirdi 04-10-2009 10:38 AM

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

amani 04-10-2009 10:48 AM

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.

Junior Hacker 04-11-2009 03:06 AM

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.

ssvirdi 04-12-2009 12:21 AM

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.

amani 04-12-2009 10:28 AM

Mondo, of course

amani 04-12-2009 10:30 AM

You can also use a parted magic live CD for making image backups. That will be easy.

Junior Hacker 04-12-2009 09:12 PM

Quote:

Originally Posted by ssvirdi (Post 3506044)
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)

taylorkh 04-13-2009 11:47 AM

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


All times are GMT -5. The time now is 08:58 PM.