wiki:Drupal HowTo Copy site to test server

Version 6 (modified by Richard Bramley, 8 years ago) ( diff )

--

Drupal HowTo Copy site to test server

Tags: Drupal HowTo

Process

  1. Run the Full backup script to produce a file called something like sitebackup-YYYY-MM-DD.tgz
  2. scp the tar file to the new server
  3. tar -zxvf sitebackup-YYYY-MM-DD.tgz, which will produce 2 files called dbcontent.sql and filecontent.tar
  4. Create a directory for the web folder mkdir /local/www/{site name}
  5. Copy filecontent.tar into the web folder
  6. Cd into the web folder and unpack the tar file tar -xvf filecontent.tar
  7. Log into MySql
  8. Create the database using CREATE DATABASE {databasename} CHARACTER SET utf8 COLLATE utf8_general_ci;
  9. Grant the user permissions to the database using GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON {databasename}.* TO '{username}'@'localhost' IDENTIFIED BY '{password}';
  10. Restore the contents to the database using mysql -u {username} -p {database} < dbcontent.sql
  11. Make any necessary changes to the Apache config
  12. Restart Apache

Error: Macro BackLinks(None) failed
'Environment' object has no attribute 'get_db_cnx'

Note: See TracWiki for help on using the wiki.