-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: backup (old domain model) & restore (modified domain mod
PostPosted: Wed Aug 20, 2008 5:18 am 
Newbie

Joined: Wed Aug 20, 2008 4:29 am
Posts: 1
Hi All,

We have an existing web application with about half a million records now. Not very large but too large to manually restore. The issue is we have (almost always) implement(ed) new features that affected the definition of some of the pojos that is mapped to hibernate. And what we need to do is backup the current records, load up the new pojos, hence slightly altered rdbms structure. And then restore the (previously backed up) records.

Btw were using MySQL 5. I think our domain model is a bit complex with lots of implentation of subclasses and class by hierarchy mappings.

The few steps we took:

1. Load the old domain model and serialized them into a file, for the backup procedure. For restore, we de-serialized the file using the new revisions of the domain model. At this point we will have to manually debug for serialVersionUID errors on the new pojos. This is how we do it right now but its a very cumbersome process and not to mention slow.

2. Were also looking at Xstream but lot of xstream errors appeared when we started to deserialized the topmost pojo.

3. Also tried loading 2 sets of domain model, for example the main tree is com.domain.model.* and then I copied and tweaked the pojos to be contained in com.domain.model.backup.* structure. I stopped when I got a hibernate error (something on the .xdt) while running schemaexport ant target.

The last option I can think is to load the domain model and dynamically create them into a separate database ( dependency on domain structure is not existent at this point ) as a backup db. Then load the new version of domain model (could be a separate application) and then restore the records.


Unfortunately we don't much have the luxury of time to extensively research on some of the methods above. So I'd rather waste time on the most probable approach.

I hope someone here has been on the same situation or something like it, maybe they can share how they do it? Or maybe someone here knows of a tool that can handle such task.

Thanks in advance.

Best regards,
Richard


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.