@@ -283,7 +283,7 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
283
283
284
284
/* initialize backup's file list */
285
285
backup_files_list = parray_new ();
286
- join_path_components (external_prefix , current .database_dir , EXTERNAL_DIR );
286
+ join_path_components (external_prefix , current .root_dir , EXTERNAL_DIR );
287
287
288
288
/* list files with the logical path. omit $PGDATA */
289
289
if (fio_is_remote (FIO_DB_HOST ))
@@ -738,6 +738,11 @@ do_backup(pgSetBackupParams *set_backup_params,
738
738
/* Initialize PGInfonode */
739
739
pgNodeInit (& nodeInfo );
740
740
741
+ /* Save list of external directories */
742
+ if (instance_config .external_dir_str &&
743
+ (pg_strcasecmp (instance_config .external_dir_str , "none" ) != 0 ))
744
+ current .external_dir_str = instance_config .external_dir_str ;
745
+
741
746
/* Create backup directory and BACKUP_CONTROL_FILE */
742
747
pgBackupCreateDir (& current , backup_instance_path );
743
748
@@ -755,11 +760,6 @@ do_backup(pgSetBackupParams *set_backup_params,
755
760
current .compress_alg = instance_config .compress_alg ;
756
761
current .compress_level = instance_config .compress_level ;
757
762
758
- /* Save list of external directories */
759
- if (instance_config .external_dir_str &&
760
- (pg_strcasecmp (instance_config .external_dir_str , "none" ) != 0 ))
761
- current .external_dir_str = instance_config .external_dir_str ;
762
-
763
763
elog (INFO , "Backup start, pg_probackup version: %s, instance: %s, backup ID: %s, backup mode: %s, "
764
764
"wal mode: %s, remote: %s, compress-algorithm: %s, compress-level: %i" ,
765
765
PROGRAM_VERSION , instance_name , base36enc (current .backup_id ), pgBackupGetBackupMode (& current ),
0 commit comments