psdi.configure

Class RestoreFromBackup

  • All Implemented Interfaces:
    UpgConstants


    public class RestoreFromBackup
    extends CommonShell
    implements UpgConstants
    Restore from Backup Tables utility. This is used after we configured the database, changing one or more tables in such a manner that we now have backup tables with data ("XX" + tbname), and empty base tables. This program copies the data from the backup tables to the base tables and makes sure the triggers are in the correct state. It changes the value of "restoredata" from True to False.

    This runs independently of MXServer. MXServer should NOT be running at the same time as this program, otherwise the database may be changing at the same time that this program is trying to determine what to output.

    This program is also run as part of the upgrade process, when called by Upgrade.

    The commandline parameters for RestoreFromBackup are as follows, in addition to those in the superclass CommonShell.

    Parameter IDParameter ValueDescription
    -g(none)This is optional. It indicates that this class has been instanciated by the Upgrade.
    -r(none)This is optional. It indicates that the backup tables will be dropped by this program after the tables have been restored. If not specified, then the backup table must be dropped in a separate step by the DropBackup program.
    -tTable names delimited by commasThis is optional. If this parameter is used, then the names of the Maximo tables to be restored will appear after this parameter, delimited by commas. For example: -tITEM,TOOL,WORKORDER
    If not specified, then all tables that are eligible to be restored will be restored.
    -z(none)The -z parameter is used ONLY for DB2. When the -z parameter is used and this is DB2, then the logic that enables text search for all tables is not performed from RestoreFromBackup. Instead, RestoreFromBackup will output a script containing all the relevant commands. The script name is db2text_restorefrombackup.bat, and it is output to the same directory as the logfile. A second script, db2text_restorefrombackup.sh, is output for Unix shell script.

    The reason this parameter is provided is because in DB2, text search procedures cannot be initiated from a remote machine. If RestoreFromBackup is run on a different machine than the machine where the database is located, it cannot run the text search commands. They will have to be run manually by a user on the database's machine by using the script output by RestoreFromBackup.

    See Also:
    CommonShell, ConfigDB, DropBackup
    • Field Detail

      • db2TextFile

        protected java.io.File db2TextFile
        The output file when using the -z parameter.
      • db2TextOut

        protected java.io.PrintStream db2TextOut
        The print stream when using the -z parameter.
      • db2TextFile2

        protected java.io.File db2TextFile2
        Second output file when using the -z parameter.
      • db2TextOut2

        protected java.io.PrintStream db2TextOut2
        Second print stream when using the -z parameter.
    • Constructor Detail

      • RestoreFromBackup

        public RestoreFromBackup()
        This constructor does nothing. Used when running from the DOS prompt.
      • RestoreFromBackup

        public RestoreFromBackup(MXServer server)
        This constructor accepts parameter for MXServer and sets value for mxs. Used when invoked from the Config application.