[Zope] - Patch and some other questions

Jim Fulton jim.fulton@Digicool.com
Mon, 14 Dec 1998 11:44:30 -0500


Andy Dustman wrote:
> 
> I created a unified diff patch for ZopeHTTPServer which incorporates the
> improved exception handling. It is diffed against 1.9.0b2. You'll need to
> go into the ZopeHTTPServer directory to apply it.
> 
> The other thing is: Upgrading. It looks like from the install program that
> if you do install over the old installation that it won't nuke your
> Data.bbb, which is good, but raises some other questions:
> 
> 1) Generally, can you merge or otherwise transfer data from Data.bbb to
> another? I suspect the answer is going to be something like "loop over
> the keys".

Yes.  At the Python level, BoboPOS has an API for exporting and
importing objects. (Read the source if you're interested.
The thing FKA BoboPOS3 actually has a documented API for this. :)
If you are using the Zope framework, there is a web interface for 
exporting and importing objects.  As it's name implies, it is a 
temporary interface until a nice interface can be designed.

You can export an object by invoking it's 'manage_exportHack'
method.  For example, to export folder a/b, you can go to
the URL:

  a/b/manage_exportHack

This created a file named 'export.bbe' in the var directory.

To import this file into another site, copy the file to the
other sites var directory and then invoke the method, 
'manage_importHack' on a folder object that you want to
import into.  For example, to import into the folder
x/y/z, simply visit x/y/z/manage_importHack.

 
> 2) How do you safely back up the database wrt things like locking and
> transactions? I also suspect a similar answer to #1...

You can simply back up the file.  Because of the way the file 
is written, it is highly unlikely for a backup file created 
directly to have a problem.  Alternatively, you could export 
the entire site and backup the export file.

Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.