-
Notifications
You must be signed in to change notification settings - Fork 78
Add --exclude-snapshots option, which makes exclude pg_logical/snapshots #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -660,6 +660,12 @@ <h2>バックアップ・オプション</h2> | |||||
<li>バックアップ済みのサーバログの保持期限を指定します。<code>--keep-srvlog-files</code> では保存ファイル数を、<code>--keep-srvlog-days</code> では保存日数を指定します。これらのオプションを明示的に指定した場合、閾値を超えたファイルがサーバログが保存されるディレクトリ (log_directory) から削除されます。 本オプションは、<code>--with-serverlog</code>、<code>--srvlog-path</code> を指定してバックアップを取得した場合に限ります。 これらのオプションを同時に指定した場合は両方の閾値を超えたファイルが削除されます。</li> | ||||||
</ul> | ||||||
</li> | ||||||
<li><strong><code>--exclude-snapshots</code></strong> | ||||||
|
||||||
<ul> | ||||||
<li>一時ファイル用に使われる <code>pgsql_tmp</code> ディレクトリ内と、ロジカルレプリケーションで使われる <code>snapshots</code> ディレクトリ内をバックアップ対象から除外します。</li> | ||||||
</ul> | ||||||
</li> | ||||||
</ul> | ||||||
|
||||||
|
||||||
|
@@ -1071,6 +1077,14 @@ <h1 id="waytopassoptions">パラメータの指定方法</h1> | |||||
<td>アーカイブWALのリストア方法</td> | ||||||
<td>環境変数、設定ファイルにはboolean型で指定</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td></td> | ||||||
<td>–exclude-snapshots</td> | ||||||
<td>EXCLUDE_TMPDIR</td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This env name is confuse us.
Suggested change
|
||||||
<td>指定可</td> | ||||||
<td>ロジカルスナップショットをバックアップから除外</td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure "ロジカルスナップショット" is general representation.
Suggested change
|
||||||
<td>環境変数、設定ファイルにはboolean型で指定</td> | ||||||
</tr> | ||||||
</tbody> | ||||||
</table> | ||||||
|
||||||
|
@@ -1472,4 +1486,4 @@ <h1 id="seealso">関連項目</h2> | |||||
<p class="footer">Copyright (c) 2009-2023, NIPPON TELEGRAPH AND TELEPHONE CORPORATION</p> | ||||||
|
||||||
</body> | ||||||
</html> | ||||||
</html> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -651,6 +651,12 @@ <h2>Backup options</h2> | |||||
<li>Specify how long backuped serverlog files will be kept. <code>--keep-srvlog-files</code> means number of files. <code>--keep-srvlog-days</code> means days to be kept. When you do backup, only files exceeded specified condition are deleted from server log directory (log_directory). This option works when you specify <code>--with-serverlog</code> and <code>--srvlog-path</code> options in backup command. If these two options are given toghether, pg_rman deletes files which are old enough against both conditions.</li> | ||||||
</ul> | ||||||
</li> | ||||||
<li><strong><code>--exclude-snapshots</code></strong> | ||||||
|
||||||
<ul> | ||||||
<li>Exclude <code>snapshots</code> directory, which is used for logical replication.</li> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</ul> | ||||||
</li> | ||||||
</ul> | ||||||
|
||||||
|
||||||
|
@@ -1062,6 +1068,14 @@ <h1 id="waytopassoptions">Way to pass options</h1> | |||||
<td>how to restore archive WAL</td> | ||||||
<td>specify boolean type in environmental variable or configuration file</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td></td> | ||||||
<td>–exclude-snapshots</td> | ||||||
<td>EXCLUDE_TMPDIR</td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
<td>Yes</td> | ||||||
<td>Exclude logical snapshots from backup</td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure "logical snapshots" is general representation.
Suggested change
|
||||||
<td>specify boolean type in environmental variable or configuration file</td> | ||||||
</tr> | ||||||
</tbody> | ||||||
</table> | ||||||
|
||||||
|
@@ -1462,4 +1476,4 @@ <h1 id="seealso">See Also</h2> | |||||
<p class="footer">Copyright (c) 2009-2023, NIPPON TELEGRAPH AND TELEPHONE CORPORATION</p> | ||||||
|
||||||
</body> | ||||||
</html> | ||||||
</html> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -40,6 +40,7 @@ Backup options: | |||||
--keep-srvlog-days=DAY keep serverlog modified in DAY days | ||||||
--standby-host=HOSTNAME standby host when taking backup from standby | ||||||
--standby-port=PORT standby port when taking backup from standby | ||||||
--exclude-snapshots exclude pg_logical/snapshots | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
Restore options: | ||||||
--recovery-target-time time stamp up to which recovery will proceed | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,6 +17,7 @@ | |||||||||||||||||||||||||||||||||||||||
const char *PROGRAM_VERSION = "1.3.16"; | ||||||||||||||||||||||||||||||||||||||||
const char *PROGRAM_URL = "http://github.com/ossc-db/pg_rman"; | ||||||||||||||||||||||||||||||||||||||||
const char *PROGRAM_ISSUES = "http://github.com/ossc-db/pg_rman/issues"; | ||||||||||||||||||||||||||||||||||||||||
const char *SNAPSHOTS_DIR = "snapshots"; | ||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should be below. Lines 27 to 45 in d1b5c57
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
/* path configuration */ | ||||||||||||||||||||||||||||||||||||||||
char *backup_path; | ||||||||||||||||||||||||||||||||||||||||
|
@@ -32,6 +33,7 @@ bool check = false; | |||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
/* directory configuration */ | ||||||||||||||||||||||||||||||||||||||||
pgBackup current; | ||||||||||||||||||||||||||||||||||||||||
static bool exclude_snapshots = false; | ||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is backup configuration. For example, directory options are -D, -A, -B, -S, and -G. |
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
/* backup configuration */ | ||||||||||||||||||||||||||||||||||||||||
static bool smooth_checkpoint; | ||||||||||||||||||||||||||||||||||||||||
|
@@ -97,6 +99,7 @@ static pgut_option options[] = | |||||||||||||||||||||||||||||||||||||||
{ 's', 10, "recovery-target-timeline" , &target_tli_string, SOURCE_ENV }, | ||||||||||||||||||||||||||||||||||||||||
{ 's', 11, "recovery-target-action" , &target_action , SOURCE_ENV }, | ||||||||||||||||||||||||||||||||||||||||
{ 'b', 12, "hard-copy" , &is_hard_copy , SOURCE_ENV }, | ||||||||||||||||||||||||||||||||||||||||
{ 'b', 15, "exclude-snapshots", &exclude_snapshots, SOURCE_ENV }, | ||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is backup configuration. |
||||||||||||||||||||||||||||||||||||||||
/* catalog options */ | ||||||||||||||||||||||||||||||||||||||||
{ 'b', 'a', "show-all" , &show_all }, | ||||||||||||||||||||||||||||||||||||||||
{ 0 } | ||||||||||||||||||||||||||||||||||||||||
|
@@ -209,6 +212,10 @@ main(int argc, char *argv[]) | |||||||||||||||||||||||||||||||||||||||
pgdata_exclude[i++] = arclog_path; | ||||||||||||||||||||||||||||||||||||||||
if (srvlog_path) | ||||||||||||||||||||||||||||||||||||||||
pgdata_exclude[i++] = srvlog_path; | ||||||||||||||||||||||||||||||||||||||||
if (exclude_snapshots) | ||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||
pgdata_exclude[i++] = SNAPSHOTS_DIR; | ||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||
Comment on lines
+215
to
+218
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
/* do actual operation */ | ||||||||||||||||||||||||||||||||||||||||
if (pg_strcasecmp(cmd, "init") == 0) | ||||||||||||||||||||||||||||||||||||||||
|
@@ -289,6 +296,7 @@ pgut_help(bool details) | |||||||||||||||||||||||||||||||||||||||
printf(_(" --keep-srvlog-days=DAY keep serverlog modified in DAY days\n")); | ||||||||||||||||||||||||||||||||||||||||
printf(_(" --standby-host=HOSTNAME standby host when taking backup from standby\n")); | ||||||||||||||||||||||||||||||||||||||||
printf(_(" --standby-port=PORT standby port when taking backup from standby\n")); | ||||||||||||||||||||||||||||||||||||||||
printf(_(" --exclude-snapshots exclude pg_logical/snapshots\n")); | ||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
printf(_("\nRestore options:\n")); | ||||||||||||||||||||||||||||||||||||||||
printf(_(" --recovery-target-time time stamp up to which recovery will proceed\n")); | ||||||||||||||||||||||||||||||||||||||||
printf(_(" --recovery-target-xid transaction ID up to which recovery will proceed\n")); | ||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.