Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

site mirror and master-slave question

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


chris at teslagovernment

May 12, 2012, 9:04 AM

Post #1 of 7 (750 views)
Permalink
site mirror and master-slave question

I'm trying to find some further documentation or guidance (if any) on
site duplication and then master-slave replication.

The scenario is this:

We have 2 Wiki's, each in their own network. The first wiki is available
to our users now. The second one is a clone of the first which was made
a couple of months ago and hasn't been touched since. What I'd like to
do is have the clone be the slave and the first one be the master. I'm
thinking that the database would not contain the extensions, skins,
possibly photos, templates ? So I would have to push those over. The
clone or slave would only be for reading and not writing.

Can anyone give any guidance ?

thanks,
Chris

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


dgerard at gmail

May 12, 2012, 9:23 AM

Post #2 of 7 (729 views)
Permalink
Re: site mirror and master-slave question [In reply to]

On 12 May 2012 17:04, chris <chris [at] teslagovernment> wrote:

> We have 2 Wiki's, each in their own network. The first wiki is available to
> our users now.  The second one is a clone of the first which was made a
> couple of months ago and hasn't been touched since. What I'd like to do is
> have the clone be the slave and the first one be the master. I'm thinking
> that the database would not contain the extensions, skins, possibly photos,
> templates ?  So I would have to push those over.  The clone or slave would
> only be for reading and not writing.
> Can anyone give any guidance ?


I did a horrible deliberately-broken version of this. Wiki A was live,
wiki B was read-only. Every night, a cron job would export wiki A to
XML, and half an hour later another cron job would import said XML to
wiki B. I didn't copy images over, but I expect just rsyncing the
images/ folder would have worked. (If it doesn't, let me know.)


- d.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Platonides at gmail

May 13, 2012, 8:16 AM

Post #3 of 7 (727 views)
Permalink
Re: site mirror and master-slave question [In reply to]

On 12/05/12 18:23, David Gerard wrote:
> I did a horrible deliberately-broken version of this. Wiki A was live,
> wiki B was read-only. Every night, a cron job would export wiki A to
> XML, and half an hour later another cron job would import said XML to
> wiki B. I didn't copy images over, but I expect just rsyncing the
> images/ folder would have worked. (If it doesn't, let me know.)

A better approach would be to make site B database be a read-only slave
of A. Then use the nighly job to rsync --delete the folder (first time
it would have to copy everything, but then only images / math changes).


I don't think rsyncing the images would have worked with your way, since
you'd also need to importImages.php
With the database replication, the rows in the image table are already
there, so it's no problem.


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


chris at teslagovernment

May 14, 2012, 7:38 AM

Post #4 of 7 (729 views)
Permalink
Re: site mirror and master-slave question [In reply to]

I'm using mysql replication now for another application so I know what
that's about. But for rsync, not sure what you mean about --delete
the folder.
Would you suggest rsyncing the whole mediawiki folder ? And I'm not
sure what you mean about 'math changes'.


On 5/13/12 11:16 AM, Platonides wrote:
> On 12/05/12 18:23, David Gerard wrote:
>> I did a horrible deliberately-broken version of this. Wiki A was live,
>> wiki B was read-only. Every night, a cron job would export wiki A to
>> XML, and half an hour later another cron job would import said XML to
>> wiki B. I didn't copy images over, but I expect just rsyncing the
>> images/ folder would have worked. (If it doesn't, let me know.)
> A better approach would be to make site B database be a read-only slave
> of A. Then use the nighly job to rsync --delete the folder (first time
> it would have to copy everything, but then only images / math changes).
>
>
> I don't think rsyncing the images would have worked with your way, since
> you'd also need to importImages.php
> With the database replication, the rows in the image table are already
> there, so it's no problem.
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l [at] lists
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Platonides at gmail

May 16, 2012, 10:58 AM

Post #5 of 7 (710 views)
Permalink
Re: site mirror and master-slave question [In reply to]

On 14/05/12 16:38, chris wrote:
> I'm using mysql replication now for another application so I know what
> that's about. But for rsync, not sure what you mean about --delete
> the folder.
> Would you suggest rsyncing the whole mediawiki folder ? And I'm not
> sure what you mean about 'math changes'.

The --delete parameter of rsync makes it not only copy new files, but
also delete those local files which are not in the remote side.

Changes in files during normal MediaWiki operation will usually be image
uploads (deletions, thumbnailing...) and by extensions such as math
(that which powers <math> tags).




_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


jeremy at tuxmachine

May 16, 2012, 11:09 AM

Post #6 of 7 (709 views)
Permalink
Re: site mirror and master-slave question [In reply to]

On Wed, May 16, 2012 at 1:58 PM, Platonides <Platonides [at] gmail> wrote:
> On 14/05/12 16:38, chris wrote:
>> I'm using mysql replication now for another application so I know what
>> that's about.   But for rsync,  not sure what you mean about --delete
>> the folder.
>> Would you suggest rsyncing the whole mediawiki folder ?  And I'm not
>> sure what you mean about 'math changes'.
>
> The --delete parameter of rsync makes it not only copy new files, but
> also delete those local files which are not in the remote side.
>
> Changes in files during normal MediaWiki operation will usually be image
> uploads (deletions, thumbnailing...) and by extensions such as math
> (that which powers <math> tags).

s/local/destination/; s/remote/source/;

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Platonides at gmail

May 16, 2012, 2:37 PM

Post #7 of 7 (708 views)
Permalink
Re: site mirror and master-slave question [In reply to]

On 16/05/12 20:09, Jeremy Baron wrote:
> s/local/destination/; s/remote/source/;

Heh, sure :)
I think I'm too used to work with it in a single way.

Thanks


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.