mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
v0.16: RequestTTY=yes for SSH sessions
* Added RequestTTY=yes to ssh sesssions. Hoping this will prevent random lockups.
This commit is contained in:
parent
dafaeb0b82
commit
be1163b948
27
README.md
27
README.md
@ -1,27 +1,30 @@
|
||||
pg_backrest
|
||||
===========
|
||||
# pg_backrest
|
||||
|
||||
Simple Postgres Backup and Restore
|
||||
|
||||
planned for next release
|
||||
========================
|
||||
## planned for next release
|
||||
|
||||
* Default restore.conf is written to each backup.
|
||||
|
||||
* Able to set timeout on ssh connection in config file.
|
||||
|
||||
release notes
|
||||
=============
|
||||
* Fix bug where .backup files written into old directories can cause the archive process to error.
|
||||
|
||||
v0.15: Added archive-get
|
||||
* Add configurable sleep to archiver process to reduce ssh connections.
|
||||
|
||||
## release notes
|
||||
|
||||
### v0.16: RequestTTY=yes for SSH sessions
|
||||
|
||||
* Added RequestTTY=yes to ssh sesssions. Hoping this will prevent random lockups.
|
||||
|
||||
### v0.15: Added archive-get
|
||||
|
||||
* Added archive-get functionality to aid in restores.
|
||||
|
||||
* Added option to force a checkpoint when starting the backup (start_fast=y).
|
||||
|
||||
-------------
|
||||
|
||||
v0.11: Minor fixes
|
||||
### v0.11: Minor fixes
|
||||
|
||||
Tweaking a few settings after running backups for about a month.
|
||||
|
||||
@ -29,9 +32,7 @@ Tweaking a few settings after running backups for about a month.
|
||||
|
||||
* Changed lock file conflicts on backup and expire commands to ERROR. They were set to DEBUG due to a copy-and-paste from the archive locks.
|
||||
|
||||
-------------
|
||||
|
||||
v0.10: Backup and archiving are functional
|
||||
### v0.10: Backup and archiving are functional
|
||||
|
||||
This version has been put into production at Resonate, so it does work, but there are a number of major caveats.
|
||||
|
||||
|
@ -401,6 +401,7 @@ if ($strOperation eq OP_ARCHIVE_PUSH || $strOperation eq OP_ARCHIVE_PULL)
|
||||
# Call the archive_pull function Continue to loop as long as there are files to process.
|
||||
while (archive_pull($strArchivePath . "/archive/${strStanza}", $strStopFile, $strCommand, $iArchiveMaxMB))
|
||||
{
|
||||
&log(DEBUG, "archive logs were transferred, calling archive_pull() again");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -362,6 +362,10 @@ sub archive_pull
|
||||
&log(DEBUG, "removing local archive path ${strPath}");
|
||||
rmdir($strArchivePath . "/" . $strPath) or confess &log(ERROR, "unable to remove archive path ${strPath}, is it empty?");
|
||||
}
|
||||
|
||||
# If the dir is not empty check if the files are in the manifest
|
||||
# If they are error - there has been some issue
|
||||
# If not, they are new - continue processing without error - they'll be picked up on the next run
|
||||
}
|
||||
|
||||
# Return number of files indicating that processing should continue
|
||||
|
@ -35,10 +35,13 @@ sub BUILD
|
||||
# Connect SSH object if db host is defined
|
||||
if (defined($self->{strDbHost}) && !defined($self->{oDbSSH}))
|
||||
{
|
||||
my $strOptionSSHRequestTTY = "RequestTTY=yes";
|
||||
|
||||
&log(TRACE, "connecting to database ssh host $self->{strDbHost}");
|
||||
|
||||
# !!! This could be improved by redirecting stderr to a file to get a better error message
|
||||
$self->{oDbSSH} = Net::OpenSSH->new($self->{strDbHost}, user => $self->{strDbUser});
|
||||
$self->{oDbSSH} = Net::OpenSSH->new($self->{strDbHost}, user => $self->{strDbUser},
|
||||
master_opts => [-o => $strOptionSSHRequestTTY]);
|
||||
$self->{oDbSSH}->error and confess &log(ERROR, "unable to connect to $self->{strDbHost}: " . $self->{oDbSSH}->error);
|
||||
}
|
||||
}
|
||||
|
@ -67,11 +67,12 @@ sub BUILD
|
||||
# Create the ssh options string
|
||||
if (defined($self->{strBackupHost}) || defined($self->{strDbHost}))
|
||||
{
|
||||
my $strOptionSSH = "Compression=no";
|
||||
my $strOptionSSHRequestTTY = "RequestTTY=yes";
|
||||
my $strOptionSSHCompression = "Compression=no";
|
||||
|
||||
if ($self->{bNoCompression})
|
||||
{
|
||||
$strOptionSSH = "Compression=yes";
|
||||
$strOptionSSHCompression = "Compression=yes";
|
||||
}
|
||||
|
||||
# Connect SSH object if backup host is defined
|
||||
@ -80,7 +81,8 @@ sub BUILD
|
||||
&log(TRACE, "connecting to backup ssh host " . $self->{strBackupHost});
|
||||
|
||||
# !!! This could be improved by redirecting stderr to a file to get a better error message
|
||||
$self->{oBackupSSH} = Net::OpenSSH->new($self->{strBackupHost}, timeout => 300, user => $self->{strBackupUser}, master_opts => [-o => $strOptionSSH]);
|
||||
$self->{oBackupSSH} = Net::OpenSSH->new($self->{strBackupHost}, timeout => 300, user => $self->{strBackupUser},
|
||||
master_opts => [-o => $strOptionSSHCompression, -o => $strOptionSSHRequestTTY]);
|
||||
$self->{oBackupSSH}->error and confess &log(ERROR, "unable to connect to $self->{strBackupHost}: " . $self->{oBackupSSH}->error);
|
||||
}
|
||||
|
||||
@ -90,7 +92,8 @@ sub BUILD
|
||||
&log(TRACE, "connecting to database ssh host $self->{strDbHost}");
|
||||
|
||||
# !!! This could be improved by redirecting stderr to a file to get a better error message
|
||||
$self->{oDbSSH} = Net::OpenSSH->new($self->{strDbHost}, timeout => 300, user => $self->{strDbUser}, master_opts => [-o => $strOptionSSH]);
|
||||
$self->{oDbSSH} = Net::OpenSSH->new($self->{strDbHost}, timeout => 300, user => $self->{strDbUser},
|
||||
master_opts => [-o => $strOptionSSHCompression, -o => $strOptionSSHRequestTTY]);
|
||||
$self->{oDbSSH}->error and confess &log(ERROR, "unable to connect to $self->{strDbHost}: " . $self->{oDbSSH}->error);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user