Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd064a64

Browse files
committed
List data directories at backup host using FIO_BACKUP_HOST
1 parentff86eb5 commitd064a64

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

‎src/dir.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static void dir_list_file_internal(parray *files, const char *root,
126126
boolomit_symlink,parray*black_list,fio_locationlocation);
127127

128128
staticvoidlist_data_directories(parray*files,constchar*path,boolis_root,
129-
boolexclude);
129+
boolexclude,fio_locationlocation);
130130

131131
/* Tablespace mapping */
132132
staticTablespaceListtablespace_dirs= {NULL,NULL};
@@ -773,15 +773,15 @@ dir_list_file_internal(parray *files, const char *root, pgFile *parent,
773773
*/
774774
staticvoid
775775
list_data_directories(parray*files,constchar*path,boolis_root,
776-
boolexclude)
776+
boolexclude,fio_locationlocation)
777777
{
778778
DIR*dir;
779779
structdirent*dent;
780780
intprev_errno;
781781
boolhas_child_dirs= false;
782782

783783
/* open directory and list contents */
784-
dir=fio_opendir(path,FIO_DB_HOST);
784+
dir=fio_opendir(path,location);
785785
if (dir==NULL)
786786
elog(ERROR,"cannot open directory \"%s\": %s",path,strerror(errno));
787787

@@ -799,7 +799,7 @@ list_data_directories(parray *files, const char *path, bool is_root,
799799

800800
join_path_components(child,path,dent->d_name);
801801

802-
if (fio_stat(child,&st, false,FIO_DB_HOST)==-1)
802+
if (fio_stat(child,&st, false,location)==-1)
803803
elog(ERROR,"cannot stat file \"%s\": %s",child,strerror(errno));
804804

805805
if (!S_ISDIR(st.st_mode))
@@ -823,15 +823,15 @@ list_data_directories(parray *files, const char *path, bool is_root,
823823
continue;
824824

825825
has_child_dirs= true;
826-
list_data_directories(files,child, false,exclude);
826+
list_data_directories(files,child, false,exclude,location);
827827
}
828828

829829
/* List only full and last directories */
830830
if (!is_root&& !has_child_dirs)
831831
{
832832
pgFile*dir;
833833

834-
dir=pgFileNew(path, false,FIO_LOCAL_HOST);
834+
dir=pgFileNew(path, false,location);
835835
parray_append(files,dir);
836836
}
837837

@@ -982,7 +982,8 @@ create_data_directories(const char *data_dir, const char *backup_dir,
982982
}
983983

984984
join_path_components(backup_database_dir,backup_dir,DATABASE_DIR);
985-
list_data_directories(dirs,backup_database_dir, true, false);
985+
list_data_directories(dirs,backup_database_dir, true, false,
986+
FIO_BACKUP_HOST);
986987

987988
elog(LOG,"restore directories and symlinks...");
988989

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp