[Gloucs] Migrating to Ubuntu whilst retaining old files/drives

Glyn Davies glynd at walmore.com
Fri Feb 16 11:35:06 GMT 2007


Andrew Oakley wrote:
> So far, the best way I can think is:
>
> * Take a backup of /dev/md0 onto DVDs
> * Take one drive out of the /dev/md0 pair, giving me Spare#1
> * Install Ubuntu on Spare#1 using ext3 filesystem (so as to retain
> compatibility with software RAID)
> * Boot from Spare #1
> * Copy all the files over from /dev/md0 to Spare#1
> * Destroy /dev/md0, giving me Spare#2
> * Create a new /dev/md0 based on Spare#1, then hotadd Spare#2 to that.
>
> Will this work? Any better suggestions?
>
>   
I *think* it should but I could quite easily be forgetting something.
> What about the users and permissions on the old filesystem? Will I be
> able to access all the files on the old /dev/md* devices (ex-Fedora)
> from the new Ubuntu OS? Will I need to ensure I re-create all the users
> and passwords identical to the Fedora OS, or can I copy vast swathes out
> of /etc/passwd and just pray?
>   
You will need /etc/passwd, /etc/shadow (I think) and /etc/group (+ other 
stuff :)). As Andy says in another post, Fedora and Ubuntu start their 
user ids at different numbers. I'd be tempted to add a user once you 
have Ubuntu running and note the user id. Then, copy the 
passwd/shadow/group stuff across and edit the user ids (use vipw) so 
they start/continue on from that id. You will then need to chown -R and 
chgrp -R the home directories.


Overall, I think Andy's suggestion of using an external USB drive to 
rsync your data is the best way. It will be a lot less hassle and will 
take a lot of the risk out of it.

Other things to  do/remember:

Make a backup tar of /etc - lots of config stuff there you have probably 
spent hours and hours in creating including /etc/samba
If you change user ids, you will have to edit the ids in smbpasswd as well.
Make a backup of /root - Well, I do because the .fetchmailrc file is in 
there.
Make a backup of /var - especially if your apache web pages are there. 
Also, uncollected email is in /var/spool/mail
Any weird stuff you may have put /usr/local that you don't have/can't 
get elsewhere


As for Andy's suggestion of RAID5. Well, my experience of software RAID 
5 is that's it's great if you have reliable hardware which kinda defeats 
the object. I had a sick hard disk that kept dropping interrupts and it 
would lock the machine. Every now and then on reboot, the RAID would be 
unrecoverable. I've since switched to a hardware RAID Adaptec 2400a off 
Ebay. To be fair to Linux, the crappy HD managed to rhubarb the RAID on 
that. Replaced the HD and it's okay now (touch wood). I use a 250GB HD 
in a USB enclosure for backups with rsync. :)



More information about the gloucs mailing list