Jump to content

How to sync databases?


DooM
 Share

Recommended Posts

Hello guys,

I'm trying to figure out how to sync fields and templates between staging and production environments.

I've found Migrations module by Lostkobrakai, but with use of it all the fields and templates must be created by API, which is kind of uncomfortable.

I also tried ProcessDatabaseBackups module which can export only certain tables, but I don't think it's the best practice to do that.

How do you guys solve this problem? It's very annoying to setup everything three times (dev, staging, production).

Thanks a lot :)

Link to comment
Share on other sites

Yeah, coming from several applications written from scratch, with codeigniter, and to a lesser extent, wordpress, workflow with Processwire has been tough for me personally, but I am adapting.

I've sort of settled into a pattern where after having deployed the initial production application, I try to do as much non-destructive work as possible on this instance.

If something may be destructive, then I'll clone the codebase and hit the same database and work on this. If and when everything looks good, I'll just point the DNS to this instance. You can read up on multi-instancing.

The reason for the above approach is because with the app I'm working on, the DB is too big to be slinging back and forth to a development machine.

Having said all this, while I'm working on production and staging instances, I've also got a half dozen R&D instances on my dev machine than are pretty darn close in structure to production.

This all probably sounds nebulous and I hope it helps. And I would certainly keep search-engine'ing things like "processwire development staging production"

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...