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

159 Commits

Author SHA1 Message Date
David Steele
5307c858a7 v0.92: Command-line Repository Path Fix
* Fixed an issue where the master process was passing --repo-remote-path instead of --repo-path to the remote and causing the lock files to be created in the default repository directory (/var/lib/backup), generally ending in failure. This was only an issue when --repo-remote-path was defined on the command line rather than in pg_backrest.conf.  Reported by Jan Wieck.
2016-04-06 09:14:06 -04:00
David Steele
1ce9961f8a Closed #183: Options --repo-path and --repo-remote-path ignored in archive-push.
Fixed an issue where the master process was passing --repo-remote-path instead of --repo-path to the remote and causing the lock files to be created in the default repository directory (/var/lib/backup), generally ending in failure. This was only an issue when --repo-remote-path was defined on the command line rather than in pg_backrest.conf.
2016-04-06 08:57:46 -04:00
John K. Harvey
1bbf3e6db4 Fixed #181: Missing semicolon violates code style. 2016-03-22 22:18:33 -04:00
David Steele
1d4779cfe6 Next development cycle. 2016-03-22 10:23:20 -04:00
David Steele
aea14c8553 v0.91: Tablespace Bug Fix and Minor Enhancements
* **IMPORTANT BUG FIX FOR TABLESPACES**: A change to the repository format was accidentally introduced in 0.90 which means the on-disk backup was no longer a valid PostgreSQL cluster when the backup contained tablespaces. This only affected users who directly copied the backups to restore PostgreSQL clusters rather than using the restore command. However, the fix breaks compatibility with older backups that contain tablespaces no matter how they are being restored (pgBackRest will throw errors and refuse to restore). New full backups should be taken immediately after installing version 0.91 for any clusters that contain tablespaces. If older backups need to be restored then use a version of pgBackRest that matches the backup version. _Reported by Evan Benoit_.

* Copy global/pg_control last during backups.

* Write .info and .manifest files to temp before moving them to their final locations and fsync'ing.

* Rename --no-start-stop option to --no-online.

* Static source analysis using Perl-Critic, currently passes on gentle.
2016-03-22 10:16:42 -04:00
David Steele
d489914173 Closed #180: Backup format regression in v0.90. 2016-03-22 09:57:39 -04:00
David Steele
c669dc01e9 Fixed url references in latex documentation to use \href instead of \hyperref. 2016-03-10 10:58:07 -05:00
Brian Faherty
87dd0a127f Clarification for delta restore documentation to indicate that files may be removed. 2016-03-09 11:27:08 -05:00
David Steele
004067a5fa Correct retention-diff example value in documentation. 2016-03-08 09:29:03 -05:00
David Steele
d4c46acf48 Working on #174: Get Perl Critic to pass on stern
Added single exception for the violation of BuiltinFunctions::ProhibitStringyEval and removed from policy file.
2016-02-23 09:39:37 -05:00
David Steele
048571e23f Closed #173: Add static source code analysis
Perl Critic added and passes on gentle.  A policy file has been created with some permanent exceptions and a list of policies to be fixed in approximately the order they should be fixed in.
2016-02-23 09:25:22 -05:00
David Steele
d35ab82a83 Closed #167: Rename --no-start-stop option to --no-online. 2016-02-19 19:32:02 -05:00
David Steele
fb63a981cb Closed #166: Copy global/pg_control last during backup. 2016-02-14 20:42:11 -05:00
David Steele
f360d5072e Next development cycle. 2016-02-07 11:20:43 -05:00
David Steele
631535ae4f v0.90: 9.5 Support, Various Enhancements, and Minor Bug Fixes
* Fixed an issue where specifying --no-archive-check would throw a configuration error. Reported by Jason O'Donnell.

* Fixed an issue where a temp WAL file left over after a well-timed system crash could cause the next archive-push to fail.

* Fixed an issue where document generation failed because some OSs are not tolerant of having multiple installed versions of PostgreSQL. A separate VM is now created for each version. Also added a sleep after database starts during document generation to ensure the database is running before the next command runs. Reported by John Harvey.

* The retention-archive option can now be be safely set to less than backup retention (retention-full or retention-diff) without also specifying archive-copy=n. The WAL required to make the backups that fall outside of archive retention consistent will be preserved in the archive. However, in this case PITR will not be possible for the backups that fall outside of archive retention.

* When backing up and restoring tablespaces pgBackRest only operates on the subdirectory created for the version of PostgreSQL being run against. Since multiple versions can live in a tablespace (especially during a binary upgrade) this prevents too many files from being copied during a backup and other versions possibly being wiped out during a restore. This only applies to PostgreSQL >= 9.0 -- prior versions of PostgreSQL could not share a tablespace directory.

* Generate an error when archive-check=y but archivecommand does not execute pgbackrest. Contributed by Jason O'Donnell.

* Improved error message when repo-path or repo-remote-path does not exist.

* Added checks for --delta and --force restore options to ensure that the destination is a valid $PGDATA directory. pgBackRest will check for the presence of PGVERSION or backup.manifest (left over from an aborted restore). If neither file is found then --delta and --force will be disabled but the restore will proceed unless there are files in the $PGDATA directory (or any tablespace directories) in which case the operation will be aborted.

* When restore --set=latest (the default) the actual backup restored will be output to the log.

* Support for PostgreSQL 9.5 partial WAL segments and recoverytargetaction setting. The archivemode = 'always' setting is not yet supported.

* Support for recoverytarget = 'immediate' recovery setting introduced in PostgreSQL 9.4.

* The following tablespace checks have been added: paths or files in pgtblspc, relative links in pgtblspc, tablespaces in $PGDATA. All three will generate errors.
2016-02-07 10:47:16 -05:00
David Steele
de9b6d5133 Closed #113: Better error message when repo does not exist. 2016-02-06 16:49:12 -05:00
David Steele
f8b47997a3 Closed #127: More sanity checking for --delta restores
Added checks for `--delta` and `--force` restore options to ensure that the destination is a valid $PGDATA directory. pgBackRest will check for the presence of `PG_VERSION` or `backup.manifest` (left over from an aborted restore). If neither is found then `--delta` and `--force` will be disabled but the restore will proceed unless there are files in the $PGDATA directory (or any tablespace directories) in which case the operation will be aborted.
2016-02-05 23:03:29 -05:00
David Steele
5c815e4fc0 Closed #58: Get catalog number for better tablespace copying
When backing up and restoring tablespaces pgBackRest only operates on the subdirectory created for the version of PostgreSQL being run against. Since multiple versions can live in a tablespace (especially during a binary upgrade) this prevents too many files from being copied during a backup and other versions possibly being wiped out during a `--delta` restore. This only applies to PostgreSQL >= 9.0 -- before that only one PostgreSQL version could use a tablespace.
2016-02-02 14:33:15 -05:00
David Steele
24a1ad31d0 Minor rewording in user guide. 2016-02-02 11:57:46 -05:00
David Steele
02405e851c Closed #163: Document Generation Issue
Fixed an issue where document generation failed because some OSs are not tolerant of having multiple installed versions of PostgreSQL. A separate VM is now created for each version. Also added a sleep after database starts during document generation to ensure the database is running before the next command runs.

Reported by John Harvey.
2016-01-22 18:01:21 -05:00
David Steele
bacdd5583d User guide highlighting fixes for #93. 2016-01-22 14:38:48 -05:00
David Steele
e42b8de618 Updated Copyright for 2016. 2016-01-20 21:45:03 -05:00
David Steele
83b1a3cb44 Closed #150: Fixed an issue where a temp WAL file left over after a well-timed system crash could cause the next archive-push to fail. 2016-01-20 21:28:40 -05:00
David Steele
747346db67 Closed #162: When restore --set=latest (the default) the actual backup restored will be output to the log. 2016-01-20 18:34:42 -05:00
David Steele
2d38876bc4 Closed #93: The retention-archive option can now be be safely set to less than backup retention (retention-full or retention-diff) without also specifying archive-copy=n. The WAL required to make the backups that fall outside of archive retention consistent will be preserved in the archive. However, in this case PITR will still not be possible for backups that fall outside of archive retention. 2016-01-20 17:24:44 -05:00
David Steele
4d12cc233e Fix for typo in error message. 2016-01-15 20:31:29 -05:00
David Steele
e91e481f3d Closed #19: The following tablespace checks have been added: paths or files in pg_tblspc, relative links in pg_tblspc, tablespaces in $PGDATA. All three will generate errors. 2016-01-15 07:07:00 -05:00
David Steele
65d0c7dc3b Updated Crunchy URL. 2016-01-13 22:48:35 -05:00
David Steele
a0a3d1e97e Closed #122: 9.5 Integration
The archive_mode = always setting is not included but is covered by issue #125.
2016-01-13 20:35:12 -05:00
Jason O'Donnell
c7502f341b Generate an error when archive-check=y but archive_command does not execute pg_backrest. 2016-01-11 09:50:45 -05:00
David Steele
81a2fde21f Fixed typos in test documentation. 2016-01-10 21:07:07 -05:00
David Steele
29102b2887 Added error when archive_mode=always is configured. 2016-01-09 23:08:54 -05:00
David Steele
7f0f8823df Added support for partial WAL segments. 2016-01-09 19:37:28 -05:00
David Steele
e72165a689 Provisional support for PostgreSQL 9.5. No support for archive_mode = 'always' or .partial WAL on a standby. 2016-01-09 10:11:03 -05:00
David Steele
c8f863fbab Text execution improvements:
1) Tests for all operating systems can now be run with a single command.
2) Tests can be run in parallel with --process-max.
3) Container generation now integrated into test.pl
4) Some basic test documentation.
2016-01-09 08:21:53 -05:00
David Steele
6f6c796fbf Fixed an issue where specifying --no-archive-check would throw a configuration error. 2016-01-03 20:21:30 -05:00
David Steele
7f630aec49 Switched to using docker for all unit tests as this allows for greater automation. 2015-12-29 13:57:10 -05:00
David Steele
91d1e94076 Next development cycle. 2015-12-24 12:49:47 -05:00
David Steele
50a62fab6d v0.89: Timeout Bug Fix and Restore Read-Only Repositories
* Fixed an issue where longer-running backups/restores would timeout when remote and threaded. Keepalives are now used to make sure the remote for the main process does not timeout while the thread remotes do all the work. The error message for timeouts was also improved to make debugging easier.

* Allow restores to be performed on a read-only repository by using --no-lock and --log-level-file=off. The --no-lock option can only be used with restores.

* Minor styling changes, clarifications and rewording in the user guide.

* The dev branch has been renamed to master and for the time being the master branch has renamed to release, though it will probably be removed at some point -- thus ends the gitflow experiment for pgBackRest. It is recommended that any forks get re-forked and clones get re-cloned.
2015-12-24 11:32:29 -05:00
David Steele
ba098d7b91 Fixed an issue where longer-running backups/restores would timeout when remote and threaded.
Keepalives are now used to make sure the remote for the main process does not timeout while the thread remotes do all the work.  The error messages for timeouts was also improved to make debugging easier.
2015-12-24 10:32:25 -05:00
David Steele
b0a6954671 A number of doc improvements:
1) Started on a general markdown renderer
2) Internal links now work in PDF
3) Improvements to PDF styling
4) Some comment and formatting fixes
5) User guide edits.
2015-12-23 11:04:26 -05:00
David Steele
fdc99e30bd Allow restores to be run against a read-only repository.
Two things needed to be changed:
1) Don't open a log file when log-level-file=off
2) New --no-lock option to suppress lock file creation for restores.
2015-12-23 10:48:33 -05:00
David Steele
4925756dee Merge branch 'master' into dev after release 0.88 2015-11-22 18:16:54 -05:00
David Steele
e04c21b012 v0.88: Documentation and Minor Bug Fixes
* Added documentation in the user guide for delta restores, expiration, dedicated backup hosts, starting and stopping pgBackRest, and replication.

* Fixed an issue where the start/stop commands required the --config option.

* Fixed an issue where log files were being overwritten instead of appended.

* Fixed an issue where backup-user was not optional.

* Symlinks are no longer created in backup directories in the repository. These symlinks could point virtually anywhere and potentially be dangerous. Symlinks are still recreated during a restore.

* Added better messaging for backup expiration. Full and differential backup expirations are logged on a single line along with a list of all dependent backups expired.

* Archive retention is automatically set to full backup retention if not explicitly configured.
2015-11-22 17:27:30 -05:00
David Steele
fa05715dec Added documentation in the user guide for delta restores, expiration, dedicated backup hosts, starting and stopping pgBackRest, and replication. 2015-11-22 16:44:01 -05:00
David Steele
8ddfdcdd3b Various fixes and features implemented during doc development
* Better messaging for expiration.
* Fixed already stopped message.
* retention-archive and retention-archive-type now use retention-full and 'full' when not specified.
* Fixed issue where backup-user was required (should default to backrest).
* ExecuteTest now supports retries.
* Fixed issue where log test was not comparing test logs.
* Fixed issue where test logs would not match for ssh connection errors
2015-11-22 14:02:14 -05:00
David Steele
7ff9fc996c Release notes for fixes and rebuild command-line help. 2015-11-20 11:03:06 -05:00
David Steele
e5cf1d84a7 CSS Tweaks. 2015-10-29 17:45:29 +01:00
David Steele
2f83362f32 Minor user guide fix. 2015-10-28 13:02:35 +01:00
David Steele
a498becf11 Merge branch 'master' into dev after release 0.87 2015-10-28 11:29:04 +01:00