Thanks, BJ, but I am looking for best practices on how to do it NOW, not the automated component under design for the future. The emails you mentioned don't really address any of the questions below. But neither does any of the existing docs I have found so far. :-)
Pointers, anyone? I did try "./ant run-install-seed" on an existing database (previously created with "run-install"), it ran without obvious errors and the number of rows changed that it reported was several thousand, but less than the number with "run-install". So can it (usually) be safely run on a production database, and will it have the intended effect of updating the seed data (if necessary) without deleting/overwriting the production data that may refer to that seed data? From previous database experience, I know that updating/removing/replacing data to which other data points is often a problem, to say the least. Also, are there any pros and cons for putting the OLAP datasource in a separate database from the main data source? The existing derby demo uses two, but most of the setup tutorials I find are pretty vague on this point, but if I point both data sources to the same postgresql database, I see no obvious errors. Am i asking for trouble down the road? What is the difference between the two, and are there data collisions I'm not seeing yet? -- Matt Warnock <[email protected]> RidgeCrest Herbals, Inc. On Mon, 2010-08-30 at 16:22 -0700, BJ Freeman wrote: > Mat you speak of a combination of Migration conponent and Setup > Component now under design. > I covered most of this under the email subject > Migration component Ideas 8/26/2010 > also as a expansion > see the dev list subjects > Step to automate Setup for entityengine.xml 8/26/20010 > and > using derby for setup controller > > also > https://issues.apache.org/jira/browse/OFBIZ-635 > > ========================= > BJ Freeman <http://bjfreeman.elance.com> > Strategic Power Office with Supplier Automation > <http://www.businessesnetwork.com/automation/viewforum.php?f=52> > Specialtymarket.com <http://www.specialtymarket.com/> > Systems Integrator-- Glad to Assist > > Chat Y! messenger: bjfr33man > Matt Warnock sent the following on 8/30/2010 2:12 PM: > > > > I run a small enterprise and I doubt our needs are unusual. We would > > like to run trunk and stay (more or less) current. We're running > > postgresql as a backend. I'm hoping to automate (as much as possible) > > the update process. I'm hoping to implement a few things not provided > > in the standard demo setup. > > > > 1) I need to backup the database nightly, so that our daily work doesn't > > get lost (doh!). I can use pg_dump for that, but of course it backs up > > the entire database, including seed, admin-user-login, and site-specific > > data. I could also use the webtools dump, which I assume does the exact > > same thing but in XML, which is a good deal larger in file size. > > However, webtools won't write an XML file for an empty table, while > > pg_dump would write a structure definition for that table. Probably > > pg_dump would be a good deal faster. Size and speed issues aside, it > > seems that neither method differentiates in any way between seed and > > non-seed data. Am I correct here? > > > > 2) To effectively use the webtools backup, I would need to automate it > > from a cron job. Is there an easy way to call ofbiz services from the > > command line, or do I need to schedule a job within OFBiz to do this > > kind of thing? What are the pros and cons of a system cron job vs. a > > scheduled job in OFBiz? > > > > 3) I need a log of what version I was running when. For example, if I > > update weekly, and on Sunday night I roll forward to the latest trunk > > revision 970999, and it breaks something, I need to have a log that > > tells me that Friday (when it worked) I was running 970888, so I can > > roll back to that revision, until I get the kinks worked out with the > > upgrade. Otherwise I have to restore from a dated backup, which I can > > always do, but it seems that a simple "svn checkout 970888; ./ant build" > > might be cleaner. I'm assuming that after updating the code with "svn > > checkout" I can log the date/time to a file with the output of "svn > > info". > > > > 4) If a revision requires a database update or modification, I would > > like to know about it in advance, and make sure that manual modification > > is completed before the upgrade. I'm assuming what I need there should > > always be found in: > > https://cwiki.apache.org/confluence/display/OFBTECH/Revisions+Requiring > > +Data+Migration > > > > 5) I would like to update all seed data in place (postgresql) without > > overwriting the rest of the (non-seed) data. Will executing "./ant > > run-install-seed" overwrite the EXISTING seed data in a production > > database without affecting the non-seed data? Or it it only intended > > for use on an empty database, as all the examples I have found do? If > > the latter, how do you restore only the NON-seed data after a seed data > > initialization? > > > > Are there any other bear traps or best practices that I should be aware > > of? Or is this stuff documented somewhere that I have not found? There > > was a discussion of it (at least the seed vs. demo data issue) about a > > year ago on this list, but I didn't see these specific questions > > answered. > > > > Or am I overly optimistic about the possibility of updating a production > > system regularly as OFBiz trunk changes? > > > > Thanks in advance. > > > >
