Re: Error trying to convert ds2fs for upgrade

Toby Dickenson <[email protected]> Sun, 5 Feb 2006 12:22:42 +0000
Newsgroups gmane.comp.web.zope.zodb.dirstorage
Message-ID <[email protected]>
On Friday 03 Feb 2006 17:47, Green, Erik (STP) wrote:

>   File "ds2fs.py", line 59, in ds2fs
>     fs.copyTransactionsFrom(it,zodb_verbose)
>   File "/export/zope/lib/python/ZODB/BaseStorage.py", line 425, in
> copyTransactionsFrom
>     self.restore(oid, r.tid, r.data, r.version,
> AttributeError: ObjectRevisionRecord instance has no attribute 'tid'
> [root@stpls105 DirectoryStorage]#
>
>
> Is there any way to do this?

You need fewer bugs ;-) My apologies. Try attached (untested) patch.

> Do I need to shut down or snapshot the 
> existing Plone instance for the 2+ hours it takes to tar up the data?

Snapshot mode is sufficient, then copy everything in the A directory. 

Alternatively, use the backup tool to create that tar file.



-- 
Toby Dickenson
DirectoryStorage_FullSimpleIterator.diff (text/x-diff, 780 B)
Index: FullSimpleIterator.py
===================================================================
RCS file: /cvsroot/dirstorage/DirectoryStorage/FullSimpleIterator.py,v
retrieving revision 1.1
diff -c -4 -r1.1 FullSimpleIterator.py
*** FullSimpleIterator.py	2 Aug 2004 22:43:59 -0000	1.1
--- FullSimpleIterator.py	5 Feb 2006 12:21:33 -0000
***************
*** 125,131 ****
      version = ''
      data_txn = None
      def __init__(self,oid,tid,data):
          self.oid = oid
!         self.serial = tid
          self.data = data
  
--- 125,132 ----
      version = ''
      data_txn = None
      def __init__(self,oid,tid,data):
          self.oid = oid
!         self.serial = tid # for older zodb version
!         self.tid = tid    # for newer
          self.data = data