1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-30 05:39:12 +02:00

Implemented issue #156: Don't create backup symlinks in the repository.

This commit is contained in:
David Steele 2015-11-20 10:55:28 -05:00
parent 11f724bdfc
commit 4c5470e049

View File

@ -434,22 +434,26 @@ sub processManifest
}
# Create links
my $strSectionLink = "$strPathKey:link";
if ($oBackupManifest->test($strSectionLink))
{
foreach my $strLink ($oBackupManifest->keys($strSectionLink))
{
# Create links except in pg_tblspc because they have already been created
if (!($strPathKey eq 'base' && $strLink =~ /^pg_tblspc\/.*/))
{
$self->{oFile}->linkCreate(PATH_BACKUP_ABSOLUTE,
$oBackupManifest->get($strSectionLink, $strLink, MANIFEST_SUBKEY_DESTINATION),
PATH_BACKUP_TMP, "${strBackupDestinationPath}/${strLink}",
false, false, false);
}
}
}
#
# Non-tablespace links are no longer created in backup directories because they are potentially dangerous.
# This feature may be brought back at a later date but more likely that it will be rethought completely.
#
# my $strSectionLink = "$strPathKey:link";
#
# if ($oBackupManifest->test($strSectionLink))
# {
# foreach my $strLink ($oBackupManifest->keys($strSectionLink))
# {
# # Create links except in pg_tblspc because they have already been created
# if (!($strPathKey eq 'base' && $strLink =~ /^pg_tblspc\/.*/))
# {
# $self->{oFile}->linkCreate(PATH_BACKUP_ABSOLUTE,
# $oBackupManifest->get($strSectionLink, $strLink, MANIFEST_SUBKEY_DESTINATION),
# PATH_BACKUP_TMP, "${strBackupDestinationPath}/${strLink}",
# false, false, false);
# }
# }
# }
}