I am having problems when I try to merge the databases. I followed the instructions like enabling revisions and always restoring the database when changes are made.

Then, developing new features in my site (on a dev box), I created a new node and in the production many new nodes. When I try to merge the dev and production database, however, I get conflicts. Hence, all right since I already got conflicts but never got problems like now. I tried with the two snippets the module provide:

  1. When I try to resolve them with diff3 -e --merge ./databases/tmp/data_dev.sql ./databases/tmp/data_orig.sql ./databases/tmp/data_prod.sql > ./databases/tmp/data_merged.sql, I got a lot of production content stripped. (e.g.:my prod have 530 nodes and with this diff merge, it got only 230). I think this occurs because ./databases/tmp/data_orig.sql don't have any content inside.
  2. When I try to resolve manually, the sequences are resetted to the development ones, then I got errors like duplicated entry when try to create a new node

Does anyone had the same issues?

Comments

ceardach’s picture

Yup, that's an error on my part. The file "data_orig.sql" no longer exists, it was renamed to "data_lastmerge.sql". So, try to instead run this command:

diff3 -e --merge ./databases/tmp/data_dev.sql ./databases/tmp/data_lastmerge.sql ./databases/tmp/data_prod.sql > ./databases/tmp/data_merged.sql

I ran a test of changing the same node on both production and development and it appeared to have worked. I'll commit that fix shortly.

Anonymous’s picture

I ran a test but mine production sequences became the development ones. I ran the diff3 call and the shell calls until ./dbscripts/restore.php production min sequences. Then I checked my sequences table and the values was from development, not production.

The content are right but for a unknown reason, the production sequences were not preserved.

I will update my module to the last revision and test again. I am using the HEAD revision.

ceardach’s picture

Try again with either the 5.x-1.x-dev branch or the 5.x-1.0 release. HEAD will likely not work correctly as I'm just developing on the 5.x branch.

Anonymous’s picture

Status: Active » Fixed

The bug is solved in 5.x-1.0 release. Thanks a lot for the help!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.