Skip to content

Commit

Permalink
release 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert depesz Lubaczewski committed Dec 16, 2013
1 parent f2dd190 commit dc6c55d
Show file tree
Hide file tree
Showing 33 changed files with 196 additions and 32 deletions.
4 changes: 2 additions & 2 deletions META.json
Expand Up @@ -2,7 +2,7 @@
"name": "omnipitr",
"abstract": "Advanced WAL File / Backup Management Tools",
"description": "OmniPITR provides a set of tools for managing PITR, including archive_commands, restore_commands, and creating backups from either the master or slave server",
"version": "1.2.0",
"version": "1.3.0",
"maintainer": "Robert Treat <rob@xzilla.net>",
"license": "postgresql",
"release_status": "stable",
Expand Down Expand Up @@ -32,7 +32,7 @@
"abstract": "Advanced WAL File / Backup Management Tools",
"file": "bin/omnipitr-archive",
"docfile": "doc/howto.pod",
"version": "1.2.0"
"version": "1.3.0"
}
}
}
12 changes: 12 additions & 0 deletions doc/changes.pod
Expand Up @@ -2,6 +2,18 @@

=encoding utf8

=head2 2013-12-16

=over

=item * Release of version 1.3.0

=item * Added --dry-run to omnipitr-backup-cleanup

=item * Added --help/docs to omnipitr-backup-cleanup

=back

=head2 2013-12-13

=over
Expand Down
152 changes: 152 additions & 0 deletions doc/omnipitr-backup-cleanup.pod
@@ -0,0 +1,152 @@
=head1 OmniPITR - omnipitr-backup-cleanup

=head2 USAGE

/some/path/omnipitr/bin/omnipitr-backup-cleanup [options]

Options:

=over

=item --archive (-a)

Where archived wal segments are kept.

Check L<Storage dir specification> for more details.

=item --backup-dir (-b)

Location of backup directory.

Check L<Storage dir specification> for more details.

=item --filename-template (-f)

Template for naming output files. Should be the same as was used for making
the backup by L<omnipitr-backup-master> or L<omnipitr-backup-slave>.

Defaults to the same value that these scripts use, so if you didn't change it
for making backups, you don't need to specify it in here.

=item --keep-days (-k)

How long to keep backups. Defaults to 7 days.

=item --log (-l)

Name of logfile (actually template, as it supports %% L<strftime(3)>
markers. Unfortunately due to the %x usage by PostgreSQL, We cannot use %%
macros directly. Instead - any occurence of ^ character in log dir will be first
changed to %, and later on passed to strftime.

Please note that on some systems (Solaris for example) default shell treats ^ as
special character, which requires you to quote the log filename (if it contains
^ character). So you'd better write it as:

--log '/var/log/omnipitr-^Y-^m-^d.log'

=item --verbose (-v)

Log verbosely what is happening.

=item --version (-V)

Prints version of I<omnipitr-backup-cleanup>, and exists.

=item --help (-?)

Prints this manual, and exists.

=item --config-file (--config / --cfg)

Loads options from config file.

Format of the file is very simple - each line is treated as argument with
optional value.

Examples:

--verbose
--archive /mnt/wal_archive
--backup-dir /mnt/backups
--log /tmp/log

It is important that you don't need to quote the values - value will always
be up to the end of line (trailing spaces will be removed). So if you'd
want, for example, to have magic-option set to "/mnt/badly named directory",
you'd need to quote it when setting from command line:

/some/omnipitr/program --magic-option="/mnt/badly named directory"

but not in config:

--magic-option=/mnt/badly named directory

Empty lines, and comment lines (starting with #) are ignored.

=back

=head2 DESCRIPTION

Call to I<omnipitr-backup-cleanup> should (generally) be in some kind of
scheduler - like crontab.

Set of options that you prefer depends on your situation, but at the very
least you need three options:

=over

=item * --backup-dir= - where are your backups. Please note that you have to
have backups made with OmniPITR v.1.3.0 at least, as previous versions didn't
have "meta" files.

=item * --archive-dir= - where are xlog files. These should be xlogs generated
by the same system that the backups are for.

=item * --log= - where to store logs about removal. You can use "-" as log
value, it will redirect logs to stdout.

=back

=head3 Storage dir specification

Directory is, in simplest situation, just a path. Usually, though, you will
have some kind of compression on one or both of the directories (backups,
archives).

In case of compression, you use the same syntax in every other omnipitr-*
program - that is you prefix path with compression type and "=" sign.

Allowed compression types:

=over

=item * gzip

Used file extension is .gz

=item * bzip2

Used file extension is .bz2

=item * lzma

Used file extension is .lzma

=back

=head2 EXAMPLES

=head3 Minimal setup:

/path/to/omnipitr-backup-cleanup -a /mnt/wal_archive -b /mnt/backups -l -

=head3 Compressed archive and backup dir, non default number of days to keep
backups, and store logs

/path/to/omnipitr-backup-cleanup -a gzip=/mnt/wal_archive -b gzip=/mnt/backups -l /var/log/omnipitr-backup-cleanup.log -v -k 3

=head2 COPYRIGHT

The OmniPITR project is Copyright (c) 2009-2013 OmniTI. All rights reserved.

2 changes: 1 addition & 1 deletion lib/OmniPITR/Log.pm
Expand Up @@ -9,7 +9,7 @@ use Data::Dumper;
use POSIX qw(strftime floor);
use IO::File;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';

BEGIN {
eval { use Time::HiRes qw( time ); };
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program.pm
Expand Up @@ -15,7 +15,7 @@ use Pod::Usage;
use Sys::Hostname;
use Carp;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';

=head1 new()
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Archive.pm
Expand Up @@ -2,7 +2,7 @@ package OmniPITR::Program::Archive;
use strict;
use warnings;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program );

use Carp;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Backup.pm
Expand Up @@ -2,7 +2,7 @@ package OmniPITR::Program::Backup;
use strict;
use warnings;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program );

use Config;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Backup/Cleanup.pm
Expand Up @@ -2,7 +2,7 @@ package OmniPITR::Program::Backup::Cleanup;
use strict;
use warnings;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program );

use Carp;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Backup/Master.pm
Expand Up @@ -2,7 +2,7 @@ package OmniPITR::Program::Backup::Master;
use strict;
use warnings;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Backup );

use Carp;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Backup/Slave.pm
Expand Up @@ -2,7 +2,7 @@ package OmniPITR::Program::Backup::Slave;
use strict;
use warnings;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Backup );

use File::Spec;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Checksum.pm
Expand Up @@ -2,7 +2,7 @@ package OmniPITR::Program::Checksum;
use strict;
use warnings;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program );

use Carp;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Cleanup.pm
Expand Up @@ -2,7 +2,7 @@ package OmniPITR::Program::Cleanup;
use strict;
use warnings;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program );

use Carp;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor.pm
Expand Up @@ -2,7 +2,7 @@ package OmniPITR::Program::Monitor;
use strict;
use warnings;

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program );

use Carp;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check.pm
Expand Up @@ -4,7 +4,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check/Archive_Queue.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Check );

use Data::Dumper;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check/Current_Archive_Time.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Check );

use Time::HiRes qw( time );
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check/Current_Restore_Time.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Check );

use Time::HiRes qw( time );
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check/Dump_State.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Check );

use Data::Dumper;
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check/Errors.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Check );

use Getopt::Long qw( :config no_ignore_case );
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check/Last_Archive_Age.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Check );

use Time::HiRes qw( time );
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check/Last_Backup_Age.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Check );

use Time::HiRes qw( time );
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Check/Last_Restore_Age.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Check );

use Time::HiRes qw( time );
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Parser.pm
Expand Up @@ -5,7 +5,7 @@ use Carp;
use Data::Dumper;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Parser/Archive.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Parser );

=head1 Parser/Archvie state data structure
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Parser/Backup.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Parser );

=head1 Backup_Slave/Backup_Master *base* state data structure
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor/Parser/Backup_Master.pm
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Carp;
use English qw( -no_match_vars );

our $VERSION = '1.2.0';
our $VERSION = '1.3.0';
use base qw( OmniPITR::Program::Monitor::Parser::Backup );

1;

0 comments on commit dc6c55d

Please sign in to comment.