4. Administering a FrontBase Server
4.9. Backup and Restore
Table of Contents
FrontBase allows you to export a complete database to flat files. The SQL statement has the following syntax:
WRITE ALL OUTPUT('<output-directory>' [,'YES']);
All generated files will be saved in the specified
<output-directory>/schema.sqlcontains SQL statements necessary to recreate the database. If
'YES'argument is supplied, a file for each base table will be generated as well. Each base table file holds the content data (rows) for the table. The
<output-directory>/schema.sqlfile will include the necessary import statements.
Note that it is important to capitalize
'YES'if that option is used. This should be corrected in a future version of FrontBase.
A flat file holding the content data for a given table has the following lay-out:
Line 1: <schema name>.<table name>
Line 2: Column count
Line 3: <column #> <column name>,"~"
Line 4: ...
Line n: <column #> <column name>,"~\n"
-- n-2 == column count
Line n+1: <row data>
Line n+2: -"-
A database with a single user,
FB, and a single table ,
T0, exported as:
WRITE ALL * OUTPUT('/tmp/db5', 'YES');
CREATE USER "FB";
CREATE SCHEMA "FB" AUTHORIZATION "FB";
CREATE TABLE "T0" (
SET SESSION AUTHORIZATION "FB";
INSERT INTO "FB"."T0" FROM 'FrontBase' INPUT('/tmp/db5/2_13');
If you have feedback or questions on this document, please send e-mail to firstname.lastname@example.org. Please reference the section number and topic. Thanks!!
©2000 FrontBase, Inc. All rights reserved.