@@ -429,7 +429,6 @@ do_backup_instance(PGconn *backup_conn)
429429}
430430else
431431join_path_components (dirpath ,database_path ,dir_name );
432- file -> backuped = true;
433432fio_mkdir (dirpath ,DIR_PERMISSION ,FIO_BACKUP_HOST );
434433}
435434
@@ -443,6 +442,11 @@ do_backup_instance(PGconn *backup_conn)
443442if (prev_backup_filelist )
444443parray_qsort (prev_backup_filelist ,pgFileComparePathWithExternal );
445444
445+ /* write initial backup_content.control file and update backup.control */
446+ write_backup_filelist (& current ,backup_files_list ,
447+ instance_config .pgdata ,external_dirs );
448+ write_backup (& current );
449+
446450/* init thread args with own file lists */
447451threads = (pthread_t * )palloc (sizeof (pthread_t )* num_threads );
448452threads_args = (backup_files_arg * )palloc (sizeof (backup_files_arg )* num_threads );
@@ -1797,7 +1801,6 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
17971801file -> crc = pgFileGetCRC (file -> path , true, false,
17981802& file -> read_size ,FIO_BACKUP_HOST );
17991803file -> write_size = file -> read_size ;
1800- file -> backuped = true;
18011804free (file -> path );
18021805file -> path = strdup (PG_BACKUP_LABEL_FILE );
18031806parray_append (backup_files_list ,file );
@@ -1846,7 +1849,6 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
18461849file -> crc = pgFileGetCRC (file -> path , true, false,
18471850& file -> read_size ,FIO_BACKUP_HOST );
18481851file -> write_size = file -> read_size ;
1849- file -> backuped = true;
18501852}
18511853free (file -> path );
18521854file -> path = strdup (PG_TABLESPACE_MAP_FILE );
@@ -1995,7 +1997,7 @@ backup_files(void *arg)
19951997{
19961998prev_time = time (NULL );
19971999
1998- write_backup_filelist (& current ,arguments -> files_list ,instance_config . pgdata ,
2000+ write_backup_filelist (& current ,arguments -> files_list ,arguments -> from_root ,
19992001arguments -> external_dirs );
20002002/* update backup control file to update size info */
20012003write_backup (& current );
@@ -2134,7 +2136,6 @@ backup_files(void *arg)
21342136}
21352137}
21362138
2137- file -> backuped = true;
21382139elog (VERBOSE ,"File \"%s\". Copied " INT64_FORMAT " bytes" ,
21392140file -> path ,file -> write_size );
21402141}