Restore with map files going to a different directory?

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Restore with map files going to a different directory?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:11 pm

by pillick >> Wed, 14 Aug 2002 23:56:40 GMT

Hi, I'm trying to distribute a very large database (that literally took weeks to build) over several different computers. The easiest way that I have found to do that is to back up the database using the database utility, then transfer the backup files onto the other computers and restoring the database.

My problem is this allways puts the map files into the same directory, but many of the computers are set up so that I have to put them on a different hard drive for it all to fit. How can I specify where to restore the files to?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Restore with map files going to a different directory?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:11 pm

by allistar >> Thu, 15 Aug 2002 2:04:57 GMT

Hi there,
You may find the following FAW useful:

http://news.jadeworld.com/developers/faq17673.htm

It seems that you should be able to modify the path of a database file
in a jade method. You could have a .txt file that is machine specific
and contains the locations of where the map files should set. When you copy the backup across to a computer you could then run that script.

Hope this helps,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND

Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Restore with map files going to a different directory?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:11 pm

by pillick >> Thu, 15 Aug 2002 2:29:12 GMT

Umm, from the sound of things it seems that this would work AFTER I restore the database, which isnt much help. I need to make sure the map files get created in the new directory (not just moved from there) during the restoration process.

Otherwise, there simply isnt enough space to restore the database.

So is there a way to modify the backup files so that they will be unpacked into the new directory immediately?

Or is there a way to just copy the map files directly to the new directory and then kind of just let jade know that they are there? (and avoid the backup & restore process entirely?)

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Restore with map files going to a different directory?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:11 pm

by CarlRanson >> Thu, 15 Aug 2002 5:11:54 GMT

If you have a copy of the system somewhere that is still working you could try this.

Make a new backup of the system, but this time select the advanced button, and select only the files starting with an underscore. This will give you a system you can restore that has no data, but still has your schemas installed etc.

Restore that system to your target machine.

Run jade, it will probably make the database files you missed out (Guessing).

Then do your script to move the files around.

shutdown, copy back all the data files and reset the timestamps.

cross your fingers and start er up.

This suggestion has been an educated guess only...I take no responsibility for any damage done etc.
Let us know if it works :)

CR

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Restore with map files going to a different directory?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:11 pm

by pillick >> Fri, 16 Aug 2002 2:03:31 GMT

heh, its a little while before this guinea pig has to worry about that problem anyway. So you wont get a damage report any time soon....

Give me a couple of weeks before I have to do this, then about a month before my boss will let me near a computer again, and then I'll tell you how it went =P

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Restore with map files going to a different directory?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:11 pm

by allistar >> Fri, 16 Aug 2002 2:04:07 GMT

Does Jade check to see if a database file exists when you connect to
the database, or the first time you try and access an object in that
data file?

If the latter then you should be able to distribute your data files as you want, then run the script that tells Jade where the .dat files actually are (you could use jadloadb and the executeSchema,
executeClass, executeMethod parameters to run the method). The only caveat with this is that all of the "_" files need to be in the same place.

This may work, it may not. It depends on the answer to the top
question.

Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND

Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Restore with map files going to a different directory?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:11 pm

by pillick >> Wed, 28 Aug 2002 22:02:24 GMT

arrgh. Jade checks for the database files as soon as you start it up.... foiled!

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Restore with map files going to a different directory?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:11 pm

by torrie >> Thu, 29 Aug 2002 7:51:21 GMT

Doesn't the OpenAllFilesOnDbStartup value in the PersistentDb section of the Jade ini file have an effect on this. If this is set to false Jade only looks for a database file when needed.

Torrie


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 37 guests