1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
Commit Graph

897 Commits

Author SHA1 Message Date
David Steele
f54145c0cc Fixed timeout issues.
* Fixed an issue where local processes were not disconnecting when complete and could later timeout. (Reported by Todd Vernick.)
* Fixed an issue where the protocol layer could timeout while waiting for WAL segments to arrive in the archive. (Reported by Todd Vernick.)
2016-09-14 16:37:07 -05:00
David Steele
e08b56a4e3 Show Process ID in log output instead of filtering it out with the timestamp. 2016-09-14 16:30:57 -05:00
John K. Harvey
f253a4d85c Suppress "dpkg-reconfigure: unable to re-open stdin: No file or directory" warning in Vagrant VM build.
Contributed by John Harvey.
2016-09-08 17:29:26 -04:00
David Steele
a8590c9ade v1.07: Thread to Process Conversion and Bug Fixes
Bug Fixes:

* Fixed an issue where tablespaces were copied from the master during standby backup.
* Fixed the check command so backup info is checked remotely and not just locally. (Fixed by Cynthia Shang.)
* Fixed an issue where retention-archive was not automatically being set when retention-archive-type=diff, resulting in a less aggressive than intended expiration of archive. (Fixed by Cynthia Shang.)

Features:

* Converted Perl threads to processes to improve compatibility and performance.
* Exclude contents of $PGDATA/pg_replslot directory so that replication slots on the master do not become part of the backup.
* The archive-start and archive-stop settings are now filled in backup.manifest even when archive-check=n.
* Additional warnings when archive retention settings may not have the intended effect or would allow indefinite retention. (Contributed by Cynthia Shang.)
* Experimental support for non-exclusive backups in PostgreSQL 9.6 rc1. Changes to the control/catalog/WAL versions in subsequent release candidates may break compatibility but pgBackRest will be updated with each release to keep pace.

Refactoring:

* Refactor of protocol minions in preparation for the new local minion.
* Remove obsolete thread index variable from File() module.
* Changed temporary file names to consistently use the .pgbackrest.tmp extension even if the destination file is compressed or has an appended checksum.
* Improve ASSERT error handling, safely check eval blocks, and convert $@ to $EVAL_ERROR.
2016-09-07 08:29:21 -04:00
Cynthia Shang
d2add293c7 Archive retention improvements:
* Fixed an issue where retention-archive was not automatically being set when retention-archive-type=diff, resulting in a less aggressive than intended expiration of archive.
* Additional warnings when archive retention settings may not have the intended effect or would allow indefinite retention.
* Closed #235: "Retention policy question" by adding documentation for archive retention.

Contributed by Cynthia Shang.
2016-09-07 08:07:37 -04:00
David Steele
0d5a1eaf9e The archive-start and archive-stop settings are now filled in backup.manifest. 2016-09-07 07:20:07 -04:00
David Steele
cc9c8819ee Make uid/gid selection for containers dynamic. 2016-09-06 14:01:39 -04:00
David Steele
cedfcbd4be Update Vagrantfile:
* Change box provider to bento (hoping for better stability with Docker).
* Install texlive from Debian packages.
2016-09-06 11:02:01 -04:00
David Steele
dd8d781217 Safely check eval blocks and convert $@ to $EVAL_ERROR. 2016-09-06 09:44:50 -04:00
David Steele
a701309453 Converted Perl threads to processes. 2016-09-06 09:35:02 -04:00
David Steele
4026ad649d Refactor of protocol minions in preparation for the new local minion. 2016-09-06 09:15:22 -04:00
David Steele
f71073c11f Improved temp file handling for archiving. 2016-09-04 19:29:30 -04:00
David Steele
56ee666e69 Suppress TOC for unsupported versions of pgBackRest.
The intent is to tidy the releases page and nobody should care much about the old, unsupported releases,
2016-09-04 09:27:56 -04:00
David Steele
8f61473955 Improve ASSERT error handling. 2016-09-04 09:25:20 -04:00
David Steele
f986e6ae33 File module improvements.
* Remove obsolete thread index variable from File() module.
* Changed temporary file names to consistently use .pgbackrest.tmp.
2016-09-04 09:22:53 -04:00
David Steele
bcdb5cdac8 Fixed a issue where tablespaces were copied from the master during standby backup. 2016-09-04 09:19:44 -04:00
David Steele
2feaaf225e Exclude contents of $PGDATA/pg_replslot directory. 2016-09-04 09:13:13 -04:00
David Steele
316da4421e Experimental support for non-exclusive backups in PostgreSQL 9.6 rc1. 2016-09-03 18:34:38 -04:00
Cynthia Shang
634f5c6829 Closed #250: Fixed the check command so backup info is checked remotely and not just locally.
Fixed by Cynthia Shang.
2016-08-29 14:09:37 -04:00
David Steele
f6c24039e1 Fixed minor documentation reproducibility issues related to binary paths. 2016-08-29 09:43:22 -04:00
David Steele
be77136eae v1.06: Backup from Standby and Bug Fixes
Bug Fixes:

* Fixed an issue where a tablespace link that referenced another link would not produce an error, but instead skip the tablespace entirely. (Reported by Michael Vitale.)
* Fixed an issue where options that should not allow multiple values could be specified multiple times in pgbackrest.conf without an error being raised. (Reported by Michael Vitale.)
* Fixed an issue where the protocol-timeout option was not automatically increased when the db-timeout option was increased. (Reported by Todd Vernick.)

Features:

* Backup from a standby cluster. A connection to the primary cluster is still required to start/stop the backup and copy files that are not replicated, but the vast majority of files are copied from the standby in order to reduce load on the master.
* More flexible configuration for databases. Master and standby can both be configured on the backup server and pgBackRest will automatically determine which is the master. This means no configuration changes for backup are required after failing over from a master to standby when a separate backup server is used.
* Exclude directories during backup that are cleaned, recreated, or zeroed by PostgreSQL at startup. These include pgsql_tmp and pg_stat_tmp. The postgresql.auto.conf.tmp file is now excluded in addition to files that were already excluded: backup_label.old, postmaster.opts, postmaster.pid, recovery.conf, recovery.done.
* Experimental support for non-exclusive backups in PostgreSQL 9.6 beta4. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.

Refactoring:

* Simplify protocol creation and identifying which host is local/remote.
* Removed all OP_* function constants that were used only for debugging, not in the protocol, and replaced with __PACKAGE__.
* Improvements in Db module: separated out connect() function, allow executeSql() calls that do not return data, and improve error handling.
* Improve error message for links that reference links in manifest build.
* Added hints to error message when relative paths are detected in archive-push or archive-get.
* Improve backup log messages to indicate which host the files are being copied from.
2016-08-25 11:49:09 -04:00
David Steele
c9bdf6a9ae Fixed timeout issue.
The protocol-timeout option was not automatically increased when the db-timeout option was increased.

Reported by Todd Vernick.
2016-08-25 11:27:00 -04:00
David Steele
5ada189a92 Backup from a standby cluster.
A connection to the primary cluster is still required to start/stop the backup and copy files that are not replicated, but the vast majority of files are copied from the standby in order to reduce load on the master.
2016-08-25 11:25:46 -04:00
David Steele
ecf827579e Improve host tag rendering. 2016-08-25 10:04:46 -04:00
David Steele
d0b6f78b20 More flexible configuration for databases
Master and standby can both be configured on the backup server and pgBackRest will automatically determine which is the master. This means no configuration changes for backup are required after failing over from a master to standby when a separate backup server is used.
2016-08-24 12:39:27 -04:00
David Steele
cd6278e5af Revert some backup exclusions until they have been tested more thoroughly. 2016-08-24 12:27:48 -04:00
David Steele
9c13ca1d09 mprove backup log messages to indicated which host the files are being copied from. 2016-08-24 12:01:08 -04:00
David Steele
f1412baccf Exclude directories during backup that are cleaned, recreated, or zeroed by PostgreSQL at startup.
These include (depending on the version where they were introduced): pgsql_tmp, pg_dynshmem, pg_notify, pg_replslot, pg_serial, pg_snapshots, pg_stat_tmp, pg_subtrans. The postgresql.auto.conf.tmp file is now excluded in addition to files that were already excluded: backup_label.old, postmaster.opts, postmaster.pid, recovery.conf, recovery.done.
2016-08-16 09:35:16 -04:00
David Steele
332055971e Added hints to error message when relative paths are detected in archive-push or archive-get. 2016-08-15 20:54:17 -04:00
David Steele
b25f10949a Fixed #229: Check fails on target db host.
Options that should not allow multiple values could be specified multiple times in pgbackrest.conf without an error being raised.
2016-08-15 20:15:17 -04:00
David Steele
88d9bd3d37 Improvements in Db module.
* Separated out connect() function.
* Allow executeSql() calls that do not return data.
* Improve error handling.
2016-08-15 17:44:51 -04:00
David Steele
1e0f15f425 Improve error message for links that reference links in manifest build. 2016-08-15 17:23:37 -04:00
David Steele
f9fa1270b2 Fixed #236: Recursive user tablespace symlink.
A tablespace link that referenced another link would not produce an error, but instead skip the tablespace entirely.
2016-08-15 17:11:45 -04:00
David Steele
35931305d7 Update control version for PostgreSQL beta4. 2016-08-15 16:48:24 -04:00
David Steele
17b79d6279 Database version refactoring.
* Refactor db version constants into a separate module.
* Update synthetic backup tests to PostgreSQL 9.4.
2016-08-11 22:35:24 -04:00
David Steele
bff262ac47 Removed all OP_* function constants that were used only for debugging, not in the protocol, and replaced with __PACKAGE__. 2016-08-11 17:32:28 -04:00
David Steele
9f19e13095 v1.05: Bug Fix for Tablespace Link Checking
Bug Fixes:

* Fixed an issue where tablespace paths that had $PGDATA as a substring would be identified as a subdirectories of $PGDATA even when they were not. Also hardened relative path checking a bit. (Reported by Chris Fort.)
2016-08-09 10:06:21 -04:00
David Steele
34afe5e85b Fixed issue with tablespace link checking.
* Tablespace paths that had $PGDATA as a substring would be identified as a subdirectories of $PGDATA even when they were not.
* Also hardened relative path checking a bit.
2016-08-09 09:05:27 -04:00
Cynthia Shang
af790be34f Added documentation for scheduling backups with cron.
Contributed by Cynthia Shang.
2016-08-02 12:55:09 -04:00
David Steele
730262678a Improved rendering of spaces in code blocks. 2016-08-02 12:49:39 -04:00
Cynthia Shang
f0c9728921 Moved the backlog from the pgBackRest website to the GitHub repository wiki.
Contributed by Cynthia Shang.
2016-08-02 11:38:12 -04:00
David Steele
277934447b v1.04: Various Bug Fixes
Bug Fixes:

* Fixed an issue an where an extraneous remote was created causing threaded backup/restore to possibly timeout and/or throw a lock conflict. (Reported by Michael Vitale.)
* Fixed an issue where db-path was not required for the check command so an assert was raised when it was missing rather than a polite error message. (Reported by Michael Vitale.)
* Fixed check command to throw an error when database version/id does not match that of the archive. (Fixed by Cynthia Shang.)
* Fixed an issue where a remote could try to start its own remote when the backup-host option was not present in pgbackrest.conf on the database server. (Reported by Lardière Sébastien.)
* Fixed an issue where the contents of pg_xlog were being backed up if the directory was symlinked. This didn't cause any issues during restore but was a waste of space.
* Fixed an invalid log() call in lock routines.

Features:

* Experimental support for non-exclusive backups in PostgreSQL 9.6 beta3. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.

Refactoring:

* Enhancements to the protocol layer for improved reliability and error handling.
* All remote types now take locks. The exceptions date to when the test harness and pgBackRest were running in the same VM and no longer apply.
* Exceptions are now passed back from threads as messages when possible rather than raised directly.
* Temp files created during backup are now placed in the same directory as the target file.
* Output lock file name when a lock cannot be acquired to aid in debugging.
* Reduce calls to protocolGet() in backup/restore.
* Suppress banners on SSH protocol connections.
* Improved remote error messages to identify the host where the error was raised.
2016-07-30 09:42:35 -04:00
David Steele
f2b3dda647 Fixed an issue where a remote could try to start its own remote.
This is a better approach than 93320b8 (reverted in this commit) because it ensures that the remote type will be none so any functions that utilize optionRemoteTypeTest will work correctly.

This bug was only an issue when backup-host was not properly configured on the database host.
2016-07-30 08:49:26 -04:00
David Steele
94a4cb4123 Disable control master for older OS versions where it is less stable. 2016-07-30 08:43:38 -04:00
David Steele
1b6b26956a Reduce the frequency that certain tests are run to save time in regression. 2016-07-29 18:46:19 -04:00
David Steele
ac23716d26 Enhancements to the protocol layer for improved reliability and error handling. 2016-07-29 18:46:19 -04:00
David Steele
b447863218 Exceptions are now passed back from threads as messages when possible rather than raised directly. 2016-07-29 18:46:19 -04:00
David Steele
93320b865e Fixed a issue where a remote could try to start its own remote. 2016-07-29 18:45:37 -04:00
David Steele
af5965a6ef Fixed an invalid log call in lock routines. 2016-07-29 18:45:23 -04:00
David Steele
a3b8808f94 Fixed an issue where the contents of pg_xlog were being copied if the directory was symlinked. 2016-07-29 18:44:53 -04:00