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

176 Commits

Author SHA1 Message Date
David Steele
2edf5d4bf7 Split most of README.md out into CHANGELOG.md and USERGUIDE.md.
Added release dates to change log.
2015-08-07 14:43:53 -04:00
David Steele
4e7bd4468a Worked on issue #122: 9.5 Integration.
Most tests are working now.  What's not working:

1) --target-resume option fails because pause_on_recovery setting was removed.  Need to implement to the new 9.5 option and make that work with older versions in a consistent way.
2) No tests for the new .partial WAL segments that can be generated on timeline switch.
2015-08-06 16:36:55 -04:00
David Steele
adb8a00925 Improvements to release notes. 2015-08-06 00:24:02 -04:00
David Steele
8b57188bc1 Fixed issue #120: Wrong "oldest backup timestamp" in info output. 2015-08-05 23:37:46 -04:00
David Steele
a10dd8ba98 Implemented issue #121: Check data from db against what's passed to backrest. 2015-08-05 22:05:45 -04:00
David Steele
ba4e5fc4cb Release notes for issue #20: Convert Postgres calls from psql to DBD::Pg. 2015-08-05 13:35:19 -04:00
David Steele
23e6267adc Implemented issue #20: Convert Postgres calls from psql to DBD::Pg. 2015-08-05 12:32:12 -04:00
David Steele
f8a2da9400 Work on issue #48: Abandon threads and go to processes
* Major refactoring of the protocol layer to support this work.
* Fixed protocol issue that was preventing ssh errors (especially connect) from being logged.
2015-08-05 08:43:41 -04:00
David Steele
97c036973c Implemented issue #119: Make sure all repo permissions are 640/750. 2015-07-23 13:11:38 -04:00
David Steele
f3199d13b1 Implement issue #115: When restoring copy pg_control last. 2015-07-16 11:12:48 -04:00
David Steele
89c0f23f37 Update release notes and some test fixes. 2015-07-13 12:13:07 -04:00
David Steele
e9ce4efedf Removed dependency on dequeue_timed() which eliminates the CPAN install.
Added vagrant config for CentOS 6.
2015-07-10 09:20:28 -04:00
David Steele
1df8c30549 Swapped config and operation sections to hopefully make the docs flow a little better. 2015-07-09 10:21:02 -04:00
David Steele
e799361e90 Clarification for CPAN requirements. 2015-07-09 10:11:49 -04:00
David Steele
8b7fd99637 Added vagrant configuration for Ubuntu 12.04.
Changes to regression tests to work better with VMs.
2015-07-06 21:00:48 -04:00
David Steele
bb443dd098 Renamed pg_backrest.pl to pg_backrest in the docs. 2015-07-06 17:59:44 -04:00
David Steele
38f48be3cf Improvements to help to make it more dynamic depending on environment.
Changed PgBackRest to pgBackRest.
2015-07-02 10:05:13 -04:00
David Steele
12932dc54c Merge branch 'master' into dev after release 0.77 2015-06-30 14:57:17 -04:00
David Steele
b1ded135df v0.77: CentOS/RHEL 6 support and protocol improvements
* Removed pg_backrest_remote and added the functionality to pg_backrest as remote command.

* Added file and directory syncs to the File object for additional safety during backup/restore and archiving.  Suggested by Andres Freund.

* Support for Perl 5.10.1 and OpenSSH 5.3 which are default for CentOS/RHEL 6.  Found by Eric Radman.

* Improved error message when backup is run without archive_command set and without --no-archive-check specified.  Found by Eric Radman.

* Moved version number out of the VERSION file to Version.pm to better support packaging.  Suggested by Michael Renner.

* Replaced IPC::System::Simple and Net::OpenSSH with IPC::Open3 to eliminate CPAN dependency for multiple distros.
2015-06-30 14:47:58 -04:00
David Steele
7248795b91 Work on issue #48: Abandon threads and go to processes
Replaced IPC::System::Simple and Net::OpenSSH with IPC::Open3 to eliminate CPAN dependency for multiple distros.  Using open3 will also be used for local processes so it make sense to switch now.
2015-06-29 22:07:42 -04:00
David Steele
f210fe99c3 Implemented issue #109: Move VERSION into source code.
Also stopped replacing FORMAT number which explains the large number of test log changes.  FORMAT should change very rarely and cause test log failures when it does.
2015-06-22 13:11:07 -04:00
David Steele
af58016871 Release notes for issue #108: Incompatibility with Perl 5.10.1. 2015-06-22 10:04:58 -04:00
David Steele
fdd9e8eb17 Improved release notes on fsync to include restore. 2015-06-22 09:58:01 -04:00
David Steele
3f841fcd95 Improved issue #110: 'db-version' is required but not defined.
Improved the error message and added hints.
2015-06-22 09:51:16 -04:00
David Steele
61dfeca3c1 Fixed issue #108: Incompatibility with Perl 5.10.1 2015-06-21 12:06:13 -04:00
David Steele
49f1a3e481 Document issue #108: Incompatibility with Perl 5.10.1 2015-06-19 14:27:44 -04:00
David Steele
0695c0e7af Document issue #108: Incompatibility with Perl 5.10.1 2015-06-19 14:02:26 -04:00
David Steele
a5d9d6d84d Added file and directory syncs to the File object for additional safety during backup and archiving. 2015-06-17 12:53:33 -04:00
David Steele
9511f9c35c Implemented issue #106: Roll pg_backup_remote into pg_backrest 2015-06-17 11:26:07 -04:00
David Steele
0ba4029253 Update version to 0.80. 2015-06-16 16:21:24 -04:00
David Steele
da8b337ee8 Added supported versions of PostreSQL. 2015-06-16 15:44:27 -04:00
David Steele
1afbab010f v0.75: New repository format, info command and experimental 9.5 support
* IMPORTANT NOTE: This flag day release breaks compatibility with older versions of PgBackRest.  The manifest format, on-disk structure, and the binary names have all changed.  You must create a new repository to hold backups for this version of PgBackRest and keep your older repository for a time in case you need to do a restore.  The `pg_backrest.conf` file has not changed but you'll need to change any references to `pg_backrest.pl` in cron (or elsewhere) to `pg_backrest` (without the `.pl` extension).

* Add info command.

* More efficient file ordering for backup.  Files are copied in descending size order so a single thread does not end up copying a large file at the end.  This had already been implemented for restore.

* Logging now uses unbuffered output.  This should make log files that are being written by multiple threads less chaotic.  Suggested by Michael Renner.

* Experimental support for PostgreSQL 9.5.  This may break when the control version or WAL magic changes but will be updated in each release.
2015-06-14 20:59:32 -04:00
David Steele
b365d9aacc Updated release notes for 0.75. 2015-06-14 11:48:33 -04:00
David Steele
b865070edd Experimental 9.5 support. Unit tests are not working yet. 2015-06-14 10:12:36 -04:00
David Steele
0b6f81a812 Implemented issue #50: Reverse ordering by file size. 2015-06-14 09:36:58 -04:00
David Steele
6c807f2ddd Fixed release notes for info command. 2015-06-13 18:30:10 -04:00
David Steele
148836fe44 Implemented issue #26: Info command.
* Includes updating the manifest to format 4.  It turns out the manifest and .info files were not very good for providing information.  A format update was required anyway so worked through the backlog of changes that would require a format change.

* Multiple database versions are now supported in the archive.  Does't actually work yet but the structure should be good.

* Tests use more constants now that test logs can catch name regressions.
2015-06-13 18:25:49 -04:00
David Steele
5a73b1a240 Fixed minor typos in the documentation. 2015-06-10 15:54:24 -04:00
David Steele
aca4511350 Documentation for issue #93: Prevent misconfigured retention-archive setting
Not an actual fix - just some documentation to (hopefully) keep users from getting bitten until then.
2015-06-10 15:44:13 -04:00
David Steele
af98f164cd Fixed issue #97: Interleaved log lines during parallel operations. 2015-06-02 09:42:56 -04:00
David Steele
7e06e53a69 Merge branch 'master' into dev after release 0.70 2015-06-01 09:39:02 -04:00
David Steele
f83f0fa54d v0.70: Stability improvements for archiving, improved logging and help
* Fixed an issue where archive-copy would fail on an incr/diff backup when hardlink=n.  In this case the pg_xlog path does not already exist and must be created. Reported by Michael Renner

* Allow duplicate WAL segments to be archived when the checksum matches.  This is necessary for some recovery scenarios.

* Allow comments/disabling in pg_backrest.conf using #.  Suggested by Michael Renner.

* Better logging before pg_start_backup() to make it clear when the backup is waiting on a checkpoint.  Suggested by Michael Renner.

* Various command behavior, help and logging fixes.  Reported by Michael Renner.

* Fixed an issue in async archiving where archive-push was not properly returning 0 when archive-max-mb was reached and moved the async check after transfer to avoid having to remove the stop file twice.  Also added unit tests for this case and improved error messages to make it clearer to the user what went wrong.  Reported by Michael Renner.

* Fixed a locking issue that could allow multiple operations of the same type against a single stanza.  This appeared to be benign in terms of data integrity but caused spurious errors while archiving and could lead to errors in backup/restore. Reported by Michael Renner.

* Replaced JSON module with JSON::PP which ships with core Perl.
2015-06-01 09:24:38 -04:00
David Steele
e7d2d704fe Fixed issue #91: Race condition in async archive-push. 2015-05-29 16:31:12 -04:00
David Steele
5fce709ae7 Document issue #88: Thoughts on repo & release management. 2015-05-29 12:33:38 -04:00
David Steele
d321ef0b6d Implement issue #89: Make confess backtraces log-level dependent.
ASSERTs still dump stack traces to the console and file in all cases.  ERRORs only dump stack traces to the file when the file log level is DEBUG or TRACE.
2015-05-29 12:26:31 -04:00
David Steele
13e4eec629 Implement issue #90: Move archive-max-mb archive-stop checks to end of archive-push. 2015-05-29 11:41:19 -04:00
David Steele
639c27e113 Release notes for issue #68: Allow duplicate WAL to be pushed if the checksum matches. 2015-05-29 08:18:12 -04:00
David Steele
3083e5fc7e Fix for issue #83: Provide more helpful error message during archive-stop situations.
Fix for issue #84: archive-async in combination with archive-max-mb doesn't work as documented.
Unit tests for archive stop.
2015-05-28 13:17:34 -04:00
David Steele
a4974f8996 Fix for issue #70: command line help improvements 2015-05-26 15:29:42 -04:00
David Steele
ca0c866d3b Implement issue #71: log a message when waiting for a checkpoint
Some other log improvements
2015-05-26 12:26:59 -04:00
David Steele
5c43e7035a Implement issue #79: Support comment characters in config file 2015-05-26 11:36:03 -04:00
David Steele
e9099b99aa Updated required modules. Minor doc fixes. 2015-05-26 10:01:05 -04:00
David Steele
d5335b40e8 Fix for issue #80: enabling archive-copy causes failing differential & incremental backups 2015-05-22 14:49:14 -04:00
David Steele
5ada7fb5ad Use JSON::PP instead of JSON since it is shipped with core Perl. 2015-05-12 15:44:10 -04:00
David Steele
ab4efce5d1 Merge branch 'master' into dev after release 0.65 2015-05-11 18:36:02 -04:00
David Steele
49fe40850f v0.65: Improved resume and restore logging, compact restores
* Better resume support.  Resumed files are checked to be sure they have not been modified and the manifest is saved more often to preserve checksums as the backup progresses.  More unit tests to verify each resume case.

* Resume is now optional.  Use the `resume` setting or `--no-resume` from the command line to disable.

* More info messages during restore.  Previously, most of the restore messages were debug level so not a lot was output in the log.

* Fixed an issue where an absolute path was not written into recovery.conf when the restore was run with a relative path.

* Added `tablespace` setting to allow tablespaces to be restored into the `pg_tblspc` path.  This produces compact restores that are convenient for development, staging, etc.  Currently these restores cannot be backed up as PgBackRest expects only links in the `pg_tblspc` path.
2015-05-11 18:29:40 -04:00
David Steele
9aa41ee76b Added tablespace setting to allow compact database restores for development, staging, etc. 2015-05-08 18:34:27 -04:00
David Steele
a0d985b7ad Fixed an issue where an absolute path was not written into recovery.conf when the restore was run with a relative path. 2015-05-07 17:37:25 -05:00
David Steele
1ac4b781fd Better info logging for restore. Most of the messages were debug before and some important ones were missing. 2015-05-07 15:56:56 -06:00
David Steele
095a9a0b83 Added resume setting to allow disabling resume feature. 2015-05-07 10:29:30 -06:00
David Steele
328c2ca5c0 Much better resume:
1) Re-checksums files that have checksums in the manifest
2) Recopies files that do not have a checksum
3) Saves the manifest at regular intervals to preserve checksums
4) Unit tests for all cases (that I can think of)
2015-05-06 18:24:34 -06:00
David Steele
1d1c7e47d1 Doc fixes for archive-max-mb setting. 2015-05-01 19:13:12 -04:00
David Steele
b0db7c0497 Fixed case error in Perl module name. 2015-04-29 17:43:28 -04:00
David Steele
87f69508e3 Set version to 0.75 2015-04-21 10:48:01 -04:00
David Steele
a9b9ec2492 v0.61: bug fix for uncompressed remote destination
* Fixed a buffering error that could occur on large, highly-compressible files when copying to an uncompressed remote destination.  The error was detected in the decompression code and resulted in a failed backup rather than corruption so it should not affect successful backups made with previous versions.
2015-04-21 09:45:03 -04:00
David Steele
5185d49873 v0.60: better version support and WAL improvements
* Pushing duplicate WAL now generates an error.  This worked before only if checksums were disabled.

* Database System IDs are used to make sure that all WAL in an archive matches up.  This should help prevent misconfigurations that send WAL from multiple clusters to the same archive.

* Regression tests working back to PostgreSQL 8.3.

* Improved threading model by starting threads early and terminating them late.
2015-04-19 17:53:29 -04:00
David Steele
b37d59832f v0.50: restore and much more
* Added restore functionality.

* All options can now be set on the command-line making pg_backrest.conf optional.

* De/compression is now performed without threads and checksum/size is calculated in stream.  That means file checksums are no longer optional.

* Added option `--no-start-stop` to allow backups when Postgres is shut down.  If `postmaster.pid` is present then `--force` is required to make the backup run (though if Postgres is running an inconsistent backup will likely be created).  This option was added primarily for the purpose of unit testing, but there may be applications in the real world as well.

* Fixed broken checksums and now they work with normal and resumed backups.  Finally realized that checksums and checksum deltas should be functionally separated and this simplied a number of things.  Issue #28 has been created for checksum deltas.

* Fixed an issue where a backup could be resumed from an aborted backup that didn't have the same type and prior backup.

* Removed dependency on Moose.  It wasn't being used extensively and makes for longer startup times.

* Checksum for backup.manifest to detect corrupted/modified manifest.

* Link `latest` always points to the last backup.  This has been added for convenience and to make restores simpler.

* More comprehensive unit tests in all areas.
2015-03-25 15:15:55 -04:00
David Steele
4bc4d97f2b v0.30: core restructuring and unit tests
* Complete rewrite of BackRest::File module to use a custom protocol for remote operations and Perl native GZIP and SHA operations.  Compression is performed in threads rather than forked processes.

* Fairly comprehensive unit tests for all the basic operations.  More work to be done here for sure, but then there is always more work to be done on unit tests.

* Removed dependency on Storable and replaced with a custom ini file implementation.

* Added much needed documentation (see INSTALL.md).

* Numerous other changes that can only be identified with a diff.
2014-10-05 19:49:30 -04:00
David Steele
1fa8dbb778 v0.19: Improved error reporting/handling
* Working on improving error handling in the file object.  This is not complete, but works well enough to find a few errors that have been causing us problems (notably, find is occasionally failing building the archive async manifest when system is under load).

* Found and squashed a nasty bug where file_copy was defaulted to ignore errors.  There was also an issue in file_exists that was causing the test to fail when the file actually did exist.  Together they could have resulted in a corrupt backup with no errors, though it is very unlikely.
2014-05-13 11:47:14 -04:00
David Steele
9acbba173e v0.18: Return soft error from archive-get when file is missing
* The archive-get function returns a 1 when the archive file is missing to differentiate from hard errors (ssh connection failure, file copy error, etc.)  This lets Postgres know that that the archive stream has terminated normally.  However, this does not take into account possible holes in the archive stream.
2014-04-13 09:51:51 -04:00
David Steele
7aa6c8ecaf v0.17: Warn when archive directories cannot be deleted
* If an archive directory which should be empty could not be deleted backrest was throwing an error.  There's a good fix for that coming, but for the time being it has been changed to a warning so processing can continue.  This was impacting backups as sometimes the final archive file would not get pushed if the first archive file had been in a different directory (plus some bad luck).
2014-04-03 18:17:40 -04:00
David Steele
be1163b948 v0.16: RequestTTY=yes for SSH sessions
* Added RequestTTY=yes to ssh sesssions.  Hoping this will prevent random lockups.
2014-04-01 10:49:37 -04:00
David Steele
dafaeb0b82 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).
2014-03-29 18:16:08 -04:00
David Steele
9d949b7ad6 v0.11: Minor fixes
Tweaking a few settings after running backups for about a month.

* Removed master_stderr_discard option on database SSH connections.  There have been occasional lockups and they could be related issues originally seen in the file code.

* 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.
2014-03-26 10:53:49 -04:00
David Steele
587bd1f8d9 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.

* No restore functionality, but the backup directories are consistent Postgres data directories.  You'll need to either uncompress the files or turn off compression in the backup.  Uncompressed backups on a ZFS (or similar) filesystem are a good option because backups can be restored locally via a snapshot to create logical backups or do spot data recovery.

* Archiving is single-threaded.  This has not posed an issue on our multi-terabyte databases with heavy write volume.  Recommend a large WAL volume or to use the async option with a large volume nearby.

* Backups are multi-threaded, but the Net::OpenSSH library does not appear to be 100% threadsafe so it will very occasionally lock up on a thread.  There is an overall process timeout that resolves this issue by killing the process.  Yes, very ugly.

* Checksums are lost on any resumed backup. Only the final backup will record checksum on multiple resumes.  Checksums from previous backups are correctly recorded and a full backup will reset everything.

* The backup.manifest is being written as Storable because Config::IniFile does not seem to handle large files well.  Would definitely like to save these as human-readable text.

* Absolutely no documentation (outside the code).  Well, excepting these release notes.

* Lots of other little things and not so little things.  Much refactoring to follow.
2014-03-05 19:53:13 -05:00
David Steele
1617afb704 Initial commit. 2014-03-05 19:51:03 -05:00