@@ -22,7 +22,7 @@ const char *PROGRAM_EMAIL= "https://github.com/stalkerg/pg_arman/issues";
22
22
/* path configuration */
23
23
char * backup_path ;
24
24
char * pgdata ;
25
- char * arclog_path = NULL ;
25
+ char arclog_path [ MAXPGPATH ] ;
26
26
27
27
/* common configuration */
28
28
bool check = false;
@@ -57,7 +57,6 @@ static pgut_option options[] =
57
57
{
58
58
/* directory options */
59
59
{'s' ,'D' ,"pgdata" ,& pgdata ,SOURCE_ENV },
60
- {'s' ,'A' ,"arclog-path" ,& arclog_path ,SOURCE_ENV },
61
60
{'s' ,'B' ,"backup-path" ,& backup_path ,SOURCE_ENV },
62
61
/* common options */
63
62
{'b' ,'c' ,"check" ,& check },
@@ -171,18 +170,13 @@ main(int argc, char *argv[])
171
170
elog (ERROR ,"-B, --backup-path must be an absolute path" );
172
171
if (pgdata != NULL && !is_absolute_path (pgdata ))
173
172
elog (ERROR ,"-D, --pgdata must be an absolute path" );
174
- if (arclog_path != NULL && !is_absolute_path (arclog_path ))
175
- elog (ERROR ,"-A, --arclog-path must be an absolute path" );
176
173
177
- /* Sanity checks with commands */
178
- if (pg_strcasecmp (cmd ,"delete" )== 0 && arclog_path == NULL )
179
- elog (ERROR ,"delete command needs ARCLOG_PATH (-A, --arclog-path) to be set" );
174
+ join_path_components (arclog_path ,backup_path ,"wal" );
180
175
181
176
/* setup exclusion list for file search */
182
177
for (i = 0 ;pgdata_exclude [i ];i ++ );/* find first empty slot */
183
178
184
- if (arclog_path )
185
- pgdata_exclude [i ++ ]= arclog_path ;
179
+ pgdata_exclude [i ++ ]= arclog_path ;
186
180
187
181
if (!backup_logs )
188
182
pgdata_exclude [i ++ ]= "pg_log" ;
@@ -241,7 +235,6 @@ pgut_help(bool details)
241
235
242
236
printf (_ ("\nCommon Options:\n" ));
243
237
printf (_ (" -D, --pgdata=PATH location of the database storage area\n" ));
244
- printf (_ (" -A, --arclog-path=PATH location of archive WAL storage area\n" ));
245
238
printf (_ (" -B, --backup-path=PATH location of the backup storage area\n" ));
246
239
printf (_ (" -c, --check show what would have been done\n" ));
247
240
printf (_ (" -j, --threads=NUM num threads for backup and restore\n" ));