Server repository not updated

Post Reply
diymike
Posts: 3
Joined: 07 Jan 2010, 07:39

Hello there,

This is a greeting from Taiwan with which I'd like to thank you guys for offering such a great website and community support.

In my company we've started capturing our EA following the Essential approach. Just set up the server environment to begin our production team work in Feb. However the other day we found that after restarting the Protege server, all data we entered for days were gone.

The server repository looked fine when data were entered and verified by two to three users. Without knowing what happened, we set up a daily backup Shell script to try to protect something. But our latest finding was that - the server repository file instance does not get updated when we add instances into Protege class structure, nor can text entered be query from the database table defined (MS SQL). So probably we'll end up losing all input again next time we shut down the server.

The repository file had been cloned from an instance filled with some data in single user mode earlier, with its file path specified correctly in the Metaproject, of course. Apart from that, largely we followed all steps in the server installation guide.

It seems that the Protege server does not write the data to the file path specified. Could it be the repository cloning (copy, paste then rename... under Windows explorer) violated any internal logic of Protege?

Any advice to help keeping our capturing effort (the second time now!) will be very much appreciated.

Michael
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi Michael,

Thanks for your post and sorry to hear that you've lost some data. 

I have some questions to help clarify your configuration. 

1 - are you still using a file based repository for the server rather than the MySQL database? If so, there's a config parameter called 'saveInterval' that needs to be set in the run_protege_server.bat file. This is documented in the server setup and is necessary to make sure that the server actually saves any updates that you make. By default this is commented out and therefore disabled in Protege. 

2 - if you are using a database backend, you should set this up in a stand alone mode - that is convert the Protege project to use the database - before running this now database-enabled project from the server. 

Finally, if you're running a file based repository make sure to use the shutdown_protege_server.bat to stop the server safely allowing it to save the repository before stopping. 

Your backup scripts should not be causing any problems as long as the do not lock or move the project data files. 
If you are using the database for the 'backend' to store your instances and classes, use the database backup tools to make backups of the database. For MySQL, the Administrator tool provides a simple interface for setting this up. Also, using the database, the Protege project file (.PPRJ) doesn't change much unless you update the forms. So, you coils always manage backing this up manually. 
However, I have used a Windows script to make backups of the PPRJ file and MySQL to make database backups without problems. 

I have also used the file-based approach on the server. As long as you have the 'saveInterval' parameter set all will work properly. The Protege clients may appear to stall briefly while the server saves the repository to the files but it can still support multiple users. With a database backend, each change you make is save immediately to the database and clients never stall. 
For these reasons, I would recommend that you use the database backend for the server. Then you can drop the 'saveInterval' parameter. 

Hope this helps - let me know how you get on and certainly if you are still having problems. Make sure you have either got the 'saveInterval' set - from what you describe, this sounds most likely to be the issue - or use a database backend. 

Regards 

Jonathan    
Essential Project Team
diymike
Posts: 3
Joined: 07 Jan 2010, 07:39

Hi Jonathan,

Sorry to reply a little late due to the Chinese New Year vacation. Thank you for the prompt advice and yes, it was because we did not set "saveInterval" and, believe it or not, we haven't set up the DB backend properly either.

So we can work with the file based server repository correctly now. But unfortunately our production DB system MS SQL encountered a Chinese encoding problem with Protege. I've decided to proceed with the file based approach until that can be fixed.

My next question will be: we can always convert the file repository to database sometime later, right? Many thanks again.

Michael
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi Michael - Happy New Year!

Yes, you can convert the repository to use a database at any point.
I have run for several months on file based (again due to an issue with using MS SQL Server) and converted to use MySQL later on.

To do the conversion, make sure to stop the server. Then, on your server host, open the Protege project for your server in stand-alone mode (just run Protege client on this host).
Use the File->Convert Project To Format... and select the Protege Database. Then follow the database setup instructions.

Let me know how things go with your modelling and analysis

Jonathan
Essential Project Team
diymike
Posts: 3
Joined: 07 Jan 2010, 07:39

Hello Jonathan,

Thanks for the further advice. I think I may have more queries here to request your support in our course of capturing. So, will talk to you soon...

Michael
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Sure - looking forward to hearing how you are getting on.

Feel free to start new topics so others can see the issues and learn from what we post.

Thanks

Jonathan
Essential Project Team
Post Reply