diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index e2aefaac..718711f6 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -7177,11 +7177,13 @@ run_file_backup(t_node_info *local_node_record) if (mode == barman) { - create_pg_dir(cell_t->location, false); + create_pg_dir(tblspc_dir_dest, false); if (cell_t->f != NULL) /* cell_t->f == NULL iff the tablespace is * empty */ { + fclose(cell_t->f); + maxlen_snprintf(command, "rsync --progress -a --files-from=%s/%s.txt %s:%s/%s/%s %s", local_repmgr_tmp_directory, @@ -7194,7 +7196,6 @@ run_file_backup(t_node_info *local_node_record) (void) local_command( command, NULL); - fclose(cell_t->f); maxlen_snprintf(filename, "%s/%s.txt", local_repmgr_tmp_directory, @@ -7311,7 +7312,10 @@ stop_backup: if (mode == barman) { - /* In Barman mode, remove local_repmgr_directory */ + /* + * In Barman mode, remove local_repmgr_tmp_directory, + * which contains various temporary files containing Barman metadata. + */ rmtree(local_repmgr_tmp_directory, true); }