table backup/restore question
Posted in 1993
I tried to post this article yesterday however I doubt it made it outside
our site since our news system is flakey. Sorry if this is a re-post.
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?
I could do something like the following but I would rather have the
database system do it for me:
Backup:
select * from <table> > <tmpFile>
tar cfv <devName> <tmpFile>
Restore:
tar xfv <devName>
insert into <table> values < <tmpFile>
Any advice as to what I could use would be appreciated.
ADVthanksANCE,
-----------------------------------------------------------------------------
John Koper | jrk@tcs.com
Software Engineer | 2121 Allston Way, Berkeley, CA 94704
Teknekron Communications Systems, Inc. | (510) 649-3592