Tuesday, October 14, 2008

Backup of Aspire One to DNS-323

I want to backup my Aspire One to my DNS-323 NAS, there are a plethora of ways to do this, so I thought I'd evaluate them here.

The following methods came to mind immediately -
- copy the whole hard disk/partition image (ghost style)
- copy at a file level, rsync style

Initially I like the whole image method. It speeds up the recovery process, and with a Linux style implementation, it's probably possible to loop mount the image, if one just wants to recover some files anyway. Or would this require 120GB or RAM? :)

The first obstacle of the image method is that you probably need to have the file system either not mounted or mounted read-only. This could be a hassle - I certainly don't want to have to boot on an external drive to perform a backup... but maybe dropping down to single user mode would be ok.

It's worth noting that the Aspire one comes with a recovery DVD (bootable via external drive or copy to USB key), that can restore the system to it's factory install. This should be a reasonable starting point for then restoring changed applications/data/configuration from the backup mechanisms evaluated here.

Partimage
Well I liked the look of partimage, and decided to start here. Rather than setup partimaged on the NAS, it seems mounting the filesystem was an easier way to go. See below -

[user@localhost ~]$ su - Password:
[root@localhost ~]# modprobe cifs
[root@localhost ~]# mkdir /mnt/nas
[root@localhost ~]# mount -t cifs //192.168.1.10/Volume_1 /mnt/nas
Password:
[root@localhost ~]# wget "http://dag.wieers.com/rpm/packages/partimage/partimage-static-0.6.5-1.rh7.rf.i386.rpm"

[root@localhost ~]# rpm -i partimage-static-0.6.5-1.rh7.rf.i386.rpm
warning: partimage-static-0.6.5-1.rh7.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
[root@localhost ~]# partimage-static


I then added an fstab entry for the partition
//192.168.1.10/Volume_1 /mnt/nas cifs auto,rw,user=guest,password=guest

but soon wandered off into issues with mounting it as a normal (non root user). For now I'm relying on sudo.
The big challenge is to unmount the root partition, or remount it in read-only mode, such that partimage can be safely used to produce a consistent image.

As the standard Linpus install only has one partition + swap, this challenge stumped me. The only options I see are unfortunately booting off external media, or doing some repartitioning. This is where I give up on this method for now.

Next I'll take a look at unison or rdiff-backup -
http://www.cis.upenn.edu/~bcpierce/unison/
http://www.nongnu.org/rdiff-backup/

No comments: