@@ -133,8 +133,10 @@ main(int argc, char *argv[])
133133 backup_subcmd = SHOW ;
134134 else if (strcmp (argv [1 ], "delete" ) == 0 )
135135 backup_subcmd = DELETE ;
136- else if (strcmp (argv [1 ], "config" ) == 0 )
137- backup_subcmd = CONFIGURE ;
136+ else if (strcmp (argv [1 ], "set-config" ) == 0 )
137+ backup_subcmd = SET_CONFIG ;
138+ else if (strcmp (argv [1 ], "show-config" ) == 0 )
139+ backup_subcmd = SHOW_CONFIG ;
138140 else if (strcmp (argv [1 ], "--help" ) == 0
139141 || strcmp (argv [1 ], "help" ) == 0
140142 || strcmp (argv [1 ], "-?" ) == 0 )
@@ -170,7 +172,7 @@ main(int argc, char *argv[])
170172 elog (ERROR , "-B, --backup-path must be a path to directory" );
171173
172174 /* Do not read options from file or env if we're going to set them */
173- if (backup_subcmd != CONFIGURE )
175+ if (backup_subcmd != SET_CONFIG )
174176 {
175177 /* Read options from configuration file */
176178 join_path_components (path , backup_path , BACKUP_CATALOG_CONF_FILE );
@@ -248,12 +250,14 @@ main(int argc, char *argv[])
248250 return do_retention_purge ();
249251 else
250252 return do_delete (current .backup_id );
251- case CONFIGURE :
252- /* TODO fixit */
253+ case SHOW_CONFIG :
254+ if (argc > 4 )
255+ elog (ERROR , "show-config command doesn't accept any options" );
256+ return do_configure (true);
257+ case SET_CONFIG :
253258 if (argc == 4 )
254- return do_configure (true);
255- else
256- return do_configure (false);
259+ elog (ERROR , "set-config command requires at least one option" );
260+ return do_configure (false);
257261 }
258262
259263 return 0 ;
0 commit comments