Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database sync or migration tool [closed]

It is really a pain keeping production and development databases in sync manually.

Is there any tool that allows one to keep the two databases in sync? Something like the amazing Laravel framework's migrations thing?

I am using MySQL and PHP. I searched here and there but wasn't able to spot the right tool for the job.

like image 252
Dev01 Avatar asked Dec 08 '12 06:12

Dev01


People also ask

How long does a database migration take?

Depending on volumes of data and differences between source and target locations, migration can take from some 30 minutes to months and even years. The complexity of the project and the cost of downtime will define how exactly to unwrap the process.

Which tool is used for data migration?

ETL (Extract, Transform, Load). The basic difference between these is that data integration is a permanent part of a company's system architecture. It remains and facilitates data flows between various sources. On the other hand, an ETL tool will generally be used for a single migration.

What are the 3 main DB migration strategies?

There are three main approaches to database migration: big bang data migration, trickle data migration, and zero downtime migration.

Which of the following is an open source database migration tool?

Flyway is an open-source database migration tool allowing users to transfer data with its command-line client, which happens to be an API.


3 Answers

Check out Schematic, It's designed to work with schema files in YAML or JSON, and it can be installed globally:

http://andrefigueira.github.io/Schematic/

And it's designed to be committed with your VCS so your database versions are stored with your project commits.

like image 28
André Figueira Avatar answered Oct 19 '22 06:10

André Figueira


You should definitely have a look at phinx. Here's an example of a complex database migration step I performed using MySQL and PHP: https://coderwall.com/p/v3qg2q

like image 165
aimfeld Avatar answered Oct 19 '22 07:10

aimfeld


If I am not wrong you need a tool to create database version control to keep track of schema changes. You may use Cygnite Migration commands. It is simple to use and make your job easier.

For your reference-

Migration & Seeding Video Tutorial

Database migration tool

like image 35
appsntech Avatar answered Oct 19 '22 06:10

appsntech