6

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!

2
  • What are you backing up to?
    – Azendale
    Jun 22, 2011 at 5:39
  • portable hardrive
    – Hailwood
    Jun 22, 2011 at 6:11

5 Answers 5

4

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.

4
  • --exclude=/proc --exclude=/sys --exclude=/dev would be a good idea if you want to take this approach.
    – Lekensteyn
    Jun 22, 2011 at 7:36
  • @Lekensteyn: the -x option do not consider mounted filesystems, so /proc, /sys and /dev should already be excluded.
    – enzotib
    Jun 22, 2011 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, 2011 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, 2011 at 21:45
0

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'.

0

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

for installation Install

0

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

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .