Migrating Drupal Site with the Backup and Migrate Module

Notes: (relevant to Ubuntu web server)

Use the Backup and Migrate module to backup the database.
Backup the Drupal directory: e.g.: tar -xzvf sitename.com.tar.gz
Restore the Drupal directory on the new machine: tar -cvzf sitename.com.tar.gz
Make sure the files directory is owned by the web server: chown -R www-data:www-data files
Use phpMyAdmin to create a database with same name as the source database.
Create a user with password the same as for the source database. See settings.php for the details.
In /etc/apache2/sites-enabled/000-default set the site root and change the web root to allow all.
In /etc/php5/apache2/php.ini set the memory limit to a large number (128M), upload limit and post limit to 20M.
In phpMyAdmin, open the SQL window for the new database and copy and paste the source database.

Should work now.