@@ -429,7 +429,6 @@ do_backup_instance(PGconn *backup_conn)
429
429
}
430
430
else
431
431
join_path_components (dirpath , database_path , dir_name );
432
- file -> backuped = true;
433
432
fio_mkdir (dirpath , DIR_PERMISSION , FIO_BACKUP_HOST );
434
433
}
435
434
@@ -443,6 +442,11 @@ do_backup_instance(PGconn *backup_conn)
443
442
if (prev_backup_filelist )
444
443
parray_qsort (prev_backup_filelist , pgFileComparePathWithExternal );
445
444
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
+
446
450
/* init thread args with own file lists */
447
451
threads = (pthread_t * ) palloc (sizeof (pthread_t ) * num_threads );
448
452
threads_args = (backup_files_arg * ) palloc (sizeof (backup_files_arg )* num_threads );
@@ -1797,7 +1801,6 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
1797
1801
file -> crc = pgFileGetCRC (file -> path , true, false,
1798
1802
& file -> read_size , FIO_BACKUP_HOST );
1799
1803
file -> write_size = file -> read_size ;
1800
- file -> backuped = true;
1801
1804
free (file -> path );
1802
1805
file -> path = strdup (PG_BACKUP_LABEL_FILE );
1803
1806
parray_append (backup_files_list , file );
@@ -1846,7 +1849,6 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
1846
1849
file -> crc = pgFileGetCRC (file -> path , true, false,
1847
1850
& file -> read_size , FIO_BACKUP_HOST );
1848
1851
file -> write_size = file -> read_size ;
1849
- file -> backuped = true;
1850
1852
}
1851
1853
free (file -> path );
1852
1854
file -> path = strdup (PG_TABLESPACE_MAP_FILE );
@@ -1995,7 +1997,7 @@ backup_files(void *arg)
1995
1997
{
1996
1998
prev_time = time (NULL );
1997
1999
1998
- write_backup_filelist (& current , arguments -> files_list , instance_config . pgdata ,
2000
+ write_backup_filelist (& current , arguments -> files_list , arguments -> from_root ,
1999
2001
arguments -> external_dirs );
2000
2002
/* update backup control file to update size info */
2001
2003
write_backup (& current );
@@ -2134,7 +2136,6 @@ backup_files(void *arg)
2134
2136
}
2135
2137
}
2136
2138
2137
- file -> backuped = true;
2138
2139
elog (VERBOSE , "File \"%s\". Copied " INT64_FORMAT " bytes" ,
2139
2140
file -> path , file -> write_size );
2140
2141
}
0 commit comments