4.5 - Move Database

Move data from your web server to your at-con server

This step helps you import data from a previous installation into your server. If you are not importing an already existing database from a previous/other installation, please skip this step.

After your pre-registration ends and before your at-convention registration begins, you will need to prepare the at-convention server with the data from your web server. Follow the steps to install and configure a new server, then continue here.

  1. Export the event data from the webserver. (Requires an account with the "admin_sys_admin" or "System_installer" permission.)
    1. Log in to the Convention Master console on your web server.
    2. Go to the Admin - Install tab and select Export Database File.
    3. Check "Set Events Read-Only". (This will prevent any changes to the database.)
    4. Create and write down a password and enter it into the password fields. (This will encrypt the database export with the password)
    5. Comments are optional, and will be included as a textfile with your export. It is not a good idea to put anything sensitive like passwords in the comments section.
    6. Click submit and let it work. This may take a few minutes if you have a large database. Please do not click Stop, Back, or Refresh during this process.
    7. Please leave this page open once it finishes.
  2. Download the export to your at-convention server.
    1. Log into your at-convention server.
    2. Type the following commands to download the export to the current directory you are in: (replace the text inside the brackets with the correct url, do not include the brackets
      cd $HOME
      wget [https://yourwebsite.convention.master/url]/logs/convention_master.tar
    3. Now unzip the file:
       tar -xf convention_master.tar 
    4. Run the following command and enter the same password used when using the export tool in step 1.
       sudo ./unpack.php 


  3. Now drop (delete) and re-create the database you created on your at-con server when doing the setup script earlier. Do this by logging into the mysql command line and perform the following commands, or use a graphical tool like phpMyAdmin to get the same results.
    1. mysql –uroot –p
    2. Enter your password for user root
    3. Your console should now show  
    4. Re-create the database: (replace convention_master with your database name) Do not include Mysql>
      Mysql> drop database convention_master;
    5. Re-create the database: (replace convention_master with your database name) Do not include Mysql>
      Mysql> create database convention_master;
    6. Quit MySQL: Do not include Mysql>
      Mysql> quit;
  4. Import the mysqldump data into your database.
    1. Use this mysql command to import the data. (replace database_name accordingly)
      mysql -uroot -p database_name < cm_dump.sql

      Parts in bold may be different, ie you created another MySQL user or manually changed the database name.

    2. If the import does not work properly you may need to edit your sql file (with joe or your preferred editor) and enter the following:
      1. On the first line add:
      2. On the last line add: