Find the answer to your Linux question:
Results 1 to 7 of 7
Hi all, I'm prepared setting up a mirror site of the Live site hosted on Godaddy. The local server is running Linux OS and LAMP. I'm now searching for instruction/steps ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778

    Searching instruction to set up mirror site


    Hi all,

    I'm prepared setting up a mirror site of the Live site hosted on Godaddy. The local server is running Linux OS and LAMP. I'm now searching for instruction/steps on its setup and found follows;

    How to create a mirror/test wordpress site through godaddy using a subdomain
    how to create a mirror/test wordpress site through godaddy using a subdomain - the fussy britches

    How to Set Up a Mirror WordPress Site
    How to Set Up a Mirror WordPress Site | eHow
    This link is quite insterested to me but only theory stated.

    How to transfer or mirror your Joomla! / Wordpress / Drupal website from one server to another in one click
    How to transfer or mirror your Joomla! / Wordpress / Drupal website from one server to another in one click - Simon Tushev Website

    MacOS X Local Mirror
    MacOS X Local Mirror WordPress Codex

    WP-MIRROR
    WP-MIRROR - Free Software Foundation


    Did I miss any articles? Thanks

    satimis

  2. #2
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    902
    I've had to do this a lot at my last job, but it was Drupal site not Wordpress, but basically the same. You have a LAMP server built so that's done. Now backup your MySQL database use mysqldump for that, lots of articles on that if you need them. Then you import the wordpress database to your mirror site's mysql. Then Wordpress like Drupal base directory is the document root you set in Apache like /var/www so what you want to do is clone/copy everything from the docuemntroot on down. That you can do a few different ways you could just create a tarball of your documentroot directory and all the subdirectories. Just use tar and you'll have the whole site and keep the tarball it creates as a backup file. Another way would be to use rsync to copy all the files over to your mirror site. Then later you can use rsync to keep the mirror in sync with the main site. There are other ways like using version control so its up to you.

    That one article you listed has script to do this with rsync I would say study those scripts the answers are all there.

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by docbop View Post
    I've had to do this a lot at my last job, but it was Drupal site not Wordpress, but basically the same. You have a LAMP server built so that's done. Now backup your MySQL database use mysqldump for that, lots of articles on that if you need them. Then you import the wordpress database to your mirror site's mysql. Then Wordpress like Drupal base directory is the document root you set in Apache like /var/www so what you want to do is clone/copy everything from the docuemntroot on down. That you can do a few different ways you could just create a tarball of your documentroot directory and all the subdirectories. Just use tar and you'll have the whole site and keep the tarball it creates as a backup file. Another way would be to use rsync to copy all the files over to your mirror site. Then later you can use rsync to keep the mirror in sync with the main site. There are other ways like using version control so its up to you.
    Hi,

    Thanks for your advice.

    I have no problem cloning/copy the Live site (WP) on Godaddy to local server. The local site works almost exactly as the Live site. But I have no idea to mirror the Live site so that visitors browsing the Live site and comments imposed will have a copy on the local site.

    Besides I expect to test following setup.;
    Whenever my local site is running visitors will connect it NOT the Live site. If the local site is down visitors will browse the Live site.

    Any idea? Pointer will be appreciated. TIA

    That one article you listed has script to do this with rsync I would say study those scripts the answers are all there.
    Whether you meant following article?;
    How to transfer or mirror your Joomla! / Wordpress / Drupal website from one server to another in one click

    Rgds
    satimis

  4. #4
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    902
    Your mirror is really another live site, its not a staging or backup site??? That could get messy since you would have sync in both directions and that isn't even updating the databases. For that you're going to need to get some database replication going and replications between different physical locations is a lot of work.

    How I've did it on my last gig was using GIT version control to keep my code insync between production, development, testing and staging. GIT is good at keep local and remote sites on same codebase. Then database replications for the production web farm, and scripts to do datbase dump daily and update all non-producition sites, then more scripts to dump and update if required during the day. It requred a lots of scripts and time to get all that working. But GIT, rsync, and mysqldump were main tools that drove everything.

    I would say from what you descibed I would designate one server to be your production site and other a hot spare in case of emergency. Then use a load balancer service to redirect web traffic in an emergency, that's faster than updating DNS.

    Stuff like this planning and designing is where you need to spend the most time. With a good plan implementation will be a lot easier.

  5. #5
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by docbop View Post
    Your mirror is really another live site, its not a staging or backup site??? - snip -
    It is NOT difficult turning my backup site as Live. I'm subscribing static IP (fixed IP) with 6M up/down.

    I suppose mirroring is similar to load balancing which I did more than 10 year ago? Unfortunately I couldn't touch Godaddy server because I'm only subscribing share hosting. I have no idea where to start. Therefore I'm googling around for advice/instruction/steps about its setup. How to link both sites?

    satimis

  6. #6
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,048
    Mirroring isn't load balancing- it's just mirroring. It simply means you've made a copy of a website at another address. Mirrors drift in and out of sync. Load balancing requires a layer of software before the mirrored sites to distribute traffic. If the data isn't static it also requires software support to keep the non-static data synchronized. Here's a link to a page on mysql replication: MySQL :: MySQL 5.0 Reference Manual :: 16 Replication .

  7. #7
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    902
    Quote Originally Posted by satimis View Post
    It is NOT difficult turning my backup site as Live. I'm subscribing static IP (fixed IP) with 6M up/down.

    I suppose mirroring is similar to load balancing which I did more than 10 year ago? Unfortunately I couldn't touch Godaddy server because I'm only subscribing share hosting. I have no idea where to start. Therefore I'm googling around for advice/instruction/steps about its setup. How to link both sites?

    satimis
    What I was getting at is using a load balancing service, but pointing all the load to the primary server. Then in emergency, maintenance, testing, we could quickly log on and switch all the traffic to mirror site. Sure this could be done with changing DNS, but then the lag time on DNS propagation. Also having a load balancing service it was the public facing IP so we could make IP changes to our servers easily again without delays in DNS propagation. So used a load balancer but not traditional load balancing, later on as server farm grew we used balancer in traditonal way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •