COPYDB(1)

NAME
copydb - create batch files to copy and restore an INGRES database

SYNOPSIS
copydb [-u name] database directory [relation ...]

DESCRIPTION
The copydb utility creates two INGRES command files in the specified directory:

copy.out
    Contains QUEL instructions which will copy all relations owned by the user into files in the named directory.

copy.in
    Contains instructions to copy the files back into relations, create indexes, and do modifies.

The files will have the same names as the relations with the user's INGRES ID appended.

directory is the full pathname of the directory where the backup files will be stored. This directory must not be the same as the database directory, as the files have the same names as the relation files.

If relation names are specified, only those relations will be included in the copy files.

The options are as follows:

-u name
    Run copydb with a different user ID. Note that creating the copy files does not imply that the user can necessarily access the specified relations.

The copydb utility is written in EQUEL and will access the database in the usual manner. It does not have to run as the INGRES user.

EXAMPLES

    cd /mnt/mydir
    copydb db /mnt/mydir/backup
    ingres db < backup/copy.out

To restore:

    ingres db < backup/copy.in

DIAGNOSTICS
The copydb utility provides self-explanatory diagnostics. If “too many indexes” is reported, it means that more than ten indexes have been specified on one relation. The constant can be increased and the program recompiled. Other limits are set to the system limits.

SEE ALSO
equel(1), ingres(1)

BUGS
The copydb utility assumes that indexes which are ISAM do not need to be re-modified.

The copydb utility cannot tell if a relation was modified with a fillfactor or minpages specification. The copy.in file may be edited to reflect this.

HISTORY
Originally part of UC Berkeley INGRES 8.9 (1988).