Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
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 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
    
Thank you Marco for giving your valuable time. –  Subhransu Sep 7 '12 at 8:52
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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