home‎ > ‎restore‎ > ‎

restore hot

Copy the contents of the source instance into the destination instance. Starts an ontape to standard out on the source instance and pipes it to a restore on the destination instance. The source instance must be online during the copy.

usage

infx restore type=hot inst source [ rename force=yes|no online=yes|no ]
     hot copy from another instance
       required:
         inst - instance name
         source - the instance to copy from
       optional:
         rename - the name of a file containing chunk mapping
         force - force the instance offline first
         online - bring the instance online after

example

Copy the contents off instance demo1 to a new instance, demo1b. infx will automatically rename the chunk files.

demo1b@bobii:/home/informix>infx restore demo1b type=hot source=demo1

onclean: Cleaning up processes and resources for 'demo1b'...
onclean: Cannot open the file /infx/inst/demo1b/informixdir/etc/.conf.demo1b.
Ensure that the value of the INFORMIXSERVER environment variable
matches the value of the DBSERVERNAME configuration parameter
from your onconfig file.
Using the backup and restore filter gzip -dc.

Archive Tape Information

Tape type:      Archive Backup Tape
Online version: IBM Informix Dynamic Server Version 11.70.FC4IE
Archive date:   Tue Mar 20 09:22:35 2012
User id:        informix
Terminal id:    ?
Archive level:  0
Tape device:    STDIO
Tape blocksize (in k): 32
Tape size (in k): 0
Tape number in series: 1
Backup filter:  gzip -c

Spaces to restore:1 [root                                       ]
2 [blob01                                                       ]
3 [plog                                                         ]
4 [log01                                                        ]
5 [log02                                                        ]
6 [dat01                                                        ]
7 [dat02                                                        ]
8 [dat03                                                        ]
9 [dat04                                                        ]
10 [idx01                                                       ]
11 [idx02                                                       ]
12 [idx03                                                       ]
13 [idx04                                                       ]
14 [ltmp01                                                      ]
15 [sblob01                                                     ]

Archive Information

IBM Informix Dynamic Server Copyright 2001, 2011  IBM Corporation.
Initialization Time       02/18/2012 14:44:10
System Page Size          2048
Version                   26
Index Page Logging        ON since 02/18/2012 14:44:10
Archive CheckPoint Time   03/20/2012 09:22:36

Dbspaces
number   flags    fchunk   nchunks  flags    owner                            name
1        40001    1        2        N  BA    informix                         root
2        40001    2        1        N  BA    informix                         plog
3        40001    3        1        N  BA    informix                         log01
4        40001    4        1        N  BA    informix                         log02
5        40001    5        1        N  BA    informix                         dat01
6        40001    6        1        N  BA    informix                         dat02
7        40001    7        1        N  BA    informix                         dat03
8        40001    8        1        N  BA    informix                         dat04
9        40001    9        1        N  BA    informix                         idx01
10       40001    10       1        N  BA    informix                         idx02
11       40001    11       1        N  BA    informix                         idx03
12       40001    12       1        N  BA    informix                         idx04
13       42001    13       1        N TBA    informix                         tmp01
14       42001    14       1        N TBA    informix                         tmp02
15       40001    15       1        N  BA    informix                         ltmp01
16       40011    16       1        N BBA    informix                         blob01
17       48001    17       3        N SBA    informix                         sblob01


Chunks
chk/dbs offset   size     free     bpages   flags pathname
1   1   0        100000   92535             PO-BE /infx/inst/demo1/chks/root.001
2   2   0        50000    2447              PO-B- /infx/inst/demo1/chks/plog.000
3   3   0        50000    447               PO-B- /infx/inst/demo1/chks/log01.000
4   4   0        50000    447               PO-B- /infx/inst/demo1/chks/log02.000
5   5   0        50000    13738             PO-B- /infx/inst/demo1/chks/dat01.000
6   6   0        12500    12447             PO-B- /infx/inst/demo1/chks/dat02.000
7   7   0        12500    12447             PO-B- /infx/inst/demo1/chks/dat03.000
8   8   0        12500    12447             PO-B- /infx/inst/demo1/chks/dat04.000
9   9   0        50000    20631             PO-B- /infx/inst/demo1/chks/idx01.000
10  10  0        12500    12447             PO-B- /infx/inst/demo1/chks/idx02.000
11  11  0        12500    12447             PO-B- /infx/inst/demo1/chks/idx03.000
12  12  0        12500    12447             PO-B- /infx/inst/demo1/chks/idx04.000
13  13  0        12500    12422             PO-B- /infx/inst/demo1/chks/tmp01.000
14  14  0        12500    12447             PO-B- /infx/inst/demo1/chks/tmp02.000
15  15  0        12500    12447             PO-B- /infx/inst/demo1/chks/ltmp01.000
16  16  0        12500             3125     POBB- /infx/inst/demo1/chks/blob01.000
17  17  0        12500    559               POSB- /infx/inst/demo1/chks/sblob01.000
18  17  0        10000    0                 POSB- /infx/inst/demo1/chks/sblob01.001
19  17  10000    10000    7500              POSB- /infx/inst/demo1/chks/sblob01.001
20  1   0        12500    11773             PO-B- /infx/inst/demo1/chks/pool.002


Program over.

Bring the destination instance online after the copy.

demo1b@bobii:/home/informix>infx restore demo1b type=hot source=demo1 online=yes

notes

The source and destination instance must have the same configuration and software versions. See the 
Informix Backup & Restore Guide for complete details.

The basic requirements are:
  • ONCONFIG values must match between the source and destination instance
    • ROOTPATH
    • ROOTNAME
    • ROOTOFFSET
    • MIRROR
  • Depending on the type of backup, these may also be required to match:
    • TAPEBLK
    • TAPESIZE
    • LTAPEBLK
    • LTAPESIZE
  • If the ROOTPATH differs, a renamed restore must be performed
    • specify a chunk rename file on the command line rename=
    • let infx automatically rename chunks as part of the restore
  • If the source instance is on another host, ssh keys must be setup to execute the source backup service.

chunk renaming

When copying from one infx instance to another, infx can automatically rename the chunks. This is simply a matter
of taking the source chunk path, and doing a substitution of the instance name.

/infx/inst/infx01/chks/root.001 maps to /infx/inst/infx02/chks/root.001
/infx/inst/infx01/chks/infx01.001 maps to /infx/inst/infx02/chks/infx02.001

If the mapped chunk path does not exist, infx attempts to create this file. This is done by executing the INFXCHUNK
config param to create the missing chunk. By default, INFXCHUNK is set to /bin/touch. 

If you want the restore to fail when chunk files are missing, set INFXCHUNK=/bin/false in config.ini

Otherwise, use a custom INFXCHUNK script to create missing files for you. The restore service will invoke it with the
full mapped chunk path as the only parameter.