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

Commit6c94ea7

Browse files
committed
Correct help texts.
1 parent37da8b0 commit6c94ea7

File tree

5 files changed

+50
-60
lines changed

5 files changed

+50
-60
lines changed

‎expected/option.out

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,37 @@
44
pg_probackup manage backup/recovery of PostgreSQL database.
55

66
Usage:
7-
pg_probackupOPTION init
8-
pg_probackupOPTION backup
9-
pg_probackupOPTION restore
10-
pg_probackupOPTION show [ID]
11-
pg_probackupOPTION validate [ID]
12-
pg_probackupOPTION delete ID
13-
pg_probackupOPTION delwal [ID]
7+
pg_probackup[option...] init
8+
pg_probackup[option...] backup
9+
pg_probackup[option...] restore
10+
pg_probackup[option...] show [backup-ID]
11+
pg_probackup[option...] validate [backup-ID]
12+
pg_probackup[option...] deletebackup-ID
13+
pg_probackup[option...] delwal [backup-ID]
1414

1515
Common Options:
16-
-D, --pgdata=PATH location of the database storage area
1716
-B, --backup-path=PATH location of the backup storage area
18-
-j, --threads=NUM num threads for backup and restore
19-
--progress show progress copy files
17+
-D, --pgdata=PATH location of the database storage area
2018

2119
Backup options:
22-
-b, --backup-mode=MODE full,page,ptrack
20+
-b, --backup-mode=MODEbackup mode (full,page,ptrack)
2321
-C, --smooth-checkpoint do smooth checkpoint before backup
24-
--stream use stream for save/restore WAL during backup
25-
--backup-pg-log start backup pg_log directory
22+
--stream stream the transaction log and include it in the backup
2623
-S, --slot=SLOTNAME replication slot to use
24+
--backup-pg-log backup of pg_log directory
25+
-j, --threads=NUM number of parallel threads
26+
--progress show progress
2727

2828
Restore options:
29-
--time time stamp up to which recovery will proceed
30-
--xid transaction ID up to which recovery will proceed
31-
--inclusive whether we stop just after the recovery target
32-
--timeline recovering into a particular timeline
33-
34-
Catalog options:
35-
-a, --show-all show deleted backup too
29+
--time time stamp up to which recovery will proceed
30+
--xid transaction ID up to which recovery will proceed
31+
--inclusive whether we stop just after the recovery target
32+
--timeline recovering into a particular timeline
33+
-j, --threads=NUM number of parallel threads
34+
--progress show progress
3635

3736
Delete options:
38-
--wal remove unnecessary walarchives also
37+
--wal remove unnecessary walfiles
3938

4039
Connection options:
4140
-d, --dbname=DBNAME database to connect
@@ -48,8 +47,8 @@ Connection options:
4847
Generic options:
4948
-q, --quiet don't write any messages
5049
-v, --verbose verbose mode
51-
--help show this help, then exit
52-
--version output version information, then exit
50+
--help show this help, then exit
51+
--version output version information and exit
5352

5453
Read the website for details. <https://github.com/postgrespro/pg_probackup>
5554
Report bugs to <https://github.com/postgrespro/pg_probackup/issues>.

‎pg_probackup.c

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ static char *target_xid;
4747
staticchar*target_inclusive;
4848
staticTimeLineIDtarget_tli;
4949

50-
/* show configuration */
51-
staticboolshow_all= false;
52-
5350
staticvoidopt_backup_mode(pgut_option*opt,constchar*arg);
5451

5552
staticpgut_optionoptions[]=
@@ -75,8 +72,6 @@ static pgut_option options[] =
7572
{'s',4,"xid",&target_xid,SOURCE_ENV },
7673
{'s',5,"inclusive",&target_inclusive,SOURCE_ENV },
7774
{'u',6,"timeline",&target_tli,SOURCE_ENV },
78-
/* catalog options */
79-
{'b','a',"show-all",&show_all },
8075
/* delete options */
8176
{'b',12,"wal",&delete_wal },
8277
{0 }
@@ -205,7 +200,7 @@ main(int argc, char *argv[])
205200
returndo_restore(backup_id,target_time,target_xid,
206201
target_inclusive,target_tli);
207202
elseif (pg_strcasecmp(cmd,"show")==0)
208-
returndo_show(backup_id,show_all);
203+
returndo_show(backup_id);
209204
elseif (pg_strcasecmp(cmd,"validate")==0)
210205
returndo_validate(backup_id);
211206
elseif (pg_strcasecmp(cmd,"delete")==0)
@@ -223,40 +218,40 @@ pgut_help(bool details)
223218
{
224219
printf(_("%s manage backup/recovery of PostgreSQL database.\n\n"),PROGRAM_NAME);
225220
printf(_("Usage:\n"));
226-
printf(_(" %sOPTION init\n"),PROGRAM_NAME);
227-
printf(_(" %sOPTION backup\n"),PROGRAM_NAME);
228-
printf(_(" %sOPTION restore\n"),PROGRAM_NAME);
229-
printf(_(" %sOPTION show [ID]\n"),PROGRAM_NAME);
230-
printf(_(" %sOPTION validate [ID]\n"),PROGRAM_NAME);
231-
printf(_(" %sOPTION delete ID\n"),PROGRAM_NAME);
232-
printf(_(" %sOPTION delwal [ID]\n"),PROGRAM_NAME);
221+
printf(_(" %s[option...] init\n"),PROGRAM_NAME);
222+
printf(_(" %s[option...] backup\n"),PROGRAM_NAME);
223+
printf(_(" %s[option...] restore\n"),PROGRAM_NAME);
224+
printf(_(" %s[option...] show [backup-ID]\n"),PROGRAM_NAME);
225+
printf(_(" %s[option...] validate [backup-ID]\n"),PROGRAM_NAME);
226+
printf(_(" %s[option...] deletebackup-ID\n"),PROGRAM_NAME);
227+
printf(_(" %s[option...] delwal [backup-ID]\n"),PROGRAM_NAME);
233228

234229
if (!details)
235230
return;
236231

237232
printf(_("\nCommon Options:\n"));
238-
printf(_(" -D, --pgdata=PATH location of the database storage area\n"));
239233
printf(_(" -B, --backup-path=PATH location of the backup storage area\n"));
234+
printf(_(" -D, --pgdata=PATH location of the database storage area\n"));
240235
/*printf(_(" -c, --check show what would have been done\n"));*/
241-
printf(_(" -j, --threads=NUM num threads for backup and restore\n"));
242-
printf(_(" --progress show progress copy files\n"));
243236
printf(_("\nBackup options:\n"));
244-
printf(_(" -b, --backup-mode=MODE full,page,ptrack\n"));
237+
printf(_(" -b, --backup-mode=MODEbackup mode (full,page,ptrack)\n"));
245238
printf(_(" -C, --smooth-checkpoint do smooth checkpoint before backup\n"));
246-
printf(_(" --stream use stream for save/restore WAL during backup\n"));
239+
printf(_("--streamstream the transaction log and include it in the backup\n"));
247240
/*printf(_(" --keep-data-generations=N keep GENERATION of full data backup\n"));
248241
printf(_(" --keep-data-days=DAY keep enough data backup to recover to DAY days age\n"));*/
249-
printf(_(" --backup-pg-log start backup pg_log directory\n"));
250242
printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
243+
printf(_(" --backup-pg-log backup of pg_log directory\n"));
244+
printf(_(" -j, --threads=NUM number of parallel threads\n"));
245+
printf(_(" --progress show progress\n"));
251246
printf(_("\nRestore options:\n"));
252-
printf(_(" --time time stamp up to which recovery will proceed\n"));
253-
printf(_(" --xid transaction ID up to which recovery will proceed\n"));
254-
printf(_(" --inclusive whether we stop just after the recovery target\n"));
255-
printf(_(" --timeline recovering into a particular timeline\n"));
256-
printf(_("\nCatalog options:\n"));
257-
printf(_("-a, --show-all showdeleted backup too\n"));
247+
printf(_("--time time stamp up to which recovery will proceed\n"));
248+
printf(_("--xid transaction ID up to which recovery will proceed\n"));
249+
printf(_("--inclusive whether we stop just after the recovery target\n"));
250+
printf(_("--timeline recovering into a particular timeline\n"));
251+
printf(_(" -j, --threads=NUM number of parallel threads\n"));
252+
printf(_(" --progress showprogress\n"));
258253
printf(_("\nDelete options:\n"));
259-
printf(_("--wal remove unnecessary walarchives also\n"));
254+
printf(_("--wal remove unnecessary walfiles\n"));
260255
}
261256

262257
staticvoid

‎pg_probackup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ extern int do_restore(time_t backup_id,
225225
externintdo_init(void);
226226

227227
/* in show.c */
228-
externintdo_show(time_tbackup_id,boolshow_all);
228+
externintdo_show(time_tbackup_id);
229229

230230
/* in delete.c */
231231
externintdo_delete(time_tbackup_id);

‎pgut/pgut.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,8 +1453,8 @@ help(bool details)
14531453
printf(" -q, --quiet don't write any messages\n");
14541454
printf(" -v, --verbose verbose mode\n");
14551455
}
1456-
printf(" --help show this help, then exit\n");
1457-
printf(" --version output version information, then exit\n");
1456+
printf("--help show this help, then exit\n");
1457+
printf("--version output version information and exit\n");
14581458

14591459
if (details&& (PROGRAM_URL||PROGRAM_EMAIL))
14601460
{

‎show.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include"pg_probackup.h"
1111

12-
staticvoidshow_backup_list(FILE*out,parray*backup_list,boolshow_all);
12+
staticvoidshow_backup_list(FILE*out,parray*backup_list);
1313
staticvoidshow_backup_detail(FILE*out,pgBackup*backup);
1414

1515
/*
@@ -18,7 +18,7 @@ static void show_backup_detail(FILE *out, pgBackup *backup);
1818
* backup indicated by id.
1919
*/
2020
int
21-
do_show(time_tbackup_id,boolshow_all)
21+
do_show(time_tbackup_id)
2222
{
2323
/*
2424
* Safety check for archive folder, this is necessary to fetch
@@ -52,7 +52,7 @@ do_show(time_t backup_id, bool show_all)
5252
if (backup_list==NULL)
5353
elog(ERROR,"can't process any more.");
5454

55-
show_backup_list(stdout,backup_list,show_all);
55+
show_backup_list(stdout,backup_list);
5656

5757
/* cleanup */
5858
parray_walk(backup_list,pgBackupFree);
@@ -160,7 +160,7 @@ get_parent_tli(TimeLineID child_tli)
160160
}
161161

162162
staticvoid
163-
show_backup_list(FILE*out,parray*backup_list,boolshow_all)
163+
show_backup_list(FILE*out,parray*backup_list)
164164
{
165165
inti;
166166

@@ -180,10 +180,6 @@ show_backup_list(FILE *out, parray *backup_list, bool show_all)
180180

181181
backup=parray_get(backup_list,i);
182182

183-
/* skip deleted backup */
184-
if (backup->status==BACKUP_STATUS_DELETED&& !show_all)
185-
continue;
186-
187183
time2iso(timestamp,lengthof(timestamp),backup->recovery_time);
188184
if (backup->end_time!= (time_t)0)
189185
snprintf(duration,lengthof(duration),"%lum",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp