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

Commit5d0a3be

Browse files
committed
improvement: ignore hidden files when taking a backup
1 parentb7f8283 commit5d0a3be

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

‎src/dir.c‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,13 +867,21 @@ dir_list_file_internal(parray *files, pgFile *parent, bool exclude,
867867
continue;
868868
}
869869

870+
/* skip hidden files and directories */
871+
if (file->name[0]=='.')
872+
{
873+
elog(WARNING,"Skip hidden file: '%s'",file->path);
874+
pgFileFree(file);
875+
continue;
876+
}
877+
870878
/*
871879
* Add only files, directories and links. Skip sockets and other
872880
* unexpected file formats.
873881
*/
874882
if (!S_ISDIR(file->mode)&& !S_ISREG(file->mode))
875883
{
876-
elog(WARNING,"Skip\"%s\": unexpected file format",file->path);
884+
elog(WARNING,"Skip'%s': unexpected file format",file->path);
877885
pgFileFree(file);
878886
continue;
879887
}

‎src/pg_probackup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ main(int argc, char *argv[])
507507
/*
508508
* Ensure that requested backup instance exists.
509509
* for all commands except init, which doesn't take this parameter,
510-
* add-instance which creates new instance
510+
* add-instance, which creates new instance,
511511
* and archive-get, which just do not require it at this point
512512
*/
513513
if (backup_subcmd!=INIT_CMD&&backup_subcmd!=ADD_INSTANCE_CMD&&

‎src/restore.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ restore_files(void *arg)
779779
elog(ERROR,"Interrupted during restore");
780780

781781
if (progress)
782-
elog(INFO,"Progress: (%d/%lu).Process file%s",
782+
elog(INFO,"Progress: (%d/%lu).Restore file\"%s\"",
783783
i+1, (unsigned long)parray_num(arguments->dest_files),
784784
dest_file->rel_path);
785785

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp