Mirror a Composr site on a different server

Post

Posted
Rating:
#4979 (In Topic #1111)
Avatar
Standard member
ironfeather is in the usergroup ‘Well-settled’

ideas on how to make this happen

Hello,

I am thinking of creating a "mirror" of my website onto a different server mainly as a backup but also incase of earthquake problems of Japan.

Mirror website - Wikipedia

There is no noted system or method it seems.

Has anyone done this? Suggestions? Ideas?

My goal is to mirror my composr website to a remote server.

 

———–
Publisher of IronFeather Journal since 1987.  Host of KGNU Colorado Radio for 20 years. 
Currently in Japan & decided to focus on Composr as my number one CMS.
Composr site for community of Hokkaido:  Nandalow
Composr site for my freelance work: "Partners in Progress" - Future Code Japan
My Compsr edits : 
http://ironfeather.com/bbs/viewtopic.php?f=12&t=2862

 
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Chris Graham)
#4982
Avatar
Site staff
enelson is in the usergroup ‘Super-moderators’
I did a quick search and found this: Mirror Your Web Site With rsync

I have not read through it though, but I hope it helps, in someway.
Online now: No Back to the top

Post

Posted
Rating:
#4984
Avatar
Standard member
ironfeather is in the usergroup ‘Well-settled’
wow very nice, thank you! This looks perfect. I will give it a go and report back later.

 

———–
Publisher of IronFeather Journal since 1987.  Host of KGNU Colorado Radio for 20 years. 
Currently in Japan & decided to focus on Composr as my number one CMS.
Composr site for community of Hokkaido:  Nandalow
Composr site for my freelance work: "Partners in Progress" - Future Code Japan
My Compsr edits : 
http://ironfeather.com/bbs/viewtopic.php?f=12&t=2862

 
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#5789
Avatar
Standard member
ironfeather is in the usergroup ‘Well-settled’
update:

i have this working now using the "rsync", so it copies everything over but NOT the _config.php as it needs to have the proper base URL and not the cache folders. I then copy over the database as well.

I realized my mirror site was automatically using the full mirror URL (mirror.example.com)  as the canonical link so I used this as a fix:

in your main site header template change the canonical link to:

<link rel="canonical" href="{$REPLACE,//mirror.,//,{$CANONICAL_URL*}}" />

so on the main site it does not find the subdomain "mirror" so all is good, but on the mirror site, it strips out the subdomain "mirror"

now hopefully search engines will realize my main site is my HQ and the mirror is not.
 

———–
Publisher of IronFeather Journal since 1987.  Host of KGNU Colorado Radio for 20 years. 
Currently in Japan & decided to focus on Composr as my number one CMS.
Composr site for community of Hokkaido:  Nandalow
Composr site for my freelance work: "Partners in Progress" - Future Code Japan
My Compsr edits : 
http://ironfeather.com/bbs/viewtopic.php?f=12&amp;t=2862

 
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#5798
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
That's cool.

As a note, usually during development I'll write code in _config.php to put out different settings based on hostname, like:

Code

switch (gethostname()) {
   case 'some-host':
      break;

   case 'some-other-host':
      break;
}


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Vaiva, John Connor, deepu_ms, Philip, Manu, Salman, MVLipwig, Paul D, ManojSree, mytracker

Forum statistics:
  • 1,062 topics, 5,122 posts, 5,962 members
  • Our newest member is esparkbiz
Birthdays:
Back to Top