tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tajo Wiki] Update of "BackupAndRestore" by HyunsikChoi
Date Fri, 04 Oct 2013 08:16:04 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tajo Wiki" for change notification.

The "BackupAndRestore" page has been changed by HyunsikChoi:
https://wiki.apache.org/tajo/BackupAndRestore

Comment:
Add a manual for tajo_dump.

New page:
== Catalog Backup and Restore ==
Now, Tajo supports a two backup methods for catalog:
 * SQL dump
 * Database-level backup

=== SQL dump ===

SQL dump is an easy and strong way. If you use this approach, you don't need to concern database-level
compatiblities. If you want to backup your catalog, just use bin/tajo_dump command. The basic
usage of this command is:
{{{
$ tajo_dump table_name > outfile
}}}

For example, if you want to backup a table ''customer'', you should type a command as follows:
{{{
$ bin/tajo_dump customer > table_backup.sql
$ cat table_backup.sql
-- Tajo database dump
-- Dump date: 10/04/2013 16:28:03
--

--
-- Name: customer; Type: TABLE; Storage: CSV
-- Path: file:/home/hyunsik/tpch/customer
--
CREATE EXTERNAL TABLE customer (c_custkey INT8, c_name TEXT, c_address TEXT, c_nationkey INT8,
c_phone TEXT, c_acctbal FLOAT8, c_mktsegment TEXT, c_comment TEXT) USING CSV LOCATION 'file:/home/hyunsik/tpch/customer';
}}}

If you want to restore the catalog from the SQL dump file, please type the below command:
{{{
$ bin/tsql -f table_backup.sql
}}}

If you use an option '-a', tajo_dump will dump all table DDLs.
{{{
$ bin/tajo_dump -a > all_backup.sql
}}}

=== Database-level backup ===

Mime
View raw message