mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-02-07 14:18:17 +02:00
improvement: ignore hidden files when taking a backup
This commit is contained in:
parent
b7f8283d48
commit
5d0a3be536
10
src/dir.c
10
src/dir.c
@ -867,13 +867,21 @@ dir_list_file_internal(parray *files, pgFile *parent, bool exclude,
|
||||
continue;
|
||||
}
|
||||
|
||||
/* skip hidden files and directories */
|
||||
if (file->name[0] == '.')
|
||||
{
|
||||
elog(WARNING, "Skip hidden file: '%s'", file->path);
|
||||
pgFileFree(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add only files, directories and links. Skip sockets and other
|
||||
* unexpected file formats.
|
||||
*/
|
||||
if (!S_ISDIR(file->mode) && !S_ISREG(file->mode))
|
||||
{
|
||||
elog(WARNING, "Skip \"%s\": unexpected file format", file->path);
|
||||
elog(WARNING, "Skip '%s': unexpected file format", file->path);
|
||||
pgFileFree(file);
|
||||
continue;
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ main(int argc, char *argv[])
|
||||
/*
|
||||
* Ensure that requested backup instance exists.
|
||||
* for all commands except init, which doesn't take this parameter,
|
||||
* add-instance which creates new instance
|
||||
* add-instance, which creates new instance,
|
||||
* and archive-get, which just do not require it at this point
|
||||
*/
|
||||
if (backup_subcmd != INIT_CMD && backup_subcmd != ADD_INSTANCE_CMD &&
|
||||
|
@ -779,7 +779,7 @@ restore_files(void *arg)
|
||||
elog(ERROR, "Interrupted during restore");
|
||||
|
||||
if (progress)
|
||||
elog(INFO, "Progress: (%d/%lu). Process file %s ",
|
||||
elog(INFO, "Progress: (%d/%lu). Restore file \"%s\"",
|
||||
i + 1, (unsigned long) parray_num(arguments->dest_files),
|
||||
dest_file->rel_path);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user