Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
2d114130
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2d114130
编写于
11月 07, 2017
作者:
D
dyozie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Docs - add info about filtering leaf partitions with gpbackup
上级
329af947
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
74 addition
and
9 deletion
+74
-9
gpdb-doc/dita/admin_guide/managing/backup-gpbackup.xml
gpdb-doc/dita/admin_guide/managing/backup-gpbackup.xml
+57
-2
gpdb-doc/dita/utility_guide/admin_utilities/gpbackup.xml
gpdb-doc/dita/utility_guide/admin_utilities/gpbackup.xml
+17
-7
未找到文件。
gpdb-doc/dita/admin_guide/managing/backup-gpbackup.xml
浏览文件 @
2d114130
...
...
@@ -20,9 +20,10 @@
format=
"dita"
/>
for more information.) Storing the table data in CSV files also provides
opportunities for using other restore utilities, such as
<codeph>
gpload
</codeph>
, to load the
data either in the same cluster or another cluster. By default, one file is created for each
table on the segment. You can specify the
<codeph>
-leaf-partition-data
</codeph>
option with
table on the segment. You can specify the
<codeph>
-leaf-partition-data
</codeph>
option with
<codeph>
gpbackup
</codeph>
to create one data file per leaf partition of a partitioned table,
instead of a single file.
</p>
instead of a single file. This option also enables you to filter backup sets by leaf
partitions.
</p>
<p>
Each
<codeph>
gpbackup
</codeph>
task uses a single transaction in Greenplum Database. During
this transaction, metadata is backed up on the master host, and data for each table on each
segment host is written to CSV backup files using
<codeph>
COPY .. ON SEGMENT
</codeph>
commands
...
...
@@ -41,6 +42,10 @@
requires a distinct timestamp.
</li>
<li>
Database object filtering is currently limited to schemas and tables.
</li>
<li>
Filtering objects with
<codeph>
gprestore
</codeph>
is not yet supported.
</li>
<li>
You cannot use the
<codeph>
-exclude-table-file
</codeph>
with
<codeph>
-leaf-partition-data
</codeph>
. Although you can specify leaf partition names
in a file specified with
<codeph>
-exclude-table-file
</codeph>
,
<codeph>
gpbackup
</codeph>
ignores the partition names.
</li>
<li>
Incremental backups are not supported.
</li>
</ul></p>
</body>
...
...
@@ -231,6 +236,56 @@ water.tonic</codeblock></p>
<codeph>
gpbackup
</codeph>
options
<codeph>
-include-table-file
</codeph>
and
<codeph>
-exclude-table-file
</codeph>
. For
example:
<codeblock>
$
<b>
gpbackup -dbname demo -include-table-file /home/gpadmin/table-list.txt
</b></codeblock></p>
<section
id=
"section_ddf_gyn_5bb"
>
<title>
Filtering by Leaf Partition
</title>
<p>
By default,
<codeph>
gpbackup
</codeph>
creates one file for each table on a segment. You
can specify the
<codeph>
-leaf-partition-data
</codeph>
option with to create one data file
per leaf partition of a partitioned table, instead of a single file. This option also
enables you to filter backups to specific leaf partitions by listing the partition names
in a text file to include. For example, consider a table that was created using the
statement:
<codeblock>
demo=#
<b>
CREATE TABLE sales (id int, date date, amt decimal(10,2))
DISTRIBUTED BY (id)
PARTITION BY RANGE (date)
( PARTITION Jan17 START (date '2017-01-01') INCLUSIVE ,
PARTITION Feb17 START (date '2017-02-01') INCLUSIVE ,
PARTITION Mar17 START (date '2017-03-01') INCLUSIVE ,
PARTITION Apr17 START (date '2017-04-01') INCLUSIVE ,
PARTITION May17 START (date '2017-05-01') INCLUSIVE ,
PARTITION Jun17 START (date '2017-06-01') INCLUSIVE ,
PARTITION Jul17 START (date '2017-07-01') INCLUSIVE ,
PARTITION Aug17 START (date '2017-08-01') INCLUSIVE ,
PARTITION Sep17 START (date '2017-09-01') INCLUSIVE ,
PARTITION Oct17 START (date '2017-10-01') INCLUSIVE ,
PARTITION Nov17 START (date '2017-11-01') INCLUSIVE ,
PARTITION Dec17 START (date '2017-12-01') INCLUSIVE
END (date '2018-01-01') EXCLUSIVE );
</b>
NOTICE: CREATE TABLE will create partition "sales_1_prt_jan17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_feb17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_mar17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_apr17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_may17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_jun17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_jul17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_aug17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_sep17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_oct17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_nov17" for table "sales"
NOTICE: CREATE TABLE will create partition "sales_1_prt_dec17" for table "sales"
CREATE TABLE
</codeblock></p>
<p>
To back up only data for the last quarter of the year, first create a text file that
lists those leaf partition names instead of the full table
name:
<codeblock>
public.sales_1_prt_oct17
public.sales_1_prt_nov17
public.sales_1_prt_dec17
</codeblock>
</p>
<p>
Then specify the file with the
<codeph>
-include-table-file
</codeph>
option, and also
specify
<codeph>
-leaf-partition-data
</codeph>
to generate one data file per leaf
partition:
<codeblock>
$
<b>
gpbackup -dbname demo -include-table-file last-quarter.txt -leaf-partition-data
</b></codeblock></p>
<note>
You cannot use the
<codeph>
-exclude-table-file
</codeph>
with
<codeph>
-leaf-partition-data
</codeph>
. Although you can specify leaf partition names in
a file specified with
<codeph>
-exclude-table-file
</codeph>
,
<codeph>
gpbackup
</codeph>
ignores the partition names.
</note>
</section>
</body>
</topic>
<topic
id=
"topic_qwd_d5d_tbb"
>
...
...
gpdb-doc/dita/utility_guide/admin_utilities/gpbackup.xml
浏览文件 @
2d114130
...
...
@@ -106,9 +106,13 @@
backup. Each line in the text file must define a single table using the format
<codeph>
<
schema-name>.
<
table-name>
</codeph>
. The file must not include trailing
lines. If a table or schema name uses any character other than a lowercase letter,
number, or an underscore character, then you must include that name in double quotes.
See
<xref
href=
"../../admin_guide/managing/backup-gpbackup.xml#topic_et4_b5d_tbb"
/>
for
more information.
</pd>
number, or an underscore character, then you must include that name in double quotes.
</pd>
<pd>
You cannot use this option in combination with
<codeph>
-leaf-partition-data
</codeph>
.
Although you can specify leaf partition names in a file specified with
<codeph>
-exclude-table-file
</codeph>
,
<codeph>
gpbackup
</codeph>
ignores the partition
names.
</pd>
<pd>
See
<xref
href=
"../../admin_guide/managing/backup-gpbackup.xml#topic_et4_b5d_tbb"
/>
for more information.
</pd>
</plentry>
</parml>
<parml>
...
...
@@ -133,16 +137,22 @@
<codeph>
<
schema-name>.
<
table-name>
</codeph>
. The file must not include trailing
lines. If a table or schema name uses any character other than a lowercase letter,
number, or an underscore character, then you must include that name in double quotes.
Any tables not listed in this file are omitted from the backup set. See
<xref
href=
"../../admin_guide/managing/backup-gpbackup.xml#topic_et4_b5d_tbb"
/>
for more
information.
</pd>
Any tables not listed in this file are omitted from the backup set.
</pd>
<pd>
You can optionally specify a table leaf partition name in place of the table name, to
include only specific leaf partitions in a backup with the
<codeph>
-leaf-partition-data
</codeph>
option.
</pd>
<pd>
See
<xref
href=
"../../admin_guide/managing/backup-gpbackup.xml#topic_et4_b5d_tbb"
/>
for more information.
</pd>
</plentry>
</parml>
<parml>
<plentry>
<pt><b>
-leaf-partition-data
</b></pt>
<pd>
Optional. For partitioned tables, creates one data file per leaf partition instead of
one data file for the entire table (the default).
</pd>
one data file for the entire table (the default). Using this option also enables you to
specify individual leaf partitions to include in a backup, with the
<codeph>
-include-table-file
</codeph>
option. You cannot use this option in combination
with
<codeph>
-exclude-table-file
</codeph>
.
</pd>
</plentry>
</parml>
<parml>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录