From 4c5470e0499e336b704e9472d8a3c7463b256cc2 Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 20 Nov 2015 10:55:28 -0500 Subject: [PATCH] Implemented issue #156: Don't create backup symlinks in the repository. --- lib/BackRest/Backup.pm | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/lib/BackRest/Backup.pm b/lib/BackRest/Backup.pm index 4680195dd..0256f15d8 100644 --- a/lib/BackRest/Backup.pm +++ b/lib/BackRest/Backup.pm @@ -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); + # } + # } + # } }