Read Me
dbtar Manupilation
===================
This Readme describes how to use dbtar software . For more information, refer to the dbtar documentation.
In fact, dbtar is a softaware which allow :
1- The migration of data between two differents databases (in terms of type of DBMS (MAXDB, TRANSBASE, Oracle, Postgres, MySQL,) or version)
2- Backup / restoration of databases
The Current version of dbtar allow the migration, backup, restoration of databases from MAXDB database to MAXDB.
In the following, We give an overview on the use of dbtar :
1- Migration of data from database to data files :
1.1- How to migrate a table from the database to a ddf file :
TYPE :
./migrate_from <Url> <DBname> <Username> <Passwd> -D <Directory> -o <Owner> -r <TabName1> <TabName2> <TAbName3> ... <TabNameN>
WITH :
Url : URL of the database
DBname : Database name
Username : Database username
Passwd : Databasepassword
Directory : Directory of data files ( in default configuration == . )
Owner : Table Owner
TabName1 : Table1 Name
TabName2 : Table2 Name
.
.
TabNameN : TableN Name
For further information, you can see the following examples :
./migrate_from "DBSERVER" "DBNAME" "USER" "PASSWD" -D . -o "TABLE OWNER" -r "TABNAME"
After execution you will receive in the terminal :
"
select * from 'TABNAME'
'TABNAME' in reading..................
file 1/1 : 'TABNAME' is written with success. "
"
1.2- How to migrate all tables at once :
TYPE :
./migrate_from <Url> <DBname> <Username> <Passwd> -D <Directory> -o <Owner> -R
With :
Url, DBname, Username, Passwd, Directory, Owner are explained above
-R option : Read all tables from database
2- Migration of data from data files to database :
2.1- How to migrate a table from the ddf file to database :
TYPE :
./migrate_to <Url> <DBname> <Username> <Passwd> -D <Directory> -o <Owner> -w <TabName1> <TabName2> <TAbName3> ... <TabNameN>
With :
Url : URL of the database
DBname : Database name
Username : Database username
Passwd : Databasepassword
Directory : Directory of data files ( in default configuration == . )
Owner : Table Owner
TabName1 : Table1 Name
TabName2 : Table2 Name
.
.
TabNameN : TableN Name
For further information, you can see the following examples :
./migrate_to "DBSERVER" "DBNAME" "USER" "PASSWD" -D . -o "TABLE OWNER" -w "TABNAME"
After execution you will receive in the terminal :
" INSERT INTO 'TABNAME' VALUES (?,?,?,?)
OK
IMPORTING DATA TO 'TABNAME'
file 1/1 : 'TABNAME' is written with success
"
2.2- How to migrate all tables at once
TYPE
./migrate_to <Url> <DBname> <Username> <Passwd> -D <Directory> -o <Owner> -W
With :
* Url, DBname, Username, Passwd, Directory, Owner are explained above
* -W option : Write all tables into database
3- Further options :
-a <Number> : Set the maximum number of seconds to wait before retrying a transaction after it has aborted, this option is used to minimize the time lost due to bad connexion to the SGBD
Also you can use :
-i<Number> : Set the minimum number of seconds to wait before retrying a transaction after it has aborted, note that this option could not be used without -a option
-t<Number> : Set the trace level to print database queries before execution (0: none, 1: all but FETCH, 2: all)