You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Chris Howe <cj...@yahoo.com> on 2006/08/14 10:24:46 UTC

Backup and Upgrade automation

I was brainstorming what would be necessary to create
an Upgrade service in OFBiz for improvements in OFBiz
that break backwards compatibility.

the requirements that I've come up with are the
following
1) Backup the database (an upgrade script may break or
corrupt the database) 
2)Check the upgrades that are necessary to run the
version (svn) that is trying to run
3)compare to list of upgrades that have already been
done
4)Copy the old entities to tempTables
5)Create the new tables necessary for the upgrade
6)Run a script to process the data into it's new
structure
7)Drop the tempTables
8)enter the upgrade script name into the list of
upgrades that have been done

Am I missing anything?  Anyone else interested in
something like this?

Re: Backup and Upgrade automation

Posted by BJ Freeman <bj...@free-man.net>.
The Tree was more to import those entities with PFK in them first.
Maybe then just remove all Forien keeps before import.

Will have to look at the import again. did not see how to do an 
conversion while importing. especially if you have left over data that 
goes into another entity.


David E Jones sent the following on 8/27/2006 11:32 AM:
> 
> On Aug 26, 2006, at 7:02 PM, BJ Freeman wrote:
> 
>> 3- todo-- build a entity tree of what has to be imported first, from 
>> the  entity defs in the upgrade.
> 
> Best of luck with this. I think the term for it is "NP Hard" which means 
> impossible for the purposes of our unfortunate reality. In fact, if the 
> goal is to avoid foreign key problems this is impossible because of 
> loops in the graph, even sometimes from/to a single node... ;)
> 
>> 4) todo-- import data by reading the Xml as a reader, in stead of Dom.
>> this would read the old entity data, re-arrange the data to the new 
>> entity model using the xml generated in #2. This allows large xml 
>> files without using up and/or running out of memory.
>>
>> the reader would read a element at a time and submit it  for import.
> 
> The Entity Engine XML Import stuff already works this way.
> 
> -David
> 
> 
> 

Re: Backup and Upgrade automation

Posted by David E Jones <jo...@undersunconsulting.com>.
On Aug 26, 2006, at 7:02 PM, BJ Freeman wrote:

> 3- todo-- build a entity tree of what has to be imported first,  
> from the  entity defs in the upgrade.

Best of luck with this. I think the term for it is "NP Hard" which  
means impossible for the purposes of our unfortunate reality. In  
fact, if the goal is to avoid foreign key problems this is impossible  
because of loops in the graph, even sometimes from/to a single  
node... ;)

> 4) todo-- import data by reading the Xml as a reader, in stead of Dom.
> this would read the old entity data, re-arrange the data to the new  
> entity model using the xml generated in #2. This allows large xml  
> files without using up and/or running out of memory.
>
> the reader would read a element at a time and submit it  for import.

The Entity Engine XML Import stuff already works this way.

-David



Re: Backup and Upgrade automation

Posted by Chris Howe <cj...@yahoo.com>.
Just to clarify on my (4) on the list old entities
mean the entities that are being changed and then
droped from the database, not the entire database. 
Usually these will have the name that will be desired
in the continuing database which is why we would want
to copy them to a tempTable.  

Obviously there could be an exception to this, but I
would think that almost all data model improvements
would be adding something new and therefore dummy
values would take care of FK issues or the upgrade
would be making the data model more generic, which
would be refactoring  of the FK and not cause an issue
there.

But your points do bring up that what I'm doing is a
bit of a hack instead of a true upgrade approach.  I
will need to think about this a bit more.


--- BJ Freeman <bj...@free-man.net> wrote:

> sorry for the late response. Dealing with a
> electrical fire, in 
> MotorCoarch, that happen on the 13th. Still not
> real-time, but can 
> upload/download messages once daily, now.  Should be
> back real-time in a 
> week or so.
> 
> I am approaching this more from the Entity level.
> 1) export all entities to xml.
> 
> 2) toDo-- entity comparator that creates a new xml
> that is used to 
> convert the entities data. NOte: for big changes
> like from 2.0 to 
> current, it would take some hand coding. but once
> done, it could be in 
> the Jira for other to use.
> 
> 3- todo-- build a entity tree of what has to be
> imported first, from the 
>   entity defs in the upgrade.
> 4) todo-- import data by reading the Xml as a
> reader, in stead of Dom.
> this would read the old entity data, re-arrange the
> data to the new 
> entity model using the xml generated in #2. This
> allows large xml files 
> without using up and/or running out of memory.
> 
> the reader would read a element at a time and submit
> it  for import.
> 
> Chris Howe sent the following on 8/14/2006 1:24 AM:
> > I was brainstorming what would be necessary to
> create
> > an Upgrade service in OFBiz for improvements in
> OFBiz
> > that break backwards compatibility.
> > 
> > the requirements that I've come up with are the
> > following
> > 1) Backup the database (an upgrade script may
> break or
> > corrupt the database) 
> > 2)Check the upgrades that are necessary to run the
> > version (svn) that is trying to run
> > 3)compare to list of upgrades that have already
> been
> > done
> > 4)Copy the old entities to tempTables
> > 5)Create the new tables necessary for the upgrade
> > 6)Run a script to process the data into it's new
> > structure
> > 7)Drop the tempTables
> > 8)enter the upgrade script name into the list of
> > upgrades that have been done
> > 
> > Am I missing anything?  Anyone else interested in
> > something like this?
> > 
> 
> 


Re: Backup and Upgrade automation

Posted by BJ Freeman <bj...@free-man.net>.
sorry for the late response. Dealing with a electrical fire, in 
MotorCoarch, that happen on the 13th. Still not real-time, but can 
upload/download messages once daily, now.  Should be back real-time in a 
week or so.

I am approaching this more from the Entity level.
1) export all entities to xml.

2) toDo-- entity comparator that creates a new xml that is used to 
convert the entities data. NOte: for big changes like from 2.0 to 
current, it would take some hand coding. but once done, it could be in 
the Jira for other to use.

3- todo-- build a entity tree of what has to be imported first, from the 
  entity defs in the upgrade.
4) todo-- import data by reading the Xml as a reader, in stead of Dom.
this would read the old entity data, re-arrange the data to the new 
entity model using the xml generated in #2. This allows large xml files 
without using up and/or running out of memory.

the reader would read a element at a time and submit it  for import.

Chris Howe sent the following on 8/14/2006 1:24 AM:
> I was brainstorming what would be necessary to create
> an Upgrade service in OFBiz for improvements in OFBiz
> that break backwards compatibility.
> 
> the requirements that I've come up with are the
> following
> 1) Backup the database (an upgrade script may break or
> corrupt the database) 
> 2)Check the upgrades that are necessary to run the
> version (svn) that is trying to run
> 3)compare to list of upgrades that have already been
> done
> 4)Copy the old entities to tempTables
> 5)Create the new tables necessary for the upgrade
> 6)Run a script to process the data into it's new
> structure
> 7)Drop the tempTables
> 8)enter the upgrade script name into the list of
> upgrades that have been done
> 
> Am I missing anything?  Anyone else interested in
> something like this?
> 


Re: Backup and Upgrade automation

Posted by Adrian Crum <ad...@hlmksw.com>.
There has been a lot of discussion of this in the past. Search the dev mailing 
list for component versions.

Chris Howe wrote:
> I was brainstorming what would be necessary to create
> an Upgrade service in OFBiz for improvements in OFBiz
> that break backwards compatibility.
> 
> the requirements that I've come up with are the
> following
> 1) Backup the database (an upgrade script may break or
> corrupt the database) 
> 2)Check the upgrades that are necessary to run the
> version (svn) that is trying to run
> 3)compare to list of upgrades that have already been
> done
> 4)Copy the old entities to tempTables
> 5)Create the new tables necessary for the upgrade
> 6)Run a script to process the data into it's new
> structure
> 7)Drop the tempTables
> 8)enter the upgrade script name into the list of
> upgrades that have been done
> 
> Am I missing anything?  Anyone else interested in
> something like this?
> 

Re: Backup and Upgrade automation

Posted by Si Chen <si...@opensourcestrategies.com>.
Yes.  They've worked pretty well for us.

On Aug 15, 2006, at 12:33 AM, Chris Howe wrote:

> Are you talking about the sql files?  I was thinking
> services that can provide log output so that the
> upgrade can be monitored.  In addition, I'm not sure
> sql provides enough logic especially as foreign key
> relationships change.  Have any of the upgrades been
> complex yet?
>
> --- Si Chen <si...@opensourcestrategies.com> wrote:
>
>> We already provide these for opentaps releases.  You
>> can download the
>> scripts off sourceforge.net
>>
>> On Aug 14, 2006, at 1:24 AM, Chris Howe wrote:
>>
>>> I was brainstorming what would be necessary to
>> create
>>> an Upgrade service in OFBiz for improvements in
>> OFBiz
>>> that break backwards compatibility.
>>>
>>> the requirements that I've come up with are the
>>> following
>>> 1) Backup the database (an upgrade script may
>> break or
>>> corrupt the database)
>>> 2)Check the upgrades that are necessary to run the
>>> version (svn) that is trying to run
>>> 3)compare to list of upgrades that have already
>> been
>>> done
>>> 4)Copy the old entities to tempTables
>>> 5)Create the new tables necessary for the upgrade
>>> 6)Run a script to process the data into it's new
>>> structure
>>> 7)Drop the tempTables
>>> 8)enter the upgrade script name into the list of
>>> upgrades that have been done
>>>
>>> Am I missing anything?  Anyone else interested in
>>> something like this?
>>
>>


Re: Backup and Upgrade automation

Posted by Chris Howe <cj...@yahoo.com>.
Are you talking about the sql files?  I was thinking
services that can provide log output so that the
upgrade can be monitored.  In addition, I'm not sure
sql provides enough logic especially as foreign key
relationships change.  Have any of the upgrades been
complex yet?

--- Si Chen <si...@opensourcestrategies.com> wrote:

> We already provide these for opentaps releases.  You
> can download the  
> scripts off sourceforge.net
> 
> On Aug 14, 2006, at 1:24 AM, Chris Howe wrote:
> 
> > I was brainstorming what would be necessary to
> create
> > an Upgrade service in OFBiz for improvements in
> OFBiz
> > that break backwards compatibility.
> >
> > the requirements that I've come up with are the
> > following
> > 1) Backup the database (an upgrade script may
> break or
> > corrupt the database)
> > 2)Check the upgrades that are necessary to run the
> > version (svn) that is trying to run
> > 3)compare to list of upgrades that have already
> been
> > done
> > 4)Copy the old entities to tempTables
> > 5)Create the new tables necessary for the upgrade
> > 6)Run a script to process the data into it's new
> > structure
> > 7)Drop the tempTables
> > 8)enter the upgrade script name into the list of
> > upgrades that have been done
> >
> > Am I missing anything?  Anyone else interested in
> > something like this?
> 
> 


Re: Backup and Upgrade automation

Posted by Si Chen <si...@opensourcestrategies.com>.
We already provide these for opentaps releases.  You can download the  
scripts off sourceforge.net

On Aug 14, 2006, at 1:24 AM, Chris Howe wrote:

> I was brainstorming what would be necessary to create
> an Upgrade service in OFBiz for improvements in OFBiz
> that break backwards compatibility.
>
> the requirements that I've come up with are the
> following
> 1) Backup the database (an upgrade script may break or
> corrupt the database)
> 2)Check the upgrades that are necessary to run the
> version (svn) that is trying to run
> 3)compare to list of upgrades that have already been
> done
> 4)Copy the old entities to tempTables
> 5)Create the new tables necessary for the upgrade
> 6)Run a script to process the data into it's new
> structure
> 7)Drop the tempTables
> 8)enter the upgrade script name into the list of
> upgrades that have been done
>
> Am I missing anything?  Anyone else interested in
> something like this?


Re: Opentaps or OFBiz?

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "Pham Hoai Van" <va...@smartsolutions.com.vn>


> On the download section, Opentaps is released on April 23 2006. It's too
> old. And i just want the framework itself.

This will come soon, work in progress. Please see this thread : http://www.nabble.com/Framework-Independence-tf2097988.html#a5782577

Jacques

> On Aug 15, 2006, at 9:30 AM, Christian Geisert wrote:
>
> > Pham Hoai Van schrieb:
> >> Hi all,
> >>
> >> I'm planning to build a small application based on OFBiz and
> >> release it to
> >> customer in next two months. I still worry about choosing lastest
> >> source
> >> code of OFBiz or Opentaps. Opentaps is stable but less feature.
> >> Does latest
> >
> > I think opentaps is actually OFBiz with improved accounting and CRM.
> >
> Plus periodic releases and upgrade scripts between those releases.
>
> > One thing to take into consideration is that accounting and crm are
> > under GPL.
> >
> >> source code of OFBiz stable enough to develop on? Is there any big
> >> problem
> >> with it now?
> >
> > Do you want to use just the framework or build on the applications?
> >
> > -- 
> > Christian
>
>


RE: Opentaps or OFBiz?

Posted by Pham Hoai Van <va...@smartsolutions.com.vn>.
On the download section, Opentaps is released on April 23 2006. It's too
old. And i just want the framework itself.

On Aug 15, 2006, at 9:30 AM, Christian Geisert wrote:

> Pham Hoai Van schrieb:
>> Hi all,
>>
>> I'm planning to build a small application based on OFBiz and  
>> release it to
>> customer in next two months. I still worry about choosing lastest  
>> source
>> code of OFBiz or Opentaps. Opentaps is stable but less feature.  
>> Does latest
>
> I think opentaps is actually OFBiz with improved accounting and CRM.
>
Plus periodic releases and upgrade scripts between those releases.

> One thing to take into consideration is that accounting and crm are
> under GPL.
>
>> source code of OFBiz stable enough to develop on? Is there any big  
>> problem
>> with it now?
>
> Do you want to use just the framework or build on the applications?
>
> -- 
> Christian




Re: Opentaps or OFBiz?

Posted by Si Chen <si...@opensourcestrategies.com>.
On Aug 15, 2006, at 9:30 AM, Christian Geisert wrote:

> Pham Hoai Van schrieb:
>> Hi all,
>>
>> I'm planning to build a small application based on OFBiz and  
>> release it to
>> customer in next two months. I still worry about choosing lastest  
>> source
>> code of OFBiz or Opentaps. Opentaps is stable but less feature.  
>> Does latest
>
> I think opentaps is actually OFBiz with improved accounting and CRM.
>
Plus periodic releases and upgrade scripts between those releases.

> One thing to take into consideration is that accounting and crm are
> under GPL.
>
>> source code of OFBiz stable enough to develop on? Is there any big  
>> problem
>> with it now?
>
> Do you want to use just the framework or build on the applications?
>
> -- 
> Christian


Re: Opentaps or OFBiz?

Posted by Christian Geisert <ch...@isu-gmbh.de>.
Pham Hoai Van schrieb:
> Hi all,
> 
> I'm planning to build a small application based on OFBiz and release it to
> customer in next two months. I still worry about choosing lastest source
> code of OFBiz or Opentaps. Opentaps is stable but less feature. Does latest

I think opentaps is actually OFBiz with improved accounting and CRM.
One thing to take into consideration is that accounting and crm are
under GPL.

> source code of OFBiz stable enough to develop on? Is there any big problem
> with it now?

Do you want to use just the framework or build on the applications?

-- 
Christian

Opentaps or OFBiz?

Posted by Pham Hoai Van <va...@smartsolutions.com.vn>.
Hi all,

I'm planning to build a small application based on OFBiz and release it to
customer in next two months. I still worry about choosing lastest source
code of OFBiz or Opentaps. Opentaps is stable but less feature. Does latest
source code of OFBiz stable enough to develop on? Is there any big problem
with it now?

Any idea will be much appreciated? Thank you in advance.

Best regards,
VanPH.