WebFaction
Community site: login faq

I need to keep a local clone of a MySQL database, which is hosted on a WebFaction shared plan. I'm using Django, so I suppose comparing Django's admin history tables (local vs. remote) would be enough to spot and then merge any offline changes (or resolve any resulting conflicts). My first priority, though, is to have at least a read-only local copy of all my data.

Considering WebFaction's hosting plan and ignoring my specific project, is MySQL master-slave replication at all an option? If not (or if this kind solution is a bad fit for my case), are there any other feasible options for me to keep a (possibly read-only) local clone of my database?

Thanks in advance!

asked 13 Apr '12, 13:40

Marcos Cavalca
312
accept rate: 0%


MySQL master/slave is not an option for our shared server. You may build your own MySQL server from source code within your home directory to do this.

I personally suggest you just use the django 'dumpdata' and 'loaddata' commands to do this as they are more versatile and not as dependent on custom MySQL builds/versions, where as a direct dump would be.

permanent link

answered 13 Apr '12, 17:12

johns
5.3k312
accept rate: 23%

edited 13 Apr '12, 17:14

Thanks @johns! I'll talk to my client, but I'll probably stick with daily dump downloads.

Just to be sure: DBMS-level replication is the only reliable method to implement incremental sync, right?

(13 Apr '12, 19:21) Marcos Cavalca

As far as I know, yes. Django's built in mechanics do not do incremental diffs by default. However dumpdata and loaddata write the data in JSON, so it should be easy to write a script that ran dumpdata, and could diff that against a later dumpdata to produce an incremental value.

(13 Apr '12, 19:35) johns

I understand I am replying to an year-old thread. But with (recently introduced) private mysql instances, it should be possible to setup master-slave configuration. Isn't it ?

permanent link

answered 02 May '13, 03:40

Mandar Vaze
1313
accept rate: 0%

Hello,

Yes, it is possible. You have complete control over the MySQL instance, so you can follow the instructions at

http://dev.mysql.com/doc/refman/5.5/en/replication-howto.html

to set up a master-slave configuration.

IMPORTANT: You will need to contact us first, to have us enable remote access to your MySQL instances.

Sincerely,

Valentin I.
WebFaction Support

WebFaction - Smarter web hosting
http://webfaction.com
http://twitter.com/webfaction - http://facebook.com/webfaction

(02 May '13, 07:42) valentini

Hi, I have another question on this old topic: Is it possible to setup master-slave replication with ssl? Could I setup a slave db on webfaction shared host for a remote master db which is actually MariaDB?

permanent link

answered 28 May '14, 09:23

banditha
1
accept rate: 0%

Sure, if you're running your own private MySQL server instance on our system, you can configure it however you'd like.

(28 May '14, 19:44) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×168
×36
×1
×1

question asked: 13 Apr '12, 13:40

question was seen: 4,421 times

last updated: 28 May '14, 19:44

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM