Merging website dev and prod

Author Message

Clemens T

Monday 29 September 2008 6:13:51 am

Hey all,

I've got two eZ Publish installations, one is the development and the other one is the production environment of the same website.

Now, my production environment has gone through some updates (news updates etc) and my development efforts are done. However, unfortunately in order to present some new functionality, some new nodes were added to my development environment so the database changed.

How do I merge these changes on development & those on production in a ideal way?

Do I have to do this through MySQL or through an extension?

Thanks in advance!
Clemens Timmermans

zurgutt -

Tuesday 30 September 2008 12:42:47 am

Unfortunately there is no ideal way.

If there is small number of new nodes and you can manually copy them over to main site in a hour or so, I strongly suggest you do that. Takes some effort, but nothing can go badly wrong. Then, when main site is verified to work OK you can refresh dev site too by db dump and file copy from main site, so they will be completely identical.

Alternatively you could export these nodes as content packages with Package tool and import to main site. This could be ideal way, however package tool is tricky to use and often unreliable by my experience. It also loses node creation time and author, which is serious design flaw and makes it often unusable. But there is separate script to restore these (http://ez.no/developer/contribs/hacks/owner_id_creator_id_modified_and_published_synchronizer , NB! see comments about typos on bottom of page). Be sure to increase max execution time in your php conf, rule of thumb: 1 second per node to be imported.

Third tool that may be useful is ezcsvimport and ezcsvexport scripts that come with distribution. Note however that they contain a bug, see http://issues.ez.no/IssueView.php?Id=13616&activeItem=2 for fix.

Certified eZ developer looking for projects.
zurgutt at gg.ee

Clemens T

Wednesday 01 October 2008 5:37:02 am

Thank you very much for your detailed reply. I believe this to be a pretty large problem of eZ Publish. I will probably manually copy the nodes, and re-configures override settings. Thanks!

Lian Kwee Ang

Thursday 02 October 2008 2:16:11 am

Hi,

I have the exact same problem.

What I personally did is to document all database changes on my development server.

After which, when it is time to migrate to production, I take down the production for a few hours, take a dump of the production database and then put it on my development server.

I then merge the changes I documented to the database dump I took.

After checking that everything is working and fixing whatever needed to be, I reuploaded all the files and override the production database with the copy I "fixed".

Of course back-ups were made.

Hope it helps!

zurgutt -

Saturday 04 October 2008 2:30:14 am

Lian, do you have some special tools for this database level merge? Sounds like very complex and error-prone process to me, would not know how to do it, but interesting neverthless, can you elaborate exactly how you go about this merge?

Certified eZ developer looking for projects.
zurgutt at gg.ee

Carlos Revillo

Saturday 04 October 2008 4:19:05 am

This is a very interesting feature that could be added to next releases, not only for developers.

Our customers usually says us things like "we like the admin interface but we would like to have some kinda testing environment, so, when a object is published, we could surf the test site and check how the new content has affected our news page our also our front page, for example. then, we will like to publish the object on the production environment..."

is there any plans to improve such feature in next releases? or maybe is now some extension who let you work like this?
thank you,

Gaetano Giunta

Sunday 05 October 2008 6:40:55 am

Using packages would be an ideal way to move content around, as long as

- packages could be created/imported using an offline script. Current mechanism makes it impossible to use the GUI to export/import a package with eg. 500 items

- a way is found to make use of the imported nodes on the target server. Since imported nodes get a new Id, override rules and fetches based on node id do not work out of the box

I would like very much to see support for remote_id implemented in both override.ini and fetch functions, as the remote_id is generally kept when importing packages

Principal Consultant International Business
Member of the Community Project Board

zurgutt -

Sunday 05 October 2008 7:08:56 am

There is a cli package manager coming with distribution, ezpm.php. Its usage is largely undocumented but i have managed to use it to import big packages before installing them through browser.

I kind of seem to remember there was some kind of content replication system demoed on conference couple of years ago. I think it was Xrow guys but might be wrong.

Certified eZ developer looking for projects.
zurgutt at gg.ee

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:22:28
Script start
Timing: Jan 18 2025 22:22:28
Module start 'layout'
Timing: Jan 18 2025 22:22:28
Module start 'content'
Timing: Jan 18 2025 22:22:29
Module end 'content'
Timing: Jan 18 2025 22:22:29
Script end

Main resources:

Total runtime1.2243 sec
Peak memory usage4,096.0000 KB
Database Queries78

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9141152.6250
Module start 'layout' 0.00540.0027 740.539139.4453
Module start 'content' 0.00811.2147 779.9844704.8438
Module end 'content' 1.22270.0015 1,484.828120.1641
Script end 1.2243  1,504.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2604160.0002
Check MTime0.00150.1230160.0001
Mysql Total
Database connection0.00080.062710.0008
Mysqli_queries1.148693.8125780.0147
Looping result0.00180.1440760.0000
Template Total1.184996.820.5924
Template load0.00210.169320.0010
Template processing1.182896.607020.5914
Template load and register function0.00020.013510.0002
states
state_id_array0.00220.183310.0022
state_identifier_array0.00350.282320.0017
Override
Cache load0.00180.1440450.0000
Sytem overhead
Fetch class attribute can translate value0.00060.052650.0001
Fetch class attribute name0.00100.0850100.0001
XML
Image XML parsing0.00140.114050.0003
class_abstraction
Instantiating content class attribute0.00000.0022120.0000
General
dbfile0.00100.0777230.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs