Computers Linux

Use Ubuntu Live CD to backup partitions

After having run Windows Vista Ultimate unactivated for some time I decided it was time to install it properly and take a full backup of the system drive at intermediate steps along the way to be able to back-track later.

I could have used the built-in Volume Shadow Copy service, perhaps together with DriveImage XML. I did try that and even made a slipstreamed boot CD using Bart PE to be able to restore the system.

However, I wanted a little more control and the potential of being able to boot off a USB stick when restoring. I also wanted to backup to and restore from a network based NAS (in my case a DNS-323). Besides, Volume Shadow Copy is only available on Windows Vista Business and Windows Vista Ultimate whereas this method will work for virtually any system.

For the time being I have settled on the following process.

a) Download and burn the Ubuntu 7.04 desktop CD and use it to boot your computer

b) Start a terminal window and change to root

  > sudo su

c) Add repositories by adding /etc/apt/sources.list and uncommenting the two lines for universe repositories.

  > nano -w /etc/apt/sources.list

d) Update the sources and install partimage and smbfs (answer yes when requested)

  > apt-get update
  > apt-get install partimage
  > apt-get install smbfs

e) Mount the NAS over the network using the samba file system driver.

  > mkdir /mnt/backup
  > mount -t smbfs -o username:[login] //[ip]/[share] /mnt/backup

Replace the parts within square brackets with whatever is appropriate in your case.

f) Run partimage and select the partition to save and the filename where the image should be placed (somewhere below /mnt/backup where the network NAS share is mounted).

  > partimage