Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
How to backup a system?

Currently I'm using ubuntu Maverick and Windows 7, and I decided to switch completely on Linux.
There are a lot of space used by windows partitions. I couldn't found a way to merge all partition into one partition (My ubuntu Partition), so the Only remaining way is too format all my disk, and reinstall ubuntu...
I don't want to loose my system updates, installed application, repositories and ....

what should I do? is there any way to back up the entire ubuntu?


P.S: I already read this but I'm a little scared of losing my data by doing it

share|improve this question
    
would the solution in that question work for my problem? –  Behzadsh Dec 8 '10 at 20:06
    
you could delete windows and it's partition and expand the ubuntu partition but I'm guessing you will be too afraid to do that :D! –  RolandiXor Dec 8 '10 at 20:36
    
@Roland Taylor: How to expand them? I could not find a way to expand them. –  Behzadsh Dec 8 '10 at 20:43
    
@iamsid: I mean, if I back up my system that way (on an external hard for example), and then reinstall ubuntu, then overwrite backup files; would it harm new installed ubuntu? –  Behzadsh Dec 8 '10 at 20:46
    
You would have to do that from the livecd using gparted, but I would need to be sure you would be able to do this based on simple instructions before I actually provide instructions (don't want you to lose your data). In other words if you don't know what you are doing, I wouldn't want you to risk anything. –  RolandiXor Dec 8 '10 at 20:50
show 2 more comments

marked as duplicate by Marco Ceppi Jun 5 '11 at 20:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

up vote 10 down vote accepted

If you have enough free space on a second hard disk, you can use GParted (part of every Ubuntu live CD) to copy & paste your Ubuntu partition:

  1. Open GParted from a live CD session: System > Administration > Partition Editor
  2. In the top right corner select your internal hard disk.
  3. Select the partition you want to copy (right-click > "Copy"):

  4. In the top right corner select your external/backup hard disk.
  5. Paste the copied partition into unallocated space (right-click > "Paste"):

  6. Click on "Apply" and wait while GParted copies the partition.

After you successfully copied your Ubuntu partition to the backup hard disk, you can use GParted to delete all the other partitions on your internal hard disk (just select them, right-click > "Delete" > "Apply").

To restore you backup, repeat the steps in the other direction (backup disk -> internal hard disk). When this is done, you can resize the partition (select, right-click > "Resize/Move" > "Apply") and finally create a new Swap partition (see this question to determine the right size for that partition).


After that you should be able to boot Ubuntu, but it will probably complain, because it cannot find the old Swap partition. You can easily fix this by updating the two files where your old Swap partition is referenced to: /etc/fstab and /etc/initramfs-tools/conf.d/resume.

  1. Find the new UUID (Universally Unique Identifier):

    • In a terminal run:
      sudo blkid | grep swap
    • That's it - that long number is the UUID.
  2. Replace the UUID in /etc/fstab and /etc/initramfs-tools/conf.d/resume:

    • Open those files from a terminal:
      gksudo gedit /etc/fstab /etc/initramfs-tools/conf.d/resume
    • Now update the UUID in /etc/fstab where it says "swap" and replace the UUID in /etc/initramfs-tools/conf.d/resume. Save both and quit.
    • Finally run
      sudo update-initramfs -c -k all
      and reboot.

Done. Wasn't that easy?  

share|improve this answer
    
ubuntu booted but after booting up, It shows me tty1 console! –  Behzadsh Dec 10 '10 at 18:33
    
Can you log in and run sudo start gdm? Do you see any error messages when doing more /var/log/Xorg.0.log? –  htorque Dec 10 '10 at 18:44
    
when I do sudo start gdm console blink and then nothing. the more /var/log/Xorg.0.log is here db.tt/BnCds7r –  Behzadsh Dec 10 '10 at 19:33
2  
Quick googling: looks like your video driver needs KMS enabled and it currently isn't (but this should also have been a problem in the old installation unless you changed systems in the meantime?). Boot the computer, press and hold the left Shift key until you see the GRUB menu (with a highlighted Ubuntu entry). Now press the 'c' key and go down to the line starting with "linux". At the end of this line add "i915.modeset=1" (without the quotes) and press Ctrl+x to boot. If this works, let us know and you can make this change permanent. –  htorque Dec 10 '10 at 19:55
2  
Ok, now do gksudo gedit /etc/default/grub and add "i915.modeset=1" at the end of the "GRUB_CMDLINE_LINUX_DEFAULT=" line. Save, and run sudo update-grub. The next boot should work again. –  htorque Dec 10 '10 at 20:34
show 3 more comments
  • Install sbackup Install sbackup

  • After installation it will be found under System>>Administration>>Simple Backup Config
    alt text

  • Step by step instructions can be found here.

share|improve this answer
add comment

I'd go with remastersys as well. Or Déja Dup (see Software Centre), but that's more like a "time machine" for Ubuntu

I also suggest you install / and /home on different partitions, so the problem never arises again ;-)

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.