Migrating from 32-bit to 64-bit

March 1, 2018 487 views
Apache DigitalOcean Git Server Optimization MySQL PHP Ubuntu

I am looking at Migrating my server from 32-bit to 64-bit, what is the best way that I can do this but keep the files, directories and information that is currently on my 32-bit server?

1 Answer

I am not aware of an easy way to go from 32 to 64 bit without a manual migration. From the tags you selected it sounds like you are running a LAMP stack with this you will want to create a new 64 bit LAMP droplet from the control panel and then:

Database

  • Create your database with the same name and recreate any MySQL accounts your app is using.
  • Export your MySQL database(s) on your old server using mysqldump or phpmyadmin (if installed)
  • Import these tables on your new server

Web

  • Copy your configuration from /etc/apache2 to your new server, overwriting the defaults
  • Copy your web root (default in /var/www/html ) to your new server.
  • Ensure the ownership of the files matches on both old and new server. Use chown to change ownership on the new server if needed.

Testing

  • You can use a hosts file entry (/etc/hosts on Linux and Mac in C:\Windows\system32\drivers\etc on Windows) so that your computer will use your new IP address when you request your domain rather than checking the public DNS. This will let you browse to your site in a browser using it's domain name before you change the public records
  • Don't forget to remove the hosts file entry when you're done testing. Leaving it there can often lead to a lot of confusion if you need to troubleshoot an issue in the future.

DNS

  • Update any DNS records pointing to your old server to use your new server's IP address
Have another answer? Share your knowledge.