This article is about a previous version of EasyStaging and is out of date, the current version is 1.1.1
Each Plan has several basic attributes including:
- Published States
Ideally a Plan should have a name indicative of it's purpose. In our examples we have two Plans, the first is called "Publish Site" which copies the entire staging site ( files and database tables ) to the live site location. The "Publish Articles" Plan by comparison only copies the contents of the /images directory ( Joomla!'s default location for storing user generated content such as PDF, photo's etc ) and the required tables from database, rather than all of the tables.
The description is primarily used to provide a quick explanation of the Plan's function to users viewing the list of Plans in the EasyStaging Manager.
A Plan can be either Published or Unpublished. In addition you can also specify "Publish Up" and "Publish Down" dates to set a time span during which the Plan can be used.
To complete a Plan prior to running it you must configure the details and settings in the "Local Site Details", "Remote Site Details" and the "Table Settings" tabs. When you initally create a new Plan the first tab you see will be that "Status" tab as shown below.
Each of these tabs are discussed below including a description of each field or setting available to configure the Plan.
Once the details of the have been configured to your requirements you can "Save" it ready for use.
The "Status" tab contains the Plan controls and the details of the last time the it was run.
The process of running a Plan is covered in the article "What is a Plan? And How do I run one?"
The "Local Site Details" tab contains the details to be used as the source or local site from which files and database tables are copied. The initial values that appear in this AB are copied from the Joomla! configuration file of the staging site and may only need minor tweaking.
The "Site Name" and "Site URL" fields are used in the feedback and logging process to help make it clear to you what each stage is doing.
The "Directory to Sync" is the path to the source directory that will be used the rsync command for the copying of files from the local or "Staging" site to the remote/Live site. In the example shown in the screen capture the path is to the root directory of the website.
The "Table Prefix" is used to process the names of the tables in the database and convert them to the correct name on the remote server. This allows a different prefix to be used on the staging and live sites.
The "Rsync Options" field should probably be left as the default values unless you are very confident in your understanding of rsync options.
The "File Exclusions" field allows you to set patterns that will be excluded from and rsync operation. EasyStaging will not copy itself, log/ ,cache/ , tmp/ or any .htaccess or Joomla!'s configuration.php file.
To be precise the content of the "File Exclusions" field is appended to these predefined exclusions:
The "Remote Site Details" contains the details to be used for the live site (the destination we are copying files and database tables to).
As you can see in the screen shot below the Remote Site Details that are required.
The value in the "Directory to Sync" field can be any valid rsync directory. This will be used as the destination directory for the rsync process used by this Plan.
The Database Name, User and Password fields are used in conjunction with the "Database Host" field to remotely access the "Live" websites database. The remote database must also be setup to allow remote connections from the IP Address of the "Staging" site that the EasyStaging component is running on.
The "Table Prefix" field is used to convert the names of the local database tables to the correct naming convention for the live site. When used with the "Table Prefix" field from the "Local Site Details" tab EasyStaging can easily swap the prefix out for test and creation of the export SQL.
The "Table Settings" tab contains details of each of the tables in the Database and how they will be treated when a plan is run. The "Action" that is take on a table can be one of three available.
This table will not be copied and is skipped completely when building the SQL exports for the "Live" database.
Copy To Live
This table will be copied and is included when building the SQL exports for the "Live" database.
Copy To Live, Only if not found.
This table will only be copied if it doesn't exist on the remote server, if EasyStaging finds a table with the same then it is skipped completely when building the SQL exports for the "Live" database. If the table doesn't exist on the remote/live server then it will be included when building the SQL exports for the "Live" database.
This last option is useful for table like Joomla!'s #_session table. Joomla! needs this table to work but the records in it relate to the user session on the actual site. To copy the session data from the staging site to the live site could potentially delete a users sessions and result in site issue for the end user. When you initially create a Plan the #_session table is automatically set to "Copy To Live, Only if not found" to prevent this very issue.