Hi, I'm looking to move Drupal from one server to another, but reduce downtime due to DNS transfer. Here's my thought on doing just that:

  1. Transfer web files to new server
  2. Put old website into maintenance mode
  3. Transfer database to new server
  4. Take new server out of maintenance mode
  5. Transfer DNS
  6. Point old web files to new database using IP of new database, for those accessing existing DNS from cache

Would this work theoretically? In practice this wouldn't result in a down time of more than 10 minutes or so?

Also, due to the nature of the website (user generated content), by pointing the old server to the new server's database, this would ensure newly generated content from those accessing old server will write data to the new database.

Just looking for some confirmation on whether this would work before I initiate the transfer.

Thanks!

Comments

yaoNyou’s picture

I am not sure which I can help, I read an artical before say that the best transfer dupal site steps are:

1, use backup and restore module to back up database;

2, make the public_html folder's content in a tar ball, not the public_html folder itself and make usre you carry two hided files;

3, transfer the tar ball to the new server and unpack to the same locaton as before;

4, delete the setting.php and make a new one from the defualt_settings.php; and put install.php in the folder as fresh install and run the installation again;

5, use the backup module to restore the database to new server;

I personally did not do this way, and also am failure to transfer my local setup to a live site.

yaoNyou’s picture

I am sorry, this does NOT work at all. even you put the install files in the folder. and I tried to reinstall drupal and only keep the site folder and replace setting files, and did get reinstallation successfuly, but fail on migrate data.

here are errors I got:

Notice: Undefined index: files in theme_backup_migrate_file_list() (line 954 of /var/www/html/sites/all/modules/backup_migrate/backup_migrate.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'temporary://yaoNyou-2015-01-27T07-01-07.mysql_0.gz' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => yaoNyou-2015-01-27T07-01-07.mysql.gz [:db_insert_placeholder_2] => temporary://yaoNyou-2015-01-27T07-01-07.mysql_0.gz [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 999379 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 1422419862 ) in drupal_write_record() (line 7239 of /var/www/html/includes/common.inc).

Warning message

mukeshkarmarkar’s picture

Read this article.. www(dot)grasmash(dot)com/article/migrating-drupal-site-between-servers-drush. May this will help you. Good Luck..

yaoNyou’s picture

Thank you, but I do not want to figure out how to install drush on godaddy, especially now, my net connection is very unstable.

Anil Reddy Vallur’s picture

Solution:
I have changed the file upload size from 2 M to 200 M in my php.ini file and .htacces file(If you have one for your application). My .sql file was 12 MB.

Other test cases:
I tried upgrading BackUp and Migrate module to 7.x-3.x but that didn't work.
I tried adding the patch mentioned here https://www.drupal.org/files/issues/undefined_index-2278865-5.patch which also didn't work.