Jonathan, Thanks for the input... is there somewhere you can point me that I can read about how to do that myself?
Thanks! On 7/18/06, Jonathan <[EMAIL PROTECTED]> wrote:
----- Original Message ----- From: "Pete Taylor" <[EMAIL PROTECTED]> To: <firstname.lastname@example.org> Sent: Tuesday, July 18, 2006 7:07 PM Subject: [Zope3-Users] zodb data recovery > Thinking about the ZODB and data recovery... > > Let's say I have two or three sites all running off the same Data.fs > (through ZEO or otherwise). Doing nightly backups, being good > sysadmins, etc. Now I get a call from a user who says "I don't know > what happened to the content, but it was there three days ago, i > swear!" > > So I look through my backups, load a Data.fs up in my python shell, > and start digging around, and sure enough, there's the data. > > How do I get that data "back" so to speak? I don't want to restore > the whole ZODB, that would blow away my other sites data, and any data > that any other user of that same site had created. I know that zope3 > doesn't provide any "dump data from this context on down" kind of > utils, but I was wondering what the standard way to do this was? I'm > sure this problem has been run into ;) > > I haven't run into this yet, but I'm in the midst of building a > site-with-many-subsites scenario, and I worry about these kinds of > things. Certainly the "Undo" functionality is great, but it has > limits... and in many ways, it's not the immediate "oh, oops, i > deleted that" kind of data destruction I'm worried about, though > that's there. It's more the a-few-weeks-later kind of issue that I'm > worried about. > > I'd considered opening up a connection to both Data.fs ZODB's, > establishing the correct context in both, and then repopulating all of > the data that way. But anything that keys on ObjectEvent (or any > other design specific event) thrown during these object creations > would fail. And unless we explicitly check for annotations and such, > I don't know if those would picked up just by moving all content > objects from a particular location. > > Has anyone else solved this problem, or have suggestions toward > solving it? I don't mind writing the scripts to repopulate data from > a restored zodb should that be necessary, but I don't really think > that's the right way to go, or at least not on it's own. > > Any thoughts would be extremely welcome! If you have set up the 'virtual' web sites so that they have their own folder 'tree-structure' eg. root - virtualWebSite1folder - virtualWebSite1subfolder... - virtualWebSite2folder - virtualWebSite2subfolder... - virtualWebSite3Folder - virtualWebSite3subfolder... you can export/import a single folder instead of the entire Data.fs. Another solution is to set up a mount point (ie. a separate xxx.fs file) for each folder. hth Jonathan
-- "All guilt is relative, loyalty counts, and never let your conscience be your guide." - Lucas Buck, American Gothic _______________________________________________ Zope3-users mailing list Zope3email@example.com http://mail.zope.org/mailman/listinfo/zope3-users