Unanswered: Restore Informix database in batch process
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.
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.
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.
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.