Manually Back up and restore Ingres database

As part of the set up of the MWP system a nightly backup task is set up in Task Scheduler and it runs automatically at a set time each night.

However, you may wish to manually run the process (for example to set up and/or refresh a Test database). To do so, follow the steps below.

NOTE – care MUST be taken to ensure you type the following EXACTLY as it shows below.

  1. Open an “Ingres II Administrator command prompt” (it must be the ‘II’ instance not the ’OR’ instance)
    Screenshot
  1. At the prompt, change to the folder where you wish to ‘unload’ the data files. (For example, if the system is installed on c: then there will be an c:\MWP\backup\special folder – change to that folder).
    Screenshot
  1. Type copydb -c mwp -dest=. -source=. and <enter>

This will create a number of files in the folder you are currently in. The important one here is copy.out.

  1. Type sql mwp < copy.out > copyout.log and <enter>

This will unload the database tables into .ingres files (text-based) – it may take a while to complete depending on the size of your database.

  1. Type infodb mwptest and <enter>

CAUTION - If it says this, then you don’t have a test database. Continue on to point 8 below.

Screenshot

If it says something like this, then you do have a Test database, and will need to destroy it and re- create it (screen shot for example only).

Screenshot
  1. Type destroydb mwptest and <enter>

This will remove (destroy) the existing mwptest database

  1. Type createdb -no_x100 mwptest and <enter>

This will create the basic mwptest database (system level tables)

  1. Type sql mwptest < copy.in > copyin.log and <enter>

This will create and populate the user tables of the mwptest database. Note that this process may take some time to complete, depending on the size of your database.

  1. Type optimizedb -zc -zk mwptest and <enter> (and yes, it is spelled with a ‘z’)
  1. Type sysmod mwptest and <enter>
  2. Type exit and <enter> to close the admin command prompt screen

If you are refreshing the test database as part of a parallel run program, you now need to change to the folder to where the amended data files are stored, and run the script created to alter the data tables involved.

Users will be able to log into the Test system using the relevant icon created when the Test database was first created. If you don’t have that icon, your Fusion5 consultant will need to assist in getting it set up (the first time only).