User Tools

Site Tools


tutorials:server:migration:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:server:migration:start [2012/10/12 22:56]
jonyo [Moving Installation Directories]
tutorials:server:migration:start [2014/09/25 16:55] (current)
Line 1: Line 1:
-====== Installation Migration - Change Folder or Directory  ======+====== Installation Migration ======
  
 With all of our auction and classified software products you can move the complete installation from one directory on the same domain to another directory rather easily.  There are a few things that will need to be updated when you change the directory, which are listed below in each of the steps. With all of our auction and classified software products you can move the complete installation from one directory on the same domain to another directory rather easily.  There are a few things that will need to be updated when you change the directory, which are listed below in each of the steps.
  
-These instructions can be used for the following situations:+This tutorial actually covers a variety of different situations:
  
-  * Move installation to a new server, if you need to change hosts or just change servers but stay at the same host. +  * Server Migration (meaning copying from one server to another) : Follow **all steps** 
-  * Move installation to different folder on the same server+  * Move installation to different folder on the same server : **Skip step 2** 
-  * Change the folder name of the installation. < +  * Create test installation : Follow **all steps**, see note below. < 
-  * Copy installation for development/testing/staging purposes only.  (see note below) <+  * Domain change only((Files do not move to a new location, and database is not moving.)) : Use the reduced steps in the tutorial for [[tutorials:server:changing_domains:start]]((Note that the linked tutorial is actually this tutorial, with only step 3, step 4, step 5, and step 7.)) <
  
-<tip c n>**Note for Test Installations:**  This tutorial will also work when creating a duplicate installation for **development****staging**, or **testing** purposes. Note though that you are creating **two separate and autonomous installations** when you do so. This means two separate file locations and two separate databases. Each file set connecting to it's own database. This is irrespective of whether the test installation is on a different server, the same server and/or the same domain than the live installation. Each is a standalone copy of the other installation when finished. Just note **NOT** to delete the original installation if you are just creating the copy for development/testing/staging purposes.+If you aren't sure which instructions to follow for your situation, when in doubt ask support!  Support can tell you exactly which instructions you should be using for your situation.
  
-If you choose to create an exact copy of your live installation in your testing location make sure to disable all notification emails sent by the system to your clients or they could be getting duplicate expiration notifications for anything expiring in the testing installation the same time it is expiring in the live installation. You can disable all of those within the following admin tool:+**NOTE:**  We provide these steps to allow you to perform the migration (moving the software to be installed in a different location) yourself.  However if you would prefer us to make the move for you, we do offer [[http://geodesicsolutions.com/support/installation-migration-services/81-server-migration.html|professional server migration service]] which you can purchase from the client area.
  
-EMAIL SETUP NOTIFICATION EMAIL SETTINGS</tip>+<tip c n>**Note for Test Installations:**  This tutorial will also work when creating a duplicate installation for **development**, **staging**, or **testing** purposes. Note though that you are creating **two separate and autonomous installations** when you do so. This means two separate file locations and two separate databases. Each file set connecting to it's own database. This is irrespective of whether the test installation is on a different server, the same server and/or the same domain than the live installation. Each is a standalone copy of the other installation when finished. Just note **NOT** to delete the original installation if you are just creating the copy for development/testing/staging purposes.</tip>
 ===== Step 0 - Preparation ===== ===== Step 0 - Preparation =====
  
Line 27: Line 27:
 <tip c n>**Note:**  In this step, whenever it says FTP or FTP software, you can alternatively use SFTP if your host supports this, the instructions are exactly the same whether you use FTP or SFTP.  If your host supports it, we recommend SFTP as that is more secure.</tip> <tip c n>**Note:**  In this step, whenever it says FTP or FTP software, you can alternatively use SFTP if your host supports this, the instructions are exactly the same whether you use FTP or SFTP.  If your host supports it, we recommend SFTP as that is more secure.</tip>
  
-This is the main step, moving the files from one directory to another.  There are 3 different ways to accomplish this listed below, just choose the option that best fits your situation listed below:+This is the main step, moving the files from one directory to another.  There are 3 different ways to accomplish this, 2 listed below, just choose the option that best fits your situation
 + 
 +Option 1 is only if the folder is simply being re-named. 
 + 
 +Option 2 is standard option for moving files from one place to another, using FTP. 
 + 
 +Option 3 (located on it's own page) uses SSH to zip then SCP the files from one server to the other.  This option is **only for advanced users** that are **comfortable with using SSH**.  This option is much faster and more reliable, but also more complicated, and only works if the servers involved support SSH.  If you fall into that group, see the magical SSH option at [[tutorials:server:migration:ssh_method]].
  
 ==== Option 1: Folder Rename, on Same Server ==== ==== Option 1: Folder Rename, on Same Server ====
Line 46: Line 52:
  
 And finally, you will need to delete all the files in the **templates_c/** folder, as there are times when moving the folder can cause those files to need to be re-generated.  Keep the folder, but delete the contents of the folder. And finally, you will need to delete all the files in the **templates_c/** folder, as there are times when moving the folder can cause those files to need to be re-generated.  Keep the folder, but delete the contents of the folder.
 +
 +<tip c n>**Tip:** If, after your site has moved from one location to another, you see a "SmartyException" error, it typically means this last step above was skipped. In that case, deleting all files in the templates_c folder will usually clear the error.</tip>
  
 Once that is complete, continue to the next step [[#Step 2 - Create Database]] Once that is complete, continue to the next step [[#Step 2 - Create Database]]
-==== Advance Option: Use SSH / SCP / ZIP to Transfer Files ==== 
- 
-<tip c w>**Warning:**  This option is only for advanced users that are **familiar with SSH** and have **SSH access** on both the "from" and "to" locations, and ability to use SCP to directly transfer a file from one location to the other.  This also means that both locations must be on Linux based servers, since SSH is not available for Windows servers.  If you are not sure how to use SSH we recommend to use the option [[#Option 2: Use FTP to move from one folder or server to another]] instead.</tip> 
- 
-Only use this method if you are **comfortable with using SSH and the command line**, and you have SSH access for both the "from" location and the "to" location.  Otherwise stick to the standard FTP instructions mentioned in [[#Option 2: Use FTP to move from one folder or server to another]]. 
- 
-This is accomplishing the same "end result" as the [[#Option 2: Use FTP to move from one folder or server to another]] option, you will be copying the files from one location to the other, but "how they get there" is much different((And if you enjoy this sort of thing, much more fun as well!)).  However if you are able to use SSH on the from and to locations, this option is much faster and more reliable since you only transfer a single large zipped file directly from one location to the other, instead of downloading and uploading the files one by one using FTP. 
- 
-This is the overall steps you will be following: First, SSH into the "from" location, zip up the entire contents of the folder that the software is installed in.  Then while in the "from" location still, use SCP to transfer the zipped file to the other location.  Then SSH to the "to" location, move the zip file to the folder that the files should be installed in, and unzip. 
- 
-Here are the **individual steps:** 
- 
-  - SSH to the "from" location, and use CD to change to the base directory that the software is in.  This should be the same folder that has the config.php file for the software, which you can check for using ls.  For example, if the Geo software was installed in **public_html/classifieds/**((Just an example!  Your files may be somewhere different!)), you might use: 
-<code bash>cd public_html/classifieds/</code> < 
-  - Zip up entire contents and all sub-folders recursively, using the following command: <code bash>tar -zcvf geodesic_files.tar.gz .</code> < 
-  - Transfer the new geodesic_files.tar.gz file to the new location using SCP: <code bash>scp geodesic_files.tar.gz [email protected]:/home/username/public_html/</code> 
-Change **username** to the SSH username for the "to" location, change **example.com** to the "to" server domain, and change **/home/username/public_html/** to the absolute folder that the software needs to be copied to.  When you do that, it will prompt for the password, just enter the SSH password for the "to" location that goes along with the **username** you used. < 
-  - SSH to the "to" location, using: <code bash>ssh [email protected]</code>Change **username** to the SSH username for the "to" location, change **example.com** to the "to" domain name.  You will be prompted for the password, same as before enter the password that goes to the "to username" you used. < 
-  - Use **cd** to change to the directory that you will be putting the software in, this should be the same folder as you used 2 steps up when you SCP the zip file over.  For example if you are placing it in **/home/username/public_html/** on the "to" location, use: <code bash>cd /home/username/public_html/</code> < 
-  - Make sure the **geodesic_files.tar.gz** file exists in the folder.  If not you may have transferred it to the wrong folder, in which case figure out where you copied it to, and copy it into the correct folder or re-transfer the file using SCP.  Then unzip the file using<code bash>tar -zxvf geodesic_files.tar.gz</code>< 
-  - Delete the contents of templates_c folder, using <code bash>rm -Rf templates_c/*</code> < 
-  - You may wish to use FTP to download a copy of the **geodesic_files.tar.gz** file for backup purposes.  Once you have downloaded a copy, be sure to **delete the file** from **both locations** using FTP (or SSH), as it could be a security risk to keep it somewhere that can be downloaded from the web. < 
-  - That's it!  Continue on to the next step [[#Step 2 - Create Database]]  < 
  
 ===== Step 2 - Create Database ===== ===== Step 2 - Create Database =====
Line 108: Line 93:
   * **[[admin_menu/listing_setup/file_upload_display_settings/start#Server Path to Root of Photos Directory|Listing Setup > File Upload & Display Settings > Server Path to Root of Photos Directory]]**   * **[[admin_menu/listing_setup/file_upload_display_settings/start#Server Path to Root of Photos Directory|Listing Setup > File Upload & Display Settings > Server Path to Root of Photos Directory]]**
  
 +Then in [[admin_menu:e_mail_setup:general_e_mail_settings:start|Email Setup > General Settings]] you may need to adjust the e-mail settings to make e-mails work on the new location.  This is mainly a concern if changing servers, but it is still a good idea regardless, to send a test e-mail to yourself to make sure e-mail is working.
 +
 +**Test installations Only:**  In the admin at [[admin_menu:e_mail_setup:notification_e_mail_settings:start|Email Setup > Notification E-mail Settings]], turn off all notifications!  Otherwise your test installation may send out e-mail notices to your "real" users since the test installation is based on copy of the live installation database.  If you run auctions, you may also want to disable the addon **Main E-mail Sender** and that will disable the ability for the test installation from sending any e-mails (since auctions will send notifications beyond what you can disable normally).
 ===== Step 5 - Update Links in Templates & Text ===== ===== Step 5 - Update Links in Templates & Text =====
  
Line 137: Line 125:
  
 If it says 0 rows affected, check to make sure you have set both values correctly. If it says 0 rows affected, check to make sure you have set both values correctly.
 +
 +<tip c n>**Test Installation Tip:**  If you created a copy of your site for "testing" purposes, and did **not** follow this step when you originally created your test installation, the test installation may be deleting images from your live website before they should be deleted, even if the "live" version of the listing has not expired yet!
 +
 +If this happened for your site:  First, follow this step for your test installation to keep it from happening in the future.  Second, copy all of the images from your test installation **user_images/** folder, to your live installation **user_images/** folder, and you can **skip images that already exist**.  This will restore any images that were deleted by not following this step to begin with!  Then in the live installation, you can use the tool to remove orphaned images to get rid of images that do actually need to be moved.  If that tool is not able to remove the images, you may need to CHMOD 777 all files in the user_images folder on your live site so that the software can delete them.</tip>
 ===== Step 7 - SEO Addon ===== ===== Step 7 - SEO Addon =====
  
Line 150: Line 142:
  
 If you elected to turn your site off during the move, don't forget to **turn your site back "on"**!  You can do so at **[[admin_menu/site_setup/general_settings/start#Site On/Off Switch|Site Setup > General Settings#Site On/Off Switch]]**. If you elected to turn your site off during the move, don't forget to **turn your site back "on"**!  You can do so at **[[admin_menu/site_setup/general_settings/start#Site On/Off Switch|Site Setup > General Settings#Site On/Off Switch]]**.
 +
 +**Test Installations:**  If you are creating a test installation, we also recommend to turn all e-mail notifications off in the admin at **E-mail Setup > Notification E-Mail Settings**, that way it does not generate e-mails to users resulting in duplicate e-mails sent since the main installation would also be sending it's own notices.  Make sure you do not turn the notices on in the future, as that will generate "past notices" to be sent in certain cases.
tutorials/server/migration/start.1350082577.txt.gz · Last modified: 2014/09/25 16:55 (external edit)