Re: table backup/restore question
Posted in 1993
Quoting John Koper...
}
} I would like to be able to backup/restore a database table to/from a
} tarfile (actually any type of file but a tarfile is preferred).
}
} Informix provides the utilities 'dbexport' (which unloads a database into
} an ASCII file) and 'dbimport' (which creates a database from ASCII files).
} These programs read/write directly to a tape device but down/up-load the
} whole database (not an individual table). Is there an Informix mechanism
} that will allow me to backup/restore an individual table?
}
You could use my "dbloader" & "dbunloader" utilities...
Syntax:
dbunloader -d dbname -t tabname | isql dbname -
dbloader -d dbname -t tabname >script.sql
The first command unloads a single table to an ASCII unload file, the second
command creates an sql statement that reloads the data back into the table.
With a shell wrapper and the above commands, you could easily write dbimport
and dbexport.
DAS
--
David Snyder @ Snide Computer Services - Folcroft, PA Current Release
is db4glgen-3.9
UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com