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.

So short story is that I am wanting to grab my ubuntu install, back up to an external disk, delete everything from my hdd, repartition my hdd, put my ubuntu install back.

Long story is.

I finally got my recovery discs, so I do not need to recovery partitions, not the mention my hdd is kinda messy, So I am going to wipe it and put everything back.

Thing is I don't want to have to re-install everything, I would rather just copy/paste my ubuntu install if possible.

Oh, What I should also mention is that I will be dual booting windows!

share|improve this question
    
What are you backing up to? –  Azendale Jun 22 '11 at 5:39
    
portable hardrive –  Hailwood Jun 22 '11 at 6:11
add comment

5 Answers 5

up vote 4 down vote accepted

I would do something like

sudo rsync -avx --exclude=".gvfs" / /path/to/backup/folder/

(The -x option makes it ignore other filesystems, which makes it work even on a running system, which is great for backups!) You will want to do this step for each partition you decide to back up.

Once you have the partitions the way you want and windows installed, I would boot a Ubuntu LiveCD/USB. Then mount the new partition and backup partition and run something like

sudo rsync -avx --exclude=".gvfs" /path/to/backup/folder/ /path/to/new/mounted/partition/

You will want to do this step for each partition you want to restore.

Run sudo blkid to get the uuid of each of the new partitions. Then run

gksudo gedit /path/to/new/mounted/partition/etc/fstab

and change the UUIDs and then save the file.

Then I would follow the instructions on Grub2 Reinstalling from LiveCD in the "Method 3-Chroot" section to install Grub and let it detect the new disk layout.

share|improve this answer
    
--exclude=/proc --exclude=/sys --exclude=/dev would be a good idea if you want to take this approach. –  Lekensteyn Jun 22 '11 at 7:36
    
@Lekensteyn: the -x option do not consider mounted filesystems, so /proc, /sys and /dev should already be excluded. –  enzotib Jun 22 '11 at 8:10
    
it could be necessary to modify /etc/fstab, it is worth notice this. Also, in the restore of the backed-up partition probably the --exclude is not necessary. –  enzotib Jun 22 '11 at 8:12
    
@enzotib Thanks for reminding me of that part. @Lekensteyn I've used this method a couple of times to back up and restore systems, and -x option does the trick (but thanks for pointing the exclude thing out just in case.) –  Azendale Jun 22 '11 at 21:45
add comment

An alternative is to do a fresh install and re-install the packages that you have installed.

Here is a guide on exporting / importing a list of installed applications. As has been mentioned in other replies you can back up your /home first and copy it back.

share|improve this answer
add comment

You can use Clonezilla, or, if you prefer a nice GUI solution, Paragon Backup & Recovery 2011 (Advanced) Free (require a Windows PC).

http://clonezilla.org/

http://www.paragon-software.com/home/br-free/index.html

share|improve this answer
add comment

i'm not really sure, but you can try Remastersys

for installation Install

share|improve this answer
add comment

You can copy /home to a new partition, then copy it back to your new installation. Guide here:

http://www.ibm.com/developerworks/linux/library/l-partplan/index.html

You can also create a custom iso, though I've never done that. Some starter info here:

https://help.ubuntu.com/community/LiveCDCustomizationFromScratch

And tons more if you google 'create custom ubuntu iso'.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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