[Zope] Restore files from Data.fs.tr0

Jaroslav Lukesh lukesh at seznam.cz
Fri Mar 15 20:44:57 UTC 2013


Hi,

thanks for assistance, but this solution make export of data up to specified 
date in Undo history, instead of rescuing things from data.fs.tr0.

Is it possible to rescue data from data.fs.tr0, please?

Many thanks, JL.

----- Puvodní zpráva ----- 
Od: "Cornel Nitu" <cornel.nitu at eaudeweb.ro>
Komu: "Jaroslav Lukesh" <lukesh at seznam.cz>
Kopie: <zope at zope.org>; <zodb-dev at zope.org>
Odesláno: 15. brezna 2013 13:34
Predmet: Re: [Zope] Restore files from Data.fs.tr0


Hi,

I use the following steps to get objects from a corrupted Data.fs. You can 
apply some guesses regarding the dates.

1. Make another Zope instance, with same products
2. Copy the real Data.fs into this temporary zope instance
3. Start zopedebug: $:/path-to-zope/bin/zopectl debug. Run these commands:

import ZODB.DB, ZODB.FileStorage, cPickle
from ZODB.TimeStamp import TimeStamp
from OFS import ObjectManager
date_tuple = (2009,8,23,23,17,06) #date when data was safe
special_date = TimeStamp(*date_tuple) #make date into special format
filename=’/var/local/zopetest/var/db.fs’ #path to Zope’s Data.fs (zope 
instance have to be stopped atm)
storage = ZODB.FileStorage.FileStorage(filename, 
read_only=1,stop=`special_date`) #wait few minutes, until it opens Data.fs
DB = ZODB.DB(storage) #mount database
conn = DB.open() #open database
root = conn.root()['Application']
folder = getattr(root, ‘myfolder’) #the parent containing the folder with 
the objects you want to recover
folder.manage_exportObject(id=’mycontent’,download=0)

Hope it helps.

Good luck,
Cornel

--
Cornel Nitu
Eau de Web (http://www.eaudeweb.ro)
Clucerului 55, ap 7, 011364 Bucharest
Tel/fax: +40 21 222 1522, Mobile: +40 721 223 623
Jabber: cornel at jabber.eaudeweb.ro, Skype: nitucornel

On Mar 15, 2013, at 2:01 PM, Jaroslav Lukesh wrote:

> Hi all,
>
> due disk and backup failure, I need to restore latest versions of files 
> and properties from Data.fs.tr0, does have anybody some script or tips how 
> to do it with zope tools, please?
>
> Note that original Data.fs have changes after failure date, size at time 
> of the failure is unknown.
>
> Many thanks,
> Jaroslav Lukesh
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> https://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope-dev )

_______________________________________________
Zope maillist  -  Zope at zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev ) 



More information about the Zope mailing list