@@ -78,6 +78,7 @@ pid_t my_pid = 0;
7878__thread int my_thread_num = 1 ;
7979bool progress = false;
8080bool no_sync = false;
81+ time_t start_time = 0 ;
8182#if PG_VERSION_NUM >= 100000
8283char * replication_slot = NULL ;
8384bool temp_slot = false;
@@ -200,6 +201,7 @@ static ConfigOption cmd_options[] =
200201 { 's' , 'i' , "backup-id" , & backup_id_string , SOURCE_CMD_STRICT },
201202 { 'b' , 133 , "no-sync" , & no_sync , SOURCE_CMD_STRICT },
202203 { 'b' , 134 , "no-color" , & no_color , SOURCE_CMD_STRICT },
204+ { 'U' , 241 , "start-time" , & start_time , SOURCE_CMD_STRICT },
203205 /* backup options */
204206 { 'b' , 180 , "backup-pg-log" , & backup_logs , SOURCE_CMD_STRICT },
205207 { 'f' , 'b' , "backup-mode" , opt_backup_mode , SOURCE_CMD_STRICT },
@@ -939,10 +941,9 @@ main(int argc, char *argv[])
939941 return do_init (catalogState );
940942 case BACKUP_CMD :
941943 {
942- time_t start_time ;
943- time (& start_time );
944-
945944 current .stream = stream_wal ;
945+ if (start_time == 0 )
946+ start_time = current_time ;
946947
947948 /* sanity */
948949 if (current .backup_mode == BACKUP_MODE_INVALID )
0 commit comments