1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
pgbackrest/lib/pgBackRest/Version.pm

50 lines
2.2 KiB
Perl
Raw Normal View History

####################################################################################################################################
# VERSION MODULE
#
# Contains BackRest version and format numbers.
####################################################################################################################################
New simpler configuration and consistent project/exe/path naming. * The repo-path option now always refers to the repository where backups and archive are stored, whether local or remote, so the repo-remote-path option has been removed. The new spool-path option can be used to define a location for queueing WAL segments when archiving asynchronously. Otherwise, a local repository is no longer required. * Implemented a new config format which should be far simpler to use. See the User Guide and Configuration Reference for details but for a simple configuration all options can now be placed in the stanza section. Options that are shared between stanzas can be placed in the [global] section. More complex configurations can still make use of command sections though this should be a rare use case. * The default configuration filename is now pgbackrest.conf instead of pg_backrest.conf. This was done for consistency with other naming changes but also to prevent old config files from being loaded accidentally. * The default repository name was changed from /var/lib/backup to /var/lib/pgbackrest. * Lock files are now stored in /tmp/pgbackrest by default. These days /run/pgbackrest would be the preferred location but that would require init scripts which are not part of this release. The lock-path option can be used to configure the lock directory. * Log files are now stored in /var/log/pgbackrest by default and no longer have the date appended so they can be managed with logrotate. The log-path option can be used to configure the lock directory. * Executable filename changed from pg_backrest to pgbackrest.
2016-04-14 15:30:54 +02:00
package pgBackRest::Version;
use strict;
use warnings FATAL => qw(all);
use Cwd qw(abs_path);
use Exporter qw(import);
our @EXPORT = qw();
New simpler configuration and consistent project/exe/path naming. * The repo-path option now always refers to the repository where backups and archive are stored, whether local or remote, so the repo-remote-path option has been removed. The new spool-path option can be used to define a location for queueing WAL segments when archiving asynchronously. Otherwise, a local repository is no longer required. * Implemented a new config format which should be far simpler to use. See the User Guide and Configuration Reference for details but for a simple configuration all options can now be placed in the stanza section. Options that are shared between stanzas can be placed in the [global] section. More complex configurations can still make use of command sections though this should be a rare use case. * The default configuration filename is now pgbackrest.conf instead of pg_backrest.conf. This was done for consistency with other naming changes but also to prevent old config files from being loaded accidentally. * The default repository name was changed from /var/lib/backup to /var/lib/pgbackrest. * Lock files are now stored in /tmp/pgbackrest by default. These days /run/pgbackrest would be the preferred location but that would require init scripts which are not part of this release. The lock-path option can be used to configure the lock directory. * Log files are now stored in /var/log/pgbackrest by default and no longer have the date appended so they can be managed with logrotate. The log-path option can be used to configure the lock directory. * Executable filename changed from pg_backrest to pgbackrest.
2016-04-14 15:30:54 +02:00
# Project Name
#
# Defines the official project name.
#-----------------------------------------------------------------------------------------------------------------------------------
use constant BACKREST_NAME => 'pgBackRest';
push @EXPORT, qw(BACKREST_NAME);
use constant BACKREST_EXE => lc(BACKREST_NAME);
push @EXPORT, qw(BACKREST_EXE);
use constant BACKREST_CONF => BACKREST_EXE . '.conf';
push @EXPORT, qw(BACKREST_CONF);
New simpler configuration and consistent project/exe/path naming. * The repo-path option now always refers to the repository where backups and archive are stored, whether local or remote, so the repo-remote-path option has been removed. The new spool-path option can be used to define a location for queueing WAL segments when archiving asynchronously. Otherwise, a local repository is no longer required. * Implemented a new config format which should be far simpler to use. See the User Guide and Configuration Reference for details but for a simple configuration all options can now be placed in the stanza section. Options that are shared between stanzas can be placed in the [global] section. More complex configurations can still make use of command sections though this should be a rare use case. * The default configuration filename is now pgbackrest.conf instead of pg_backrest.conf. This was done for consistency with other naming changes but also to prevent old config files from being loaded accidentally. * The default repository name was changed from /var/lib/backup to /var/lib/pgbackrest. * Lock files are now stored in /tmp/pgbackrest by default. These days /run/pgbackrest would be the preferred location but that would require init scripts which are not part of this release. The lock-path option can be used to configure the lock directory. * Log files are now stored in /var/log/pgbackrest by default and no longer have the date appended so they can be managed with logrotate. The log-path option can be used to configure the lock directory. * Executable filename changed from pg_backrest to pgbackrest.
2016-04-14 15:30:54 +02:00
# Binary location
#
# Stores the exe location.
#-----------------------------------------------------------------------------------------------------------------------------------
use constant BACKREST_BIN => abs_path($0);
push @EXPORT, qw(BACKREST_BIN);
# BackRest Version Number
#
# Defines the current version of the BackRest executable. The version number is used to track features but does not affect what
# repositories or manifests can be read - that's the job of the format number.
#-----------------------------------------------------------------------------------------------------------------------------------
v1.13: Parallel Archiving, Stanza Create, Improved Info and Check IMPORTANT NOTE: The new implementation of asynchronous archiving no longer copies WAL to a separate queue. If there is any WAL left over in the old queue after upgrading to 1.13, it will be abandoned and not pushed to the repository. To prevent this outcome, stop archiving by setting archive_command = false. Next, drain the async queue by running pgbackrest --stanza=[stanza-name] archive-push and wait for the process to complete. Check that the queue in [spool-path]/archive/[stanza-name]/out is empty. Finally, install 1.13 and restore the original archive_command. IMPORTANT NOTE: The stanza-create command is not longer optional and must be executed before backup or archiving can be performed on a new stanza. Pre-existing stanzas do not require stanza-create to be executed. Bug Fixes: * Fixed const assignment giving compiler warning in C library. (Fixed by Adrian Vondendriesch.) * Fixed a few directory syncs that were missed for the --repo-sync option. * Fixed an issue where a missing user/group on restore could cause an "uninitialized value" error in File->owner(). (Reported by Leonardo Avellar.) * Fixed an issue where protocol mismatch errors did not output the expected value. * Fixed a spurious archive-get log message that indicated an exit code of 1 was an abnormal termination. Features: * Improved, multi-process implementation of asynchronous archiving. * Improved stanza-create command so that it can repair broken repositories in most cases and is robust enough to be made mandatory. (Contributed by Cynthia Shang.) * Improved check command to run on a standby, though only basic checks are done because pg_switch_xlog() cannot be executed on a replica. (Contributed by Cynthia Shang.) * Added archive and backup WAL ranges to the info command. * Added warning to update pg_tablespace.spclocation when remapping tablespaces in PostgreSQL < 9.2. (Contributed by blogh.) * Remove remote lock requirements for the archive-get, restore, info, and check commands since they are read-only operations. (Suggested by Michael Vitale.) Refactoring: * Refactor File and BackupCommon modules to improve test coverage. * Return proper error code when unable to convert a relative path to an absolute path. (Suggested by Yogesh Sharma.) * Log file banner is not output until the first log entry is written. (Suggested by Jens Wilke.) * Moved File->manifest() into the FileCommon.pm module. * Moved the Archive modules to the Archive directory and split the archive-get and archive-push commands into separate modules. * Split the check command out of the Archive.pm module. * Allow logging to be suppressed via logDisable() and logEnable(). * Allow for locks to be taken more than once in the same process without error. * Lock directories can be created when more than one directory level is required. * Clean up optionValid()/optionTest() logic in Lock.pm. * Added Exception::exceptionCode() and Exception::exceptionMessage() to simplify error handling logic. * Represent .gz extension with a constant. * Allow empty files to be created with FileCommon::fileStringWrite() and use temp files to avoid partial reads. * Refactor process IO and process master/minion code out from the common protocol code. * Reduced the likelihood of torn pages causing a false positive in page checksums by filtering on start backup LSN. * Remove Intel-specific optimization from C library build flags. (Contributed by Adrian Vondendriesch.) * Removed --lock option. This option was introduced before the lock directory could be located outside the repository and is now obsolete. * Added --log-timestamp option to allow timestamps to be suppressed in logging. This is primarily used to avoid filters in the automated documentation. * Fixed alignment issues with multiline logging.
2017-02-06 03:23:03 +02:00
use constant BACKREST_VERSION => '1.13';
push @EXPORT, qw(BACKREST_VERSION);
# Format Format Number
#
# Defines format for info and manifest files as well as on-disk structure. If this number changes then the repository will be
# invalid unless migration functions are written.
#-----------------------------------------------------------------------------------------------------------------------------------
use constant BACKREST_FORMAT => 5;
push @EXPORT, qw(BACKREST_FORMAT);
1;