HowTo: Clone one server to another server

  • Overview

    You have a "production" Jamroom server online and you want to have an exact copy of that site on your local development machine to test and work on.

    This document covers the steps to make that happen.

    In short the steps are:
    - Install Jamroom into your local development machine where you want the clone to go.
    - Export the database from the production server as an .SQL file
    - Import the .SQL file into your local development machine
    - (optional) copy the /data folder from the server to the development
  • Install Jamroom on your Development Server

    The easiest way to go about getting in sync with the production version is to first install Jamroom on your development server so you have a working location for your production to move to.

    Doing it this way will mean that you know the file system is connected to the database system without having to do any fiddling with config files.

    Then make sure all the modules that are installed on the Production are available on the Development server.
  • Move the Database

    Next, on your Dev server (with Jamroom installed) navigate to the Developer Tools Database Admin
    ACP -> MODULES -> DEVELOPER -> DEVELOPER TOOLS -> TOOLS -> DATABASE ADMIN

    This is where we will be importing the Production Servers SQL to.
  • screenshot of the Developer Tools screen on the Dev server
  • screenshot of the database admin on the Dev server
  • We want to empty the tables to make way for the Production SQL, so check all the checkboxes of the tables that exist on your dev server and click TRUNCATE.

    This will totally wipe out your server's database. ( We'll replace it with the production version )
  • screenshot of the truncate button in the database
  • Get the Production database's SQL

    Next go to the production server and navigate to the same Database Admin section there.

    On the Production server, click on the Export button and select all the tables.
  • screenshot of the export screen in the database admin tool
  • screenshot of the SAVE dialog to save the .SQL file.
  • Save the .SQL file to a location on your PC.
  • Import the Production .SQL file to your Dev server

    Go back to the Database admin of your Dev server and click on IMPORT to import the .SQL file you just exported from the Production.

    Once that is finished your local machine will have the same database as your production server.
  • screenshot of the location to import a .SQL file
  • Reset the caches and run the Integrity Check

    You should be able to login now with the admin details from your Production server.

    Log in and Reset the Caches and run the Integrity Check. Steps on how to do that can be found on this page:

    Docs: "Something's Wrong, What do I do?"
    https://www.jamroom.net/the-jamroom-network/documentation/problems/114/somethings-wrong-what-do-i-do
  • (optional) copy the /data folder from the server to the dev

    If you also want all the media files related to the profiles to be in sync too, then download the:
    /data/media/*

    folder from the Production server and put that on your Dev server.

Share This

Tags