If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Restore Informix database in batch process

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-14-06, 16:19
ODaniels ODaniels is offline
Registered User
 
Join Date: Nov 2005
Location: Jersey
Posts: 47
Restore Informix database in batch process

Hi all.

I'm very new to the Informix world so please forgive me if this is a simple question.

I would like to know if there is a command that will restore an informix database from one server to a backup server using a batch file. Also, not sure if this makes a difference, but the database will already exist on the backup server. Does this need to be deleted first? If so, what is the command line for that.

Thank you for your help.

ODaniels
Reply With Quote
  #2 (permalink)  
Old 07-17-06, 01:49
nitin_math nitin_math is offline
Registered User
 
Join Date: Nov 2004
Posts: 143
Hi,

Informix doesnot take database level backups (ver 10 do take, I guess). So you need to write a script which will do the export of database using dbpexort utility, move all the unl and the sql file to the backup server, drop the existing database and then import from the FTPed files.

Bye

Nitin
Reply With Quote
  #3 (permalink)  
Old 07-18-06, 14:57
ODaniels ODaniels is offline
Registered User
 
Join Date: Nov 2005
Location: Jersey
Posts: 47
Hi.

The backups are already happening nightly. I need to take the backup files and restore them onto a development server. That's the step I need help with. If anyone has the commands on how to drop the database and restore the files to the development server, that would be most helpfull.

Thanks,
ODaniels
Reply With Quote
  #4 (permalink)  
Old 07-20-06, 04:21
nitin_math nitin_math is offline
Registered User
 
Join Date: Nov 2004
Posts: 143
Hi,

You can drop the database by running "drop database db_nm"

once the database is dropped, use

dbimport db_nm -d dbspace_nm

where db_nm is the name of the database which you want to build and dbspace_nm is the name of the dbspace where you want the database to reside. Remember, there should be db_nm.exp directory and it should contain db_nm.sql along with unl files.

Bye

Nitin
Reply With Quote
  #5 (permalink)  
Old 08-15-06, 22:51
tungaw2001 tungaw2001 is offline
Registered User
 
Join Date: Nov 2002
Posts: 25
if your backup is an exported database, dbimport will work fine. If you have an ontape backup, then you should have the exact production replica of the test env.
Reply With Quote
  #6 (permalink)  
Old 08-16-06, 13:22
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
If your systems prod and dev are the same as far as onconfig file and dbspace layout then ontape -r is the best and fastest way

I restore my dev system from prod on a weekly basis using ontape, my db is not that big around 10GB and it takes less then an hour
Reply With Quote
  #7 (permalink)  
Old 08-22-06, 10:22
intarsplienis intarsplienis is offline
Registered User
 
Join Date: Aug 2006
Location: Riga, Latvia
Posts: 17
Consider using HADR technlogy!
__________________
www.database.lv
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On