restore_communiware
SYNOPSIS
restore_communiware --list
restore_communiware [options] version
DESCRIPTION
Script intended for restoring data saved after backup_communiware
work. These data are: Communiware database schema and data except ones related to search subsystem,
search schema and data, pictures (and othes static files)
and users passwords, if this feature is enabled.
See description of backup_communiware
script for more detailed explain.
Data are restored from some backup version. Version is prefix of stored files,
such as 2002.05.20_11.12.13
. All available version are listed via --list option.
All the other options control restore process.
It is possible to restore database objects (such as main data or search data) not into the same database but into ``parallel'' one as well as create new database spetial for restoring. Pictures and passwords also can be restored into alternate location.
OPTIONS
- --list
- Print list of available backup versions and exit.
- --data[=area]
- Unless area is set this option is used for restoring main Communiware schema and data. For PostgreSQL - also search schema. ``Area'' can take values:
- full
- Default value, restore all data.
- items
-
Restore ``items'' data only. This means restore amount of data enought for
dump_item
utilite working. ITEM_REL table, extended attributes tables and ``table values'' tables are not restored. Use--itemtype
option for extended data restoring, usehier
value of this option to ITEM_REL table restoring. - hier
-
The same as
items
but ITEM_REL table is restored. - --search
- Restore search data (for Oracle: and search schema).
- --searchschema (for Oracle only)
- Restore search schema but without data in it.
- --pictures
- Restore pictures and static objects.
- --passwords
- Restore users passwords.
- --all
- Restore all kinds of data - data, pictures etc, all above.
- --itemtype=<TYPE,...>
-
This option tells to restore extended data (extended attribute tables and / or
``table value'' tables) for given types. Several comma separated valid item types can be
listed as well as several
--itemtype
options can be presented in command line. - --dir=<dirname>
- Set directory with backup files. Default is BACKUPDIR.
- --createuser
-
Create database user before restoring. User parameters (name, password)
are taken from config file but may be overwritten by
--dbuser
and--dbpassword
options. - --createdb
- PostgreSQL
-
Create database before data restoring. Name of database is taken from config
file but may be owerwrittem by
--database
option. - Oracle
- Under Oracle this option does nothing.
- --dropuser
- Drop database user before restoring.
- --dropdb
- PostgreSQL
- Drop database before restoring.
- Oracle
- Under Oracle this option does nothing.
- --toother
- This option tells that we restore not into original but into ``parallel'' database. It forces some additional options check: all database parameters must be set in command line, and must not comply with ``original'' database parameters.
- --dbuser=<username>
- Set username for connecting to database. Default - DBUSER. If database is created during restore this user will own it.
- --dbpassword
- Password of dbuser, default - DBPASS.
- --database=<dbname>
- Name of database to connect / create. Default - DBNAME.
- --picdir=<dirname>
- Name of directory to restore images into. Default - PICDIR. If this directory does not exist it is created.
- --passwdfile=<file_or_dirname>
-
Name of directory or file to restore passwords into. If this name corresponds
to directory then passwords are restored into file
passwd
in this directory. - --outconf=<conffilename>
-
With this option utilite creates alternate file in
cmw.conf
format for working with alternate database. This file can be used together different utilites, such asdump_item
.
Be attentive! If you set --data
option without arguments and it is the last
option in command line immediately (before version number) you must follow it by
double dash:
restore_communiware --data -- 2002.09.10_16.26.14
If needed script asks (only once!) database superuser password.
EXAMPLES
restore_communiware --all --createuser --createdb 2002.01.01_12.23.34
Full data restore. All parameters are taken from config file. User and database are created before restoring.
restore_communiware --pictures 2002.01.01_12.23.34
Restore only pictures data into ``standard'' directory.
restore_communiware --pictures --picdir=/usr/some/where \ 2002.01.01_12.23.34
Restore pictures data into alternate location.
restore_communiware --data=items --createdb \ --database=cmw2 \ --outconf=/some/where/r.conf \ 2002.01.01_12.23.34
Create new database (owned by the same user as Communiware database) and
restore into it data for future item dumping. dump_item
utilite may
be used with written config file as
dump_item -c /some/where/r.conf <other args>
restore_communiware --data=hier --createdb \ --database=cmw2 \ --outconf=/some/where/r.conf \ 2002.01.01_12.23.34
Almost the same as in previous example, but data about items hierachies
are restored too. This gives possibility to use -d
and -D
options
of dump_item
utilite for dumping sets of items.