Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0b9b02

Browse files
committed
Fix docs and use recovery time for show command.
1 parent9f2ad9d commitc0b9b02

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

‎doc/pg_arman.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ pg_arman [ OPTIONS ]
1010
{ init |
1111
backup |
1212
restore |
13-
show [DATE | timeline] |
14-
validate [DATE ] |
15-
deleteDATE }
13+
show [ID] |
14+
validate [ID ] |
15+
deleteID }
1616
```
1717

18-
DATE is the start time of the target backup in ISO-format:
19-
(YYYY-MM-DD HH:MI:SS). Prefix match is used to compare DATE and backup
20-
files.
18+
ID is the base36 id from start time of the target backup.
2119

2220
##DESCRIPTION
2321

@@ -139,12 +137,12 @@ $ pg_ctl start
139137
###SHOW A BACKUP
140138
```
141139
$ pg_arman show
142-
===================================================================================
143-
Start Mode Current TLI Parent TLI Time Data Backup Status
144-
===================================================================================
145-
2013-12-25 03:02:31 PAGE 1 0 0m 203kB 67MB DONE
146-
2013-12-25 03:02:31 PAGE 1 0 0m 0B 0B ERROR
147-
2013-12-25 03:02:25 FULL 1 0 0m 33MB 364MB OK
140+
==========================================================================================
141+
IDRecovery time Mode Current TLI Parent TLI Time Data Backup Status
142+
==========================================================================================
143+
OFX1LH2013-12-25 03:02:31 PAGE 1 0 0m 203kB 67MB DONE
144+
OFX1KL2013-12-25 03:02:31 PAGE 1 0 0m 0B 0B ERROR
145+
OFX1KA2013-12-25 03:02:25 FULL 1 0 0m 33MB 364MB OK
148146
```
149147
The fields are:
150148

@@ -165,10 +163,10 @@ The fields are:
165163
* ERROR : backup is unavailable because some errors occur during backup.
166164
* CORRUPT : backup is unavailable because it is broken.
167165

168-
When adate is specified, more details about a backup is retrieved:
166+
When aID is specified, more details about a backup is retrieved:
169167

170168
```
171-
$ pg_arman show'2011-11-27 19:15:45'
169+
$ pg_arman showOFX1LH
172170
# configuration
173171
BACKUP_MODE=FULL
174172
# result
@@ -189,7 +187,7 @@ You can check the "RECOVERY_XID" and "RECOVERY_TIME" which are used for
189187
restore option "--recovery-target-xid", "--recovery-target-time".
190188

191189
The delete command deletes backup files not required by recovery after
192-
the specifieddate. This command also cleans up in the WAL archive the
190+
the specifiedID. This command also cleans up in the WAL archive the
193191
WAL segments that are no longer needed to restore from the remaining
194192
backups.
195193

‎expected/option.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Usage:
77
pg_arman OPTION init
88
pg_arman OPTION backup
99
pg_arman OPTION restore
10-
pg_arman OPTION show [DATE] [DATE]
11-
pg_arman OPTION validate [DATE] [DATE]
12-
pg_arman OPTION deleteDATE
10+
pg_arman OPTION show [ID]
11+
pg_arman OPTION validate [ID]
12+
pg_arman OPTION deleteID
1313

1414
Common Options:
1515
-D, --pgdata=PATH location of the database storage area

‎pg_arman.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ pgut_help(bool details)
211211
printf(_(" %s OPTION init\n"),PROGRAM_NAME);
212212
printf(_(" %s OPTION backup\n"),PROGRAM_NAME);
213213
printf(_(" %s OPTION restore\n"),PROGRAM_NAME);
214-
printf(_(" %s OPTION show [DATE] [DATE]\n"),PROGRAM_NAME);
215-
printf(_(" %s OPTION validate [DATE] [DATE]\n"),PROGRAM_NAME);
216-
printf(_(" %s OPTION deleteDATE\n"),PROGRAM_NAME);
214+
printf(_(" %s OPTION show [ID]\n"),PROGRAM_NAME);
215+
printf(_(" %s OPTION validate [ID]\n"),PROGRAM_NAME);
216+
printf(_(" %s OPTION deleteID\n"),PROGRAM_NAME);
217217

218218
if (!details)
219219
return;

‎show.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ show_backup_list(FILE *out, parray *backup_list, bool show_all)
166166

167167
/* show header */
168168
fputs("===================================================================================\n",out);
169-
fputs("IDStop Mode Current TLI Parent TLI Time Data Status \n",out);
169+
fputs("IDRecovery time Mode Current TLI Parent TLI Time Data Status \n",out);
170170
fputs("===================================================================================\n",out);
171171

172172
for (i=0;i<parray_num(backup_list);i++)
@@ -184,7 +184,7 @@ show_backup_list(FILE *out, parray *backup_list, bool show_all)
184184
if (backup->status==BACKUP_STATUS_DELETED&& !show_all)
185185
continue;
186186

187-
time2iso(timestamp,lengthof(timestamp),backup->end_time);
187+
time2iso(timestamp,lengthof(timestamp),backup->recovery_time);
188188
if (backup->end_time!= (time_t)0)
189189
snprintf(duration,lengthof(duration),"%lum",
190190
(backup->end_time-backup->start_time) /60);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp