John Suomi's picture


I'd like to dynamically mirror my Wordpress site to other countries.  Is it possible to use tklbam / AWS to accomplish this?  Ideally; the mirror, child sites would update after the parent site updates.  Please advise.


Jeremy Davis's picture

You could use TKLBAM to mirror one "master" WordPress instance to one or more "slave" instances. For a site that doesn't change significantly very often I suspect that might be a great way to easily do replication.

It would depend on your content and how often it changes, but I suspect that you'd want to change the default backup frequency (monthly full backup, incremental daily) to perhaps something like hourly incremental & daily full backup?

I would also suggest that you have 2 backup sets. One would be a "normal" backup - i.e. purely for the purposes of disaster recovery (probably with default; or mildly modified config). The other would be for the purposes of "sync". Your "sync" "backup" dataset could then be super slim and only includes WordPress itself (plus perhaps the the database - although possibily replication might be even better? - and perhaps Apache and PHP config, just in case you tweak them?).

Then on each of the "slaves", you'd want a regular cron job to restore the latest backup on a regular basis.

It is important to note though that this would provide a "one way mirror" only. I.e. the "master" would sync to each of the "slaves", not the other way around. Any unique content on any of the "slaves" would be lost.

That would be fine for a site that provides content generated by you (e.g. static pages, blog posts, etc). Where that approach starts to fall down is if you also support user content (e.g. comments, etc). One way to work around that would be to leverage a 3rd party hosted service (e.g. Discourse).

The other way to go would be to having a multi-master DB replication setup and perhaps some sort of 2 way file sync. TBH, I haven't really thought about how that might work, and I doubt TKLBAM would be the tool for the job in that instance (but would still provide a backup of a single server).

Hope that helps. If you press ahead with this idea, please feel free to share and/or post back with any questions and I'll do my best to help out. Regardless, I'd be super interested to hear how you go.

Add new comment