1

I am current in the process of migrating my website(big and complex with mysql backend) from debian server to ubuntu server. The kernel of debian and ubuntu are different. I have some concerned questions :

  1. Is it possible to migrate database and website (with etc and home folder) from one server to another if the kernel version is different?

  2. My understanding is it may cause error, because the kernel architecture are different which may cause some dependency error. Does my understanding is wrong?

  • Why do you migrate from a stable operating system to one that is derived from the unstable-tree? – Nils Sep 7 '12 at 20:15
3

Do not copy the binary database files. Instead do a dump and restore the dump. That's the most portable way.

Dump:

mysqldump -u [username] -p [password] [databasename] > backupfile.sql

Restore:

mysql -u [username] -p [password] [database_to_restore] < backupfile.sql

More detailled information can be found here: Backup and Restore MySQL Database Using mysqldump

The kernel versions don't matter. What matters are the versions of the programs installed on both systems, e.g. MySQL, PHP, etc. Using different version might cause incompatibilities.

  • Thank you Marco, is the mysqldump will pull down the database without causing any harm to exist database right. Its like coping and compress it into a single sql file right? – Subhransu Mishra Sep 7 '12 at 8:35
  • Correct. Note that the sql file easily gets HUGE. You should consider piping through gzip: mysqldump … | gzip > backupfile.sql.gz and gunzip < backupfile.sql.gz | mysql …. – Marco Sep 7 '12 at 8:45
1

mySQL should not be that problematic - see Marco's response.

If you have got a DB-backend you most propably also have a programming language in between - possibly PHP?

You should use a compatible version there and watch its error-logs closely.

Web-server, programming-language and database do not care much about the kernel - they should simply work using the kernel-services.

Main difference in Ubuntu is that is has more beta-kernel-drivers for nifty new devices built in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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