pgbackrest.git / summary / log / commit / refs

commit    db24ff8df4b2c2de133461df3ab4f28167516dbf
Author:   David Steele <david@pgmasters.net>
Date:     Wed Jan 02 20:04:47 2019 +0000

    v2.08: Minor Improvements and Bug Fixes
    
    Bug Fixes:
    
    * Remove request for S3 object info directly after putting it. (Reported by Matt Kunkel.)
    * Correct archive-get-queue-max to be size type. (Reported by Ronan Dunklau.)
    * Add error message when current user uid/gid does not map to a name. (Reported by Camilo Aguilar.)
    * Error when --target-action=shutdown specified for PostgreSQL < 9.5.
    
    Improvements:
    
    * Set TCP keepalives on S3 connections. (Suggested by Ronan Dunklau.)
    * Reorder info command text output so most recent backup is output last. (Contributed by Cynthia Shang. Suggested by Ryan Lambert.)
    * Change file ownership only when required.
    * Redact authentication header when throwing S3 errors. (Suggested by Brad Nicholson.)


README.md | 2 +- doc/resource/exe.cache | 7523 ++++++++++++++++++++--- doc/xml/release.xml | 2 +- lib/pgBackRest/Version.pm | 2 +- src/perl/embed.auto.c | 2 +- src/version.h | 2 +- test/code-count/file-type.yaml | 124 +- test/lib/pgBackRestTest/Common/CodeCountTest.pm | 1 + 8 files changed, 6779 insertions(+), 879 deletions(-) diff --git a/README.md b/README.md index 0d97017a4..135445cdc 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ pgBackRest aims to be a simple, reliable backup and restore solution that can seamlessly scale up to the largest databases and workloads by utilizing algorithms that are optimized for database-specific requirements. -pgBackRest [v2.07](https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.07) is the current stable release. Release notes are on the [Releases](http://www.pgbackrest.org/release.html) page. +pgBackRest [v2.08](https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.08) is the current stable release. Release notes are on the [Releases](http://www.pgbackrest.org/release.html) page. Documentation for v1 can be found [here](http://www.pgbackrest.org/1). No further releases are planned for v1 because v2 is backward-compatible with v1 options and repositories. diff --git a/doc/resource/exe.cache b/doc/resource/exe.cache index be7e2ae9d..f8466f205 100644 --- a/doc/resource/exe.cache +++ b/doc/resource/exe.cache @@ -1,38 +1,5777 @@ { - "co6" : { + "default" : { "all" : { "user-guide" : [ { "key" : { - "id" : "s3", - "image" : "pgbackrest/test:s3-server-20180612A", - "name" : "s3-server", - "os" : "co6", - "update-hosts" : true + "id" : "build", + "image" : "pgbackrest/doc:debian", + "name" : "build", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "debian", + "update-hosts" : true + }, + "type" : "host", + "value" : { + "ip" : "172.17.0.2" + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir /root/pgbackrest-release-2.08" + ], + "host" : "build", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo cp -r /backrest/libc /root/pgbackrest-release-2.08" + ], + "host" : "build", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo cp -r /backrest/src /root/pgbackrest-release-2.08" + ], + "host" : "build", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo apt-get update" + ], + "host" : "build", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo apt-get install build-essential libssl-dev libxml2-dev libperl-dev zlib1g-dev" + ], + "cmd-extra" : "-y 2>&1", + "host" : "build", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "perl -V | grep USE_64_BIT_INT" + ], + "host" : "build", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo make -s -C /root/pgbackrest-release-2.08/src" + ], + "host" : "build", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "id" : "s3", + "image" : "pgbackrest/test:s3-server-20180612A", + "name" : "s3-server", + "os" : "debian", + "update-hosts" : true + }, + "type" : "host", + "value" : { + "ip" : "172.17.0.3" + } + }, + { + "key" : { + "id" : "pg1", + "image" : "pgbackrest/doc:debian", + "name" : "pg-primary", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "debian", + "update-hosts" : true + }, + "type" : "host", + "value" : { + "ip" : "172.17.0.4" + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" + ], + "cmd-extra" : "2>&1", + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 755 /usr/bin/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo apt-get install libdbd-pg-perl" + ], + "cmd-extra" : "-y 2>&1", + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p -m 770 /var/log/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown postgres:postgres /var/log/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p /etc/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p /etc/pgbackrest/conf.d" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo touch /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 640 /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown postgres:postgres /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "pgBackRest 2.08 - General help", + "", + "Usage:", + " pgbackrest [options] [command]", + "", + "Commands:", + " archive-get Get a WAL segment from the archive.", + " archive-push Push a WAL segment to the archive.", + " backup Backup a database cluster.", + " check Check the configuration.", + " expire Expire backups that exceed retention.", + " help Get help.", + " info Retrieve information about backups.", + " restore Restore a database cluster.", + " stanza-create Create the required stanza data.", + " stanza-delete Delete a stanza.", + " stanza-upgrade Upgrade a stanza.", + " start Allow pgBackRest processes to run.", + " stop Stop pgBackRest processes from running.", + " version Get version.", + "", + "Use 'pgbackrest help [command]' for more information." + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres /usr/lib/postgresql/9.4/bin/initdb \\", + " -D /var/lib/postgresql/9.4/demo -k -A peer" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_createcluster 9.4 demo" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "Configuring already existing cluster (configuration: /etc/postgresql/9.4/demo, data: /var/lib/postgresql/9.4/demo, owner: 106:110)", + "Ver Cluster Port Status Owner Data directory Log file", + "9.4 demo 5432 down postgres /var/lib/postgresql/9.4/demo /var/log/postgresql/postgresql-9.4-demo.log" + ] + } + }, + { + "key" : { + "file" : "/etc/postgresql/9.4/demo/postgresql.conf", + "host" : "pg-primary", + "option" : { + "listen_addresses" : { + "value" : "'*'" + } + } + }, + "type" : "cfg-postgresql", + "value" : { + "config" : [ + "listen_addresses = '*'" + ] + } + }, + { + "key" : { + "file" : "/etc/postgresql/9.4/demo/postgresql.conf", + "host" : "pg-primary", + "option" : { + "log_line_prefix" : { + "value" : "''" + } + } + }, + "type" : "cfg-postgresql", + "value" : { + "config" : [ + "listen_addresses = '*'", + "log_line_prefix = ''" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "demo" : { + "pg1-path" : { + "value" : "/var/lib/postgresql/9.4/demo" + } + }, + "global" : { + "log-level-stderr" : { + "value" : "off" + }, + "log-timestamp" : { + "value" : "n" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres bash -c ' \\", + " export PGBACKREST_LOG_PATH=/path/set/by/env && \\", + " pgbackrest --log-level-console=error help backup log-path'" + ], + "highlight" : { + "filter" : false, + "filter-context" : 2, + "list" : [ + "current\\: \\/path\\/set\\/by\\/env" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "pgBackRest 2.08 - 'backup' command - 'log-path' option help", + "", + "Path where log files are stored.", + "", + "The log path provides a location for pgBackRest to store log files. Note that", + "if log-level-file=off then no log path is required.", + "", + "current: /path/set/by/env", + "default: /var/log/pgbackrest" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p /var/lib/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 750 /var/lib/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown postgres:postgres /var/lib/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "repo1-path" : { + "value" : "/var/lib/pgbackrest" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-path=/var/lib/pgbackrest" + ] + } + }, + { + "key" : { + "file" : "/etc/postgresql/9.4/demo/postgresql.conf", + "host" : "pg-primary", + "option" : { + "archive_command" : { + "value" : "'pgbackrest --stanza=demo archive-push %p'" + }, + "archive_mode" : { + "value" : "on" + }, + "max_wal_senders" : { + "value" : "3" + }, + "wal_level" : { + "value" : "hot_standby" + } + } + }, + "type" : "cfg-postgresql", + "value" : { + "config" : [ + "archive_command = 'pgbackrest --stanza=demo archive-push %p'", + "archive_mode = on", + "listen_addresses = '*'", + "log_line_prefix = ''", + "max_wal_senders = 3", + "wal_level = hot_standby" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo restart" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global:archive-push" : { + "compress-level" : { + "value" : "3" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-path=/var/lib/pgbackrest", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "repo1-retention-full" : { + "value" : "2" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "repo1-cipher-pass" : { + "value" : "zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO" + }, + "repo1-cipher-type" : { + "value" : "aes-256-cbc" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", + "repo1-cipher-type=aes-256-cbc", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --log-level-console=info stanza-create" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "completed successfully" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: stanza-create command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: stanza-create command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --log-level-console=info check" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + " successfully stored in the archive at " + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: WAL segment 000000010000000000000001 successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.4-1/0000000100000000/000000010000000000000001-8f55f94bac91716acfc144cb1ed3d1bcaf5742dd.gz'", + "P00 INFO: check command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "no prior backup exists|full backup size" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo", + "P00 WARN: no prior backup exists, incr backup has been changed to full", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:44:53\": backup begins after the next regular checkpoint completes", + "P00 INFO: backup start archive = 000000010000000000000002, lsn = 0/2000028", + " [filtered 754 lines of output]", + "P01 INFO: backup file /var/lib/postgresql/9.4/demo/base/1/11895 (0B, 100%)", + "P01 INFO: backup file /var/lib/postgresql/9.4/demo/base/1/11885 (0B, 100%)", + "P00 INFO: full backup size = 19.2MB", + "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", + "P00 INFO: backup stop archive = 000000010000000000000002, lsn = 0/2000128", + " [filtered 4 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ls -1 /var/lib/pgbackrest/backup/demo | tail -5 | head -1" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "20190102-064453F" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=diff \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "diff backup size" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 4 lines of output]", + "P01 INFO: backup file /var/lib/postgresql/9.4/demo/global/pg_control (8KB, 97%) checksum cd623c27096f68e44ce5d5e6da4a1ce64b803fc4", + "P01 INFO: backup file /var/lib/postgresql/9.4/demo/backup_label (236B, 100%) checksum ea8d83192cc6c666aa24618dad8bf703c7771e2d", + "P00 INFO: diff backup size = 8.2KB", + "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", + "P00 INFO: backup stop archive = 000000010000000000000003, lsn = 0/30000F0", + " [filtered 4 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest info" + ], + "highlight" : { + "filter" : false, + "filter-context" : 2, + "list" : [ + "(full|incr|diff) backup" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "stanza: demo", + " status: ok", + " cipher: aes-256-cbc", + "", + " db (current)", + " wal archive min/max (9.4-1): 000000010000000000000002 / 000000010000000000000003", + "", + " full backup: 20190102-064453F", + " timestamp start/stop: 2019-01-02 06:44:53 / 2019-01-02 06:45:08", + " wal start/stop: 000000010000000000000002 / 000000010000000000000002", + " database size: 19.2MB, backup size: 19.2MB", + " repository size: 2.2MB, repository backup size: 2.2MB", + "", + " diff backup: 20190102-064453F_20190102-064509D", + " timestamp start/stop: 2019-01-02 06:45:09 / 2019-01-02 06:45:13", + " wal start/stop: 000000010000000000000003 / 000000010000000000000003", + " database size: 19.2MB, backup size: 8.2KB", + " repository size: 2.2MB, repository backup size: 400B", + " backup reference list: 20190102-064453F" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres rm /var/lib/postgresql/9.4/demo/global/pg_control" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "err-expect" : "1", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "could not find the database system" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "The PostgreSQL server failed to start. Please check the log output:", + "postgres: could not find the database system", + "Expected to find it in the directory \"/var/lib/postgresql/9.4/demo\",", + "but could not open file \"/var/lib/postgresql/9.4/demo/global/pg_control\": No such file or directory" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres find /var/lib/postgresql/9.4/demo -mindepth 1 -delete" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo restore" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=incr \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "backup begins after the next regular checkpoint completes" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --type=incr", + "P00 INFO: last backup label = 20190102-064453F_20190102-064509D, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:45:35\": backup begins after the next regular checkpoint completes", + "P00 INFO: backup start archive = 000000020000000000000005, lsn = 0/5000028", + "P00 WARN: a timeline switch has occurred since the last backup, enabling delta checksum", + " [filtered 9 lines of output]" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "start-fast" : { + "value" : "y" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", + "repo1-cipher-type=aes-256-cbc", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "start-fast=y", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=incr \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "backup begins after the requested immediate checkpoint completes" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", + "P00 INFO: last backup label = 20190102-064453F_20190102-064535I, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:45:49\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 000000020000000000000007, lsn = 0/7000028", + "P01 INFO: backup file /var/lib/postgresql/9.4/demo/global/pg_control (8KB, 97%) checksum 2ba75dfe45ba41bff94d0354bd4e62dc4eebdf3c", + " [filtered 8 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 550 /var/lib/pgbackrest/backup/demo/" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=incr \\", + " --log-level-console=info backup" + ], + "err-expect" : "47", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "ERROR:" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 2 lines of output]", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:46:32\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 000000020000000000000009, lsn = 0/9000060", + "P00 ERROR: [047]: unable to create path '/var/lib/pgbackrest/backup/demo/20190102-064453F_20190102-064632I': Permission denied", + "P00 INFO: backup command end: aborted with exception [047]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 750 /var/lib/pgbackrest/backup/demo/" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=incr \\", + " --log-level-console=info backup" + ], + "err-expect" : "57", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "ERROR:" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", + "P00 INFO: last backup label = 20190102-064453F_20190102-064549I, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:46:46\": backup begins after the requested immediate checkpoint completes", + "P00 ERROR: [057]: ERROR: a backup is already in progress", + " HINT: Run pg_stop_backup() and try again.:", + " select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_xlogfile_name(lsn), lsn::text, (select setting::int8 from pg_settings where name = 'wal_segment_size') * (select setting::int8 from pg_settings where name = 'wal_block_size') from pg_start_backup('pgBackRest backup started at 2019-01-02 06:46:46', true) as lsn" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "stop-auto" : { + "value" : "y" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", + "repo1-cipher-type=aes-256-cbc", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "start-fast=y", + "stop-auto=y", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=incr \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "cluster is already in backup mode|backup begins after the requested immediate checkpoint completes" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --stop-auto --type=incr", + "P00 INFO: last backup label = 20190102-064453F_20190102-064549I, version = 2.08", + "P00 WARN: the cluster is already in backup mode but no pgBackRest backup process is running. pg_stop_backup() will be called so a new backup can be started.", + "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:46:54\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 00000002000000000000000A, lsn = 0/A000028", + "P01 INFO: backup file /var/lib/postgresql/9.4/demo/global/pg_control (8KB, 97%) checksum c9afa2d3b11e3ce059b95c1a3ed255cdbbea5950", + " [filtered 8 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --output=json info" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "[", + " {", + " \"archive\" : [", + " {", + " \"database\" : {", + " \"id\" : 1", + " },", + " \"id\" : \"9.4-1\",", + " \"max\" : \"00000002000000000000000A\",", + " \"min\" : \"000000010000000000000002\"", + " }", + " ],", + " \"backup\" : [", + " {", + " \"archive\" : {", + " \"start\" : \"000000010000000000000002\",", + " \"stop\" : \"000000010000000000000002\"", + " },", + " \"backrest\" : {", + " \"format\" : 5,", + " \"version\" : \"2.08\"", + " },", + " \"database\" : {", + " \"id\" : 1", + " },", + " \"info\" : {", + " \"delta\" : 20162900,", + " \"repository\" : {", + " \"delta\" : 2389024,", + " \"size\" : 2389024", + " },", + " \"size\" : 20162900", + " },", + " \"label\" : \"20190102-064453F\",", + " \"prior\" : null,", + " \"reference\" : null,", + " \"timestamp\" : {", + " \"start\" : 1546411493,", + " \"stop\" : 1546411508", + " },", + " \"type\" : \"full\"", + " },", + " {", + " \"archive\" : {", + " \"start\" : \"000000010000000000000003\",", + " \"stop\" : \"000000010000000000000003\"", + " },", + " \"backrest\" : {", + " \"format\" : 5,", + " \"version\" : \"2.08\"", + " },", + " \"database\" : {", + " \"id\" : 1", + " },", + " \"info\" : {", + " \"delta\" : 8428,", + " \"repository\" : {", + " \"delta\" : 400,", + " \"size\" : 2389024", + " },", + " \"size\" : 20162900", + " },", + " \"label\" : \"20190102-064453F_20190102-064509D\",", + " \"prior\" : \"20190102-064453F\",", + " \"reference\" : [", + " \"20190102-064453F\"", + " ],", + " \"timestamp\" : {", + " \"start\" : 1546411509,", + " \"stop\" : 1546411513", + " },", + " \"type\" : \"diff\"", + " },", + " {", + " \"archive\" : {", + " \"start\" : \"000000020000000000000005\",", + " \"stop\" : \"000000020000000000000005\"", + " },", + " \"backrest\" : {", + " \"format\" : 5,", + " \"version\" : \"2.08\"", + " },", + " \"database\" : {", + " \"id\" : 1", + " },", + " \"info\" : {", + " \"delta\" : 8428,", + " \"repository\" : {", + " \"delta\" : 400,", + " \"size\" : 2389024", + " },", + " \"size\" : 20162900", + " },", + " \"label\" : \"20190102-064453F_20190102-064535I\",", + " \"prior\" : \"20190102-064453F_20190102-064509D\",", + " \"reference\" : [", + " \"20190102-064453F\"", + " ],", + " \"timestamp\" : {", + " \"start\" : 1546411535,", + " \"stop\" : 1546411544", + " },", + " \"type\" : \"incr\"", + " },", + " {", + " \"archive\" : {", + " \"start\" : \"000000020000000000000007\",", + " \"stop\" : \"000000020000000000000007\"", + " },", + " \"backrest\" : {", + " \"format\" : 5,", + " \"version\" : \"2.08\"", + " },", + " \"database\" : {", + " \"id\" : 1", + " },", + " \"info\" : {", + " \"delta\" : 8428,", + " \"repository\" : {", + " \"delta\" : 400,", + " \"size\" : 2389024", + " },", + " \"size\" : 20162900", + " },", + " \"label\" : \"20190102-064453F_20190102-064549I\",", + " \"prior\" : \"20190102-064453F_20190102-064535I\",", + " \"reference\" : [", + " \"20190102-064453F\"", + " ],", + " \"timestamp\" : {", + " \"start\" : 1546411549,", + " \"stop\" : 1546411573", + " },", + " \"type\" : \"incr\"", + " },", + " {", + " \"archive\" : {", + " \"start\" : \"00000002000000000000000A\",", + " \"stop\" : \"00000002000000000000000A\"", + " },", + " \"backrest\" : {", + " \"format\" : 5,", + " \"version\" : \"2.08\"", + " },", + " \"database\" : {", + " \"id\" : 1", + " },", + " \"info\" : {", + " \"delta\" : 8428,", + " \"repository\" : {", + " \"delta\" : 400,", + " \"size\" : 2389024", + " },", + " \"size\" : 20162900", + " },", + " \"label\" : \"20190102-064453F_20190102-064654I\",", + " \"prior\" : \"20190102-064453F_20190102-064549I\",", + " \"reference\" : [", + " \"20190102-064453F\"", + " ],", + " \"timestamp\" : {", + " \"start\" : 1546411614,", + " \"stop\" : 1546411621", + " },", + " \"type\" : \"incr\"", + " }", + " ],", + " \"cipher\" : \"aes-256-cbc\",", + " \"db\" : [", + " {", + " \"id\" : 1,", + " \"system-id\" : 6641786569162842418,", + " \"version\" : \"9.4\"", + " }", + " ],", + " \"name\" : \"demo\",", + " \"status\" : {", + " \"code\" : 0,", + " \"message\" : \"ok\"", + " }", + " }", + "]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres mkdir -p /var/lib/postgresql/pgbackrest/doc/example" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cp -r /backrest/doc/example/* \\", + " /var/lib/postgresql/pgbackrest/doc/example" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat \\", + " /var/lib/postgresql/pgbackrest/doc/example/pgsql-pgbackrest-info.sql" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "-- An example of monitoring pgBackRest from within PostgresSQL", + "--", + "-- Use copy to export data from the pgBackRest info command into the jsonb", + "-- type so it can be queried directly by PostgresSQL.", + "", + "-- Create monitor schema", + "create schema monitor;", + "", + "-- Get pgBackRest info in JSON format", + "create function monitor.pgbackrest_info()", + " returns jsonb AS $$", + "declare", + " data jsonb;", + "begin", + " -- Create a temp table to hold the JSON data", + " create temp table temp_pgbackrest_data (data jsonb);", + "", + " -- Copy data into the table directory from the pgBackRest into command", + " copy temp_pgbackrest_data (data)", + " from program", + " 'pgbackrest --output=json info | tr ''\\n'' '' ''' (format text);", + "", + " select temp_pgbackrest_data.data", + " into data", + " from temp_pgbackrest_data;", + "", + " drop table temp_pgbackrest_data;", + "", + " return data;", + "end $$ language plpgsql;" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -f \\", + " /var/lib/postgresql/pgbackrest/doc/example/pgsql-pgbackrest-info.sql" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat \\", + " /var/lib/postgresql/pgbackrest/doc/example/pgsql-pgbackrest-query.sql" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "-- Get last successful backup for each stanza", + "--", + "-- Requires the monitor.pgbackrest_info function.", + "with stanza as", + "(", + " select data->'name' as name,", + " data->'backup'->(", + " jsonb_array_length(data->'backup') - 1) as last_backup,", + " data->'archive'->(", + " jsonb_array_length(data->'archive') - 1) as current_archive", + " from jsonb_array_elements(monitor.pgbackrest_info()) as data", + ")", + "select name,", + " to_timestamp(", + " (last_backup->'timestamp'->>'stop')::numeric) as last_successful_backup,", + " current_archive->>'max' as last_archived_wal", + " from stanza;" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -f \\", + " /var/lib/postgresql/pgbackrest/doc/example/pgsql-pgbackrest-query.sql" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " name | last_successful_backup | last_archived_wal ", + "--------+------------------------+--------------------------", + " \"demo\" | 2019-01-02 06:47:01+00 | 00000002000000000000000A", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo apt-get install jq" + ], + "cmd-extra" : "-y 2>&1", + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --output=json --stanza=demo info | \\", + " jq '.[0] | .backup[-1] | .timestamp.stop'" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "1546411621" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --output=json --stanza=demo info | \\", + " jq '.[0] | .archive[-1] | .max'" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "\"00000002000000000000000A\"" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "repo1-retention-full" : { + "value" : "2" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", + "repo1-cipher-type=aes-256-cbc", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "start-fast=y", + "stop-auto=y", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=full \\", + " --log-level-console=detail backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "archive retention on backup 20190102-064453F|remove archive" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 763 lines of output]", + "P00 INFO: backup command end: completed successfully", + "P00 INFO: expire command begin", + "P00 DETAIL: archive retention on backup 20190102-064453F, archiveId = 9.4-1, start = 000000010000000000000002", + "P00 DETAIL: no archive to remove, archiveId = 9.4-1", + "P00 INFO: expire command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ls -1 /var/lib/pgbackrest/backup/demo | tail -5 | head -1" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "20190102-064736F" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=full \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "expire full backup set\\: 20190102-064453F|archive retention on backup 20190102-064736F|remove archive" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 763 lines of output]", + "P00 INFO: backup command end: completed successfully", + "P00 INFO: expire command begin", + "P00 INFO: expire full backup set: 20190102-064453F, 20190102-064453F_20190102-064509D, 20190102-064453F_20190102-064535I, 20190102-064453F_20190102-064549I, 20190102-064453F_20190102-064654I", + "P00 INFO: remove expired backup 20190102-064453F_20190102-064654I", + "P00 INFO: remove expired backup 20190102-064453F_20190102-064549I", + " [filtered 3 lines of output]" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "repo1-retention-diff" : { + "value" : "1" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", + "repo1-cipher-type=aes-256-cbc", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-diff=1", + "repo1-retention-full=2", + "start-fast=y", + "stop-auto=y", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=diff backup" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ls -1 /var/lib/pgbackrest/backup/demo | tail -5 | head -1" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "20190102-064758F_20190102-064818D" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=incr backup" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=diff \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "expire diff backup set: 20190102-064758F_20190102-064818D" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 10 lines of output]", + "P00 INFO: backup command end: completed successfully", + "P00 INFO: expire command begin", + "P00 INFO: expire diff backup set: 20190102-064758F_20190102-064818D, 20190102-064758F_20190102-064828I", + "P00 INFO: remove expired backup 20190102-064758F_20190102-064828I", + "P00 INFO: remove expired backup 20190102-064758F_20190102-064818D" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "repo1-retention-diff" : { + "value" : "2" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", + "repo1-cipher-type=aes-256-cbc", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-diff=2", + "repo1-retention-full=2", + "start-fast=y", + "stop-auto=y", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ls -1 /var/lib/pgbackrest/backup/demo | tail -5 | head -1" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "20190102-064758F_20190102-064839D" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \" \\", + " select pg_create_restore_point('generate WAL'); select pg_switch_xlog(); \\", + " select pg_create_restore_point('generate WAL'); select pg_switch_xlog();\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=diff \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "new backup label" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 7 lines of output]", + "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", + "P00 INFO: backup stop archive = 000000020000000000000014, lsn = 0/140000F0", + "P00 INFO: new backup label = 20190102-064758F_20190102-064855D", + "P00 INFO: backup command end: completed successfully", + "P00 INFO: expire command begin" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ls -1 /var/lib/pgbackrest/backup/demo | tail -5 | head -1" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "20190102-064758F_20190102-064855D" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --log-level-console=detail \\", + " --repo1-retention-archive-type=diff --repo1-retention-archive=1 expire" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "archive retention on backup 20190102-064758F_20190102-064839D|remove archive" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: expire command begin 2.08: --log-level-console=detail --log-level-stderr=off --no-log-timestamp --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-archive=1 --repo1-retention-archive-type=diff --repo1-retention-diff=2 --repo1-retention-full=2 --stanza=demo", + "P00 DETAIL: archive retention on backup 20190102-064736F, archiveId = 9.4-1, start = 00000002000000000000000C, stop = 00000002000000000000000C", + "P00 DETAIL: archive retention on backup 20190102-064758F, archiveId = 9.4-1, start = 00000002000000000000000D, stop = 00000002000000000000000D", + "P00 DETAIL: archive retention on backup 20190102-064758F_20190102-064839D, archiveId = 9.4-1, start = 000000020000000000000010, stop = 000000020000000000000010", + "P00 DETAIL: archive retention on backup 20190102-064758F_20190102-064855D, archiveId = 9.4-1, start = 000000020000000000000014", + "P00 DETAIL: remove archive: archiveId = 9.4-1, start = 00000002000000000000000E, stop = 00000002000000000000000F", + "P00 DETAIL: remove archive: archiveId = 9.4-1, start = 000000020000000000000011, stop = 000000020000000000000013", + "P00 INFO: expire command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta \\", + " --log-level-console=detail restore" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "demo\\/PG_VERSION - exists and matches backup|check\\/clean db path|restore global\\/pg_control" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 693 lines of output]", + "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/base/12134/PG_VERSION - exists and matches backup (4B, 99%) checksum 8dbabb96e032b8d9f1993c0e4b9141e71ade01a1", + "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/base/1/PG_VERSION - exists and matches backup (4B, 99%) checksum 8dbabb96e032b8d9f1993c0e4b9141e71ade01a1", + "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/PG_VERSION - exists and matches backup (4B, 100%) checksum 8dbabb96e032b8d9f1993c0e4b9141e71ade01a1", + "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/global/12086 - exists and is zero size (0B, 100%)", + "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/global/12038 - exists and is zero size (0B, 100%)", + " [filtered 83 lines of output]", + "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/base/1/11885 - exists and is zero size (0B, 100%)", + "P00 INFO: write /var/lib/postgresql/9.4/demo/recovery.conf", + "P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)", + "P00 INFO: restore command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"create database test1;\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "CREATE DATABASE" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"create database test2;\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "CREATE DATABASE" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=incr backup" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"create table test1_table (id int); \\", + " insert into test1_table (id) values (1);\" test1" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "INSERT 0 1" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"create table test2_table (id int); \\", + " insert into test2_table (id) values (2);\" test2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "INSERT 0 1" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -Atc \"select oid from pg_database where datname = 'test1'\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "24576" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres du -sh /var/lib/postgresql/9.4/demo/base/24576" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "6.5M\t/var/lib/postgresql/9.4/demo/base/24576" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta \\", + " --db-include=test2 restore" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"select * from test2_table;\" test2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " id ", + "----", + " 2", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"select * from test1_table;\" test1" + ], + "err-expect" : "2", + "highlight" : { + "filter" : false, + "filter-context" : 2, + "list" : [ + "relation mapping file.*contains invalid data" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "psql: FATAL: relation mapping file \"base/24576/pg_filenode.map\" contains invalid data" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres du -sh /var/lib/postgresql/9.4/demo/base/24576" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "152K\t/var/lib/postgresql/9.4/demo/base/24576" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"drop database test1;\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "DROP DATABASE" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"select oid, datname from pg_database order by oid;\"" + ], + "highlight" : { + "filter" : false, + "filter-context" : 2, + "list" : [ + "test2" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " oid | datname ", + "-------+-----------", + " 1 | template1", + " 12134 | template0", + " 12139 | postgres", + " 24577 | test2", + "(4 rows)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=diff backup" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"begin; \\", + " create table important_table (message text); \\", + " insert into important_table values ('Important Data'); \\", + " commit; \\", + " select * from important_table;\"" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "Important Data" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " message ", + "----------------", + " Important Data", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -Atc \"select current_timestamp\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "2019-01-02 06:50:44.892825+00" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"begin; \\", + " drop table important_table; \\", + " commit; \\", + " select * from important_table;\"" + ], + "err-expect" : "1", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "does not exist" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "ERROR: relation \"important_table\" does not exist", + "LINE 1: ...le important_table; commit; select * from important_...", + " ^" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta \\", + " --type=time \"--target=2019-01-02 06:50:44.892825+00\" restore" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/lib/postgresql/9.4/demo/recovery.conf" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "recovery_target_time" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "restore_command = 'pgbackrest --stanza=demo archive-get %f \"%p\"'", + "recovery_target_time = '2019-01-02 06:50:44.892825+00'" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"select * from important_table\"" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "Important Data" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " message ", + "----------------", + " Important Data", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "recovery stopping before|last completed transaction|starting point-in-time recovery" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "LOG: database system was interrupted; last known up at 2019-01-02 06:50:35 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:50:44.892825+00", + "LOG: restored log file \"00000004.history\" from archive", + "LOG: restored log file \"00000004000000000000001A\" from archive", + "LOG: redo starts at 0/1A000028", + "LOG: consistent recovery state reached at 0/1A000128", + "LOG: restored log file \"00000004000000000000001B\" from archive", + "LOG: recovery stopping before commit of transaction 689, time 2019-01-02 06:50:45.283203+00", + "LOG: redo done at 0/1B016E58", + "LOG: last completed transaction was at log time 2019-01-02 06:50:44.421633+00", + "LOG: selected new timeline ID: 5", + "LOG: restored log file \"00000004.history\" from archive", + " [filtered 5 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"begin; \\", + " drop table important_table; \\", + " commit; \\", + " select * from important_table;\"" + ], + "err-expect" : "1", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "does not exist" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "ERROR: relation \"important_table\" does not exist", + "LINE 1: ...le important_table; commit; select * from important_...", + " ^" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ls -1 /var/lib/pgbackrest/backup/demo | tail -5 | head -1" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "20190102-064758F_20190102-065034D" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --type=incr backup" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta \\", + " --type=time \"--target=2019-01-02 06:50:44.892825+00\" restore" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"select * from important_table\"" + ], + "err-expect" : "1", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "does not exist" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "ERROR: relation \"important_table\" does not exist", + "LINE 1: select * from important_table", + " ^" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "starting point-in-time recovery|consistent recovery state reached" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "LOG: database system was interrupted; last known up at 2019-01-02 06:50:59 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:50:44.892825+00", + "LOG: restored log file \"00000005.history\" from archive", + "LOG: restored log file \"00000005000000000000001C\" from archive", + "LOG: redo starts at 0/1C000028", + "LOG: consistent recovery state reached at 0/1C0000F0", + "LOG: redo done at 0/1C0000F0", + "LOG: restored log file \"00000005000000000000001C\" from archive", + " [filtered 9 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest info" + ], + "highlight" : { + "filter" : false, + "filter-context" : 2, + "list" : [ + "20190102-064758F_20190102-065034D" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "stanza: demo", + " status: ok", + " cipher: aes-256-cbc", + "", + " db (current)", + " wal archive min/max (9.4-1): 00000002000000000000000C / 00000005000000000000001C", + "", + " full backup: 20190102-064736F", + " timestamp start/stop: 2019-01-02 06:47:36 / 2019-01-02 06:47:56", + " wal start/stop: 00000002000000000000000C / 00000002000000000000000C", + " database size: 19.2MB, backup size: 19.2MB", + " repository size: 2.2MB, repository backup size: 2.2MB", + "", + " full backup: 20190102-064758F", + " timestamp start/stop: 2019-01-02 06:47:58 / 2019-01-02 06:48:13", + " wal start/stop: 00000002000000000000000D / 00000002000000000000000D", + " database size: 19.2MB, backup size: 19.2MB", + " repository size: 2.2MB, repository backup size: 2.2MB", + "", + " diff backup: 20190102-064758F_20190102-064855D", + " timestamp start/stop: 2019-01-02 06:48:55 / 2019-01-02 06:49:02", + " wal start/stop: 000000020000000000000014 / 000000020000000000000014", + " database size: 19.2MB, backup size: 8.2KB", + " repository size: 2.2MB, repository backup size: 400B", + " backup reference list: 20190102-064758F", + "", + " incr backup: 20190102-064758F_20190102-064942I", + " timestamp start/stop: 2019-01-02 06:49:42 / 2019-01-02 06:50:06", + " wal start/stop: 000000030000000000000017 / 000000030000000000000017", + " database size: 31.7MB, backup size: 12.5MB", + " repository size: 3.7MB, repository backup size: 1.5MB", + " backup reference list: 20190102-064758F", + "", + " diff backup: 20190102-064758F_20190102-065034D", + " timestamp start/stop: 2019-01-02 06:50:34 / 2019-01-02 06:50:43", + " wal start/stop: 00000004000000000000001A / 00000004000000000000001A", + " database size: 25.5MB, backup size: 6.3MB", + " repository size: 3MB, repository backup size: 771.5KB", + " backup reference list: 20190102-064758F", + "", + " incr backup: 20190102-064758F_20190102-065058I", + " timestamp start/stop: 2019-01-02 06:50:58 / 2019-01-02 06:51:05", + " wal start/stop: 00000005000000000000001C / 00000005000000000000001C", + " database size: 25.5MB, backup size: 1.7MB", + " repository size: 3MB, repository backup size: 201.4KB", + " backup reference list: 20190102-064758F, 20190102-064758F_20190102-065034D" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta \\", + " --type=time \"--target=2019-01-02 06:50:44.892825+00\" \\", + " --set=20190102-064758F_20190102-065034D restore" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"select * from important_table\"" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "Important Data" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " message ", + "----------------", + " Important Data", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "recovery stopping before|last completed transaction|starting point-in-time recovery" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "LOG: database system was interrupted; last known up at 2019-01-02 06:50:35 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:50:44.892825+00", + "LOG: restored log file \"00000004.history\" from archive", + "LOG: restored log file \"00000004000000000000001A\" from archive", + "LOG: redo starts at 0/1A000028", + "LOG: consistent recovery state reached at 0/1A000128", + "LOG: restored log file \"00000004000000000000001B\" from archive", + "LOG: recovery stopping before commit of transaction 689, time 2019-01-02 06:50:45.283203+00", + "LOG: redo done at 0/1B016E58", + "LOG: last completed transaction was at log time 2019-01-02 06:50:44.421633+00", + "LOG: restored log file \"00000005.history\" from archive", + "LOG: restored log file \"00000006.history\" from archive", + " [filtered 7 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo apt-get install libio-socket-ssl-perl libxml-libxml-perl" + ], + "cmd-extra" : "-y 2>&1", + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "aws s3 --no-verify-ssl mb s3://demo-bucket 2>&1" + ], + "host" : "s3-server", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "repo1-cipher-pass" : {}, + "repo1-cipher-type" : { + "value" : "none" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-cipher-type=none", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-diff=2", + "repo1-retention-full=2", + "start-fast=y", + "stop-auto=y", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "process-max" : { + "value" : "4" + }, + "repo1-path" : { + "value" : "/demo-repo" + }, + "repo1-s3-bucket" : { + "value" : "demo-bucket" + }, + "repo1-s3-endpoint" : { + "value" : "s3.amazonaws.com" + }, + "repo1-s3-key" : { + "value" : "accessKey1" + }, + "repo1-s3-key-secret" : { + "value" : "verySecretKey1" + }, + "repo1-s3-region" : { + "value" : "us-east-1" + }, + "repo1-s3-verify-ssl" : { + "value" : "n" + }, + "repo1-type" : { + "value" : "s3" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "process-max=4", + "repo1-cipher-type=none", + "repo1-path=/demo-repo", + "repo1-retention-diff=2", + "repo1-retention-full=2", + "repo1-s3-bucket=demo-bucket", + "repo1-s3-endpoint=s3.amazonaws.com", + "repo1-s3-key=accessKey1", + "repo1-s3-key-secret=verySecretKey1", + "repo1-s3-region=us-east-1", + "repo1-type=s3", + "start-fast=y", + "stop-auto=y", + "", + "[global:archive-push]", + "compress-level=3" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "echo \"172.17.0.3 demo-bucket.s3.amazonaws.com s3.amazonaws.com\" | tee -a /etc/hosts" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : "root" + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --log-level-console=info stanza-create" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "completed successfully" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: stanza-create command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stanza-create command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo \\", + " --log-level-console=info backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "no prior backup exists|full backup size" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=4 --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-retention-diff=2 --repo1-retention-full=2 --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo --start-fast --stop-auto", + "P00 WARN: no prior backup exists, incr backup has been changed to full", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:51:46\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 00000007000000000000001C, lsn = 0/1C000028", + " [filtered 995 lines of output]", + "P02 INFO: backup file /var/lib/postgresql/9.4/demo/base/1/11895 (0B, 100%)", + "P04 INFO: backup file /var/lib/postgresql/9.4/demo/base/1/11885 (0B, 100%)", + "P00 INFO: full backup size = 25.5MB", + "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", + "P00 INFO: backup stop archive = 00000007000000000000001C, lsn = 0/1C000128", + " [filtered 4 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --log-level-console=info stop" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "completed successfully" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: stop command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stop command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --log-level-console=info stanza-delete" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "completed successfully" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: stanza-delete command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stanza-delete command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "id" : "repo1", + "image" : "pgbackrest/doc:debian", + "name" : "repository", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "debian", + "update-hosts" : true + }, + "type" : "host", + "value" : { + "ip" : "172.17.0.5" + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo adduser --disabled-password --gecos \"\" pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" + ], + "cmd-extra" : "2>&1", + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 755 /usr/bin/pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo apt-get install libdbd-pg-perl" + ], + "cmd-extra" : "-y 2>&1", + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p -m 770 /var/log/pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown pgbackrest:pgbackrest /var/log/pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p /etc/pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p /etc/pgbackrest/conf.d" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo touch /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 640 /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown pgbackrest:pgbackrest /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p /var/lib/pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 750 /var/lib/pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown pgbackrest:pgbackrest /var/lib/pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest mkdir -m 750 /home/pgbackrest/.ssh" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest ssh-keygen -f /home/pgbackrest/.ssh/id_rsa \\", + " -t rsa -b 4096 -N \"\"" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres mkdir -m 750 -p /var/lib/postgresql/.ssh" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ssh-keygen -f /var/lib/postgresql/.ssh/id_rsa \\", + " -t rsa -b 4096 -N \"\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "(echo -n 'no-agent-forwarding,no-X11-forwarding,no-port-forwarding,' && \\", + " echo -n 'command=\"/usr/bin/pgbackrest ${SSH_ORIGINAL_COMMAND#* }\" ' && \\", + " sudo ssh root@pg-primary cat /var/lib/postgresql/.ssh/id_rsa.pub) | \\", + " sudo -u pgbackrest tee -a /home/pgbackrest/.ssh/authorized_keys" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : "root" + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "(echo -n 'no-agent-forwarding,no-X11-forwarding,no-port-forwarding,' && \\", + " echo -n 'command=\"/usr/bin/pgbackrest ${SSH_ORIGINAL_COMMAND#* }\" ' && \\", + " sudo ssh root@repository cat /home/pgbackrest/.ssh/id_rsa.pub) | \\", + " sudo -u postgres tee -a /var/lib/postgresql/.ssh/authorized_keys" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : "root" + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest ssh postgres@pg-primary" + ], + "cmd-extra" : "-o StrictHostKeyChecking=no", + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ssh pgbackrest@repository" + ], + "cmd-extra" : "-o StrictHostKeyChecking=no", + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "repository", + "option" : { + "global" : { + "repo1-path" : { + "value" : "/var/lib/pgbackrest" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[global]", + "repo1-path=/var/lib/pgbackrest" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "repository", + "option" : { + "demo" : { + "pg1-host" : { + "value" : "pg-primary" + }, + "pg1-path" : { + "value" : "/var/lib/postgresql/9.4/demo" + } + }, + "global" : { + "log-level-stderr" : { + "value" : "off" + }, + "log-timestamp" : { + "value" : "n" + }, + "repo1-retention-full" : { + "value" : "2" + }, + "start-fast" : { + "value" : "y" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-host=pg-primary", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "start-fast=y" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "demo" : { + "pg1-path" : { + "value" : "/var/lib/postgresql/9.4/demo" + } + }, + "global" : { + "log-level-file" : { + "value" : "detail" + }, + "log-level-stderr" : { + "value" : "off" + }, + "log-timestamp" : { + "value" : "n" + }, + "repo1-host" : { + "value" : "repository" + } + } + }, + "reset" : true + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "log-level-file=detail", + "repo1-host=repository" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo stanza-create" + ], + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo check" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo check" + ], + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo backup" + ], + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 WARN: no prior backup exists, incr backup has been changed to full" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta restore" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo backup" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo --type=full backup" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "repository", + "option" : { + "global" : { + "process-max" : { + "value" : "3" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-host=pg-primary", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "process-max=3", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "start-fast=y" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo --type=full backup" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest info" + ], + "highlight" : { + "filter" : false, + "filter-context" : 2, + "list" : [ + "timestamp start/stop" + ] + }, + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "stanza: demo", + " status: ok", + " cipher: none", + "", + " db (current)", + " wal archive min/max (9.4-1): 000000080000000000000024 / 000000080000000000000025", + "", + " full backup: 20190102-065355F", + " timestamp start/stop: 2019-01-02 06:53:55 / 2019-01-02 06:54:12", + " wal start/stop: 000000080000000000000024 / 000000080000000000000024", + " database size: 25.5MB, backup size: 25.5MB", + " repository size: 3MB, repository backup size: 3MB", + "", + " full backup: 20190102-065414F", + " timestamp start/stop: 2019-01-02 06:54:14 / 2019-01-02 06:54:26", + " wal start/stop: 000000080000000000000025 / 000000080000000000000025", + " database size: 25.5MB, backup size: 25.5MB", + " repository size: 3MB, repository backup size: 3MB" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo backup" + ], + "err-expect" : "62", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "\\: stop file exists for all stanzas" + ] + }, + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 ERROR: [062]: raised from remote process on 'pg-primary': stop file exists for all stanzas" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 WARN: stop file already exists for all stanzas" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo backup" + ], + "err-expect" : "62", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "\\: stop file exists for stanza demo" + ] + }, + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 ERROR: [062]: raised from remote process on 'pg-primary': stop file exists for stanza demo" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "id" : "pg2", + "image" : "pgbackrest/doc:debian", + "name" : "pg-standby", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "debian", + "update-hosts" : true + }, + "type" : "host", + "value" : { + "ip" : "172.17.0.6" + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" + ], + "cmd-extra" : "2>&1", + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 755 /usr/bin/pgbackrest" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo apt-get install libdbd-pg-perl" + ], + "cmd-extra" : "-y 2>&1", + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p -m 770 /var/log/pgbackrest" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown postgres:postgres /var/log/pgbackrest" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p /etc/pgbackrest" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p /etc/pgbackrest/conf.d" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo touch /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chmod 640 /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown postgres:postgres /etc/pgbackrest/pgbackrest.conf" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres mkdir -m 750 -p /var/lib/postgresql/.ssh" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ssh-keygen -f /var/lib/postgresql/.ssh/id_rsa \\", + " -t rsa -b 4096 -N \"\"" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "(echo -n 'no-agent-forwarding,no-X11-forwarding,no-port-forwarding,' && \\", + " echo -n 'command=\"/usr/bin/pgbackrest ${SSH_ORIGINAL_COMMAND#* }\" ' && \\", + " sudo ssh root@pg-standby cat /var/lib/postgresql/.ssh/id_rsa.pub) | \\", + " sudo -u pgbackrest tee -a /home/pgbackrest/.ssh/authorized_keys" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : "root" + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "(echo -n 'no-agent-forwarding,no-X11-forwarding,no-port-forwarding,' && \\", + " echo -n 'command=\"/usr/bin/pgbackrest ${SSH_ORIGINAL_COMMAND#* }\" ' && \\", + " sudo ssh root@repository cat /home/pgbackrest/.ssh/id_rsa.pub) | \\", + " sudo -u postgres tee -a /var/lib/postgresql/.ssh/authorized_keys" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : "root" + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest ssh postgres@pg-standby" + ], + "cmd-extra" : "-o StrictHostKeyChecking=no", + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres ssh pgbackrest@repository" + ], + "cmd-extra" : "-o StrictHostKeyChecking=no", + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-standby", + "option" : { + "demo" : { + "pg1-path" : { + "value" : "/var/lib/postgresql/9.4/demo" + }, + "recovery-option" : { + "value" : "standby_mode=on" + } + }, + "global" : { + "log-level-file" : { + "value" : "detail" + }, + "log-level-stderr" : { + "value" : "off" + }, + "log-timestamp" : { + "value" : "n" + }, + "repo1-host" : { + "value" : "repository" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "recovery-option=standby_mode=on", + "", + "[global]", + "log-level-file=detail", + "repo1-host=repository" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_createcluster 9.4 demo" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta restore" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/lib/postgresql/9.4/demo/recovery.conf" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "standby_mode = 'on'", + "restore_command = 'pgbackrest --stanza=demo archive-get %f \"%p\"'" + ] + } + }, + { + "key" : { + "file" : "/etc/postgresql/9.4/demo/postgresql.conf", + "host" : "pg-standby", + "option" : { + "archive_command" : { + "value" : "'pgbackrest --stanza=demo archive-push %p'" + }, + "archive_mode" : { + "value" : "on" + }, + "hot_standby" : { + "value" : "on" + }, + "log_filename" : { + "value" : "'postgresql.log'" + }, + "log_line_prefix" : { + "value" : "''" + }, + "max_wal_senders" : { + "value" : "3" + }, + "wal_level" : { + "value" : "hot_standby" + } + } + }, + "type" : "cfg-postgresql", + "value" : { + "config" : [ + "archive_command = 'pgbackrest --stanza=demo archive-push %p'", + "archive_mode = on", + "hot_standby = on", + "log_filename = 'postgresql.log'", + "log_line_prefix = ''", + "max_wal_senders = 3", + "wal_level = hot_standby" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "entering standby mode|database system is ready to accept read only connections" + ] + }, + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "LOG: could not bind IPv6 socket: Cannot assign requested address", + "HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.", + "LOG: database system was interrupted; last known up at 2019-01-02 06:54:15 UTC", + "LOG: entering standby mode", + "LOG: incomplete startup packet", + "LOG: restored log file \"00000008.history\" from archive", + " [filtered 2 lines of output]", + "LOG: redo starts at 0/25000028", + "LOG: consistent recovery state reached at 0/250000F0", + "LOG: database system is ready to accept read only connections" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \" \\", + " begin; \\", + " create table replicated_table (message text); \\", + " insert into replicated_table values ('Important Data'); \\", + " commit; \\", + " select * from replicated_table\";" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "Important Data" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " message ", + "----------------", + " Important Data", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"select * from replicated_table;\"" + ], + "err-expect" : "1", + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "does not exist" + ] + }, + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "ERROR: relation \"replicated_table\" does not exist", + "LINE 1: select * from replicated_table;", + " ^" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"select *, current_timestamp from pg_switch_xlog()\";" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " pg_switch_xlog | now ", + "----------------+-------------------------------", + " 0/26019A70 | 2019-01-02 06:55:34.082658+00", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \" \\", + " select *, current_timestamp from replicated_table\"" + ], + "highlight" : { + "filter" : false, + "filter-context" : 2, + "list" : [ + "Important Data" + ] + }, + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " message | now ", + "----------------+-------------------------------", + " Important Data | 2019-01-02 06:55:39.138356+00", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --log-level-console=info check" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "all other checks passed" + ] + }, + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-host=repository --stanza=demo", + "P00 INFO: switch xlog cannot be performed on the standby, all other checks passed successfully", + "P00 INFO: check command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \" \\", + " create user replicator password 'jw8s0F4' replication\";" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "CREATE ROLE" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sh -c 'echo \\", + " \"host replication replicator 172.17.0.6/32 md5\" \\", + " >> /etc/postgresql/9.4/demo/pg_hba.conf'" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo reload" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-standby", + "option" : { + "demo" : { + "recovery-option" : { + "value" : "primary_conninfo=host=172.17.0.4 port=5432 user=replicator" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "recovery-option=standby_mode=on", + "recovery-option=primary_conninfo=host=172.17.0.4 port=5432 user=replicator", + "", + "[global]", + "log-level-file=detail", + "repo1-host=repository" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sh -c 'echo \\", + " \"172.17.0.4:*:replication:replicator:jw8s0F4\" \\", + " >> /var/lib/postgresql/.pgpass'" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres chmod 600 /var/lib/postgresql/.pgpass" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta restore" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/lib/postgresql/9.4/demo/recovery.conf" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "primary_conninfo = 'host=172.17.0.4 port=5432 user=replicator'", + "standby_mode = 'on'", + "restore_command = 'pgbackrest --stanza=demo archive-get %f \"%p\"'" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo start" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "started streaming WAL from primary" + ] + }, + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 10 lines of output]", + "LOG: database system is ready to accept read only connections", + "LOG: restored log file \"000000080000000000000026\" from archive", + "LOG: started streaming WAL from primary at 0/27000000 on timeline 8" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \" \\", + " begin; \\", + " create table stream_table (message text); \\", + " insert into stream_table values ('Important Data'); \\", + " commit; \\", + " select *, current_timestamp from stream_table\";" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "Important Data" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " message | now ", + "----------------+------------------------------", + " Important Data | 2019-01-02 06:55:57.19745+00", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \" \\", + " select *, current_timestamp from stream_table\"" + ], + "highlight" : { + "filter" : false, + "filter-context" : 2, + "list" : [ + "Important Data" + ] + }, + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " message | now ", + "----------------+-------------------------------", + " Important Data | 2019-01-02 06:55:57.664306+00", + "(1 row)" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p -m 750 /var/spool/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown postgres:postgres /var/spool/pgbackrest" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo mkdir -p -m 750 /var/spool/pgbackrest" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo chown postgres:postgres /var/spool/pgbackrest" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "global" : { + "archive-async" : { + "value" : "y" + }, + "spool-path" : { + "value" : "/var/spool/pgbackrest" + } + }, + "global:archive-get" : { + "process-max" : { + "value" : "2" + } + }, + "global:archive-push" : { + "process-max" : { + "value" : "2" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "archive-async=y", + "log-level-file=detail", + "repo1-host=repository", + "spool-path=/var/spool/pgbackrest", + "", + "[global:archive-get]", + "process-max=2", + "", + "[global:archive-push]", + "process-max=2" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-standby", + "option" : { + "global" : { + "archive-async" : { + "value" : "y" + }, + "spool-path" : { + "value" : "/var/spool/pgbackrest" + } + }, + "global:archive-get" : { + "process-max" : { + "value" : "2" + } + }, + "global:archive-push" : { + "process-max" : { + "value" : "2" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.4/demo", + "recovery-option=standby_mode=on", + "recovery-option=primary_conninfo=host=172.17.0.4 port=5432 user=replicator", + "", + "[global]", + "archive-async=y", + "log-level-file=detail", + "repo1-host=repository", + "spool-path=/var/spool/pgbackrest", + "", + "[global:archive-get]", + "process-max=2", + "", + "[global:archive-push]", + "process-max=2" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"alter user replicator password 'bogus'\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "ALTER ROLE" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo restart" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres rm -f /var/log/pgbackrest/demo-archive-push-async.log" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \" \\", + " select pg_create_restore_point('test async push'); select pg_switch_xlog(); \\", + " select pg_create_restore_point('test async push'); select pg_switch_xlog(); \\", + " select pg_create_restore_point('test async push'); select pg_switch_xlog(); \\", + " select pg_create_restore_point('test async push'); select pg_switch_xlog(); \\", + " select pg_create_restore_point('test async push'); select pg_switch_xlog();\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --log-level-console=info check" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "WAL segment" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-host=repository --stanza=demo", + "P00 INFO: WAL segment 00000008000000000000002C successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.4-1/0000000800000000/00000008000000000000002C-55206cb0dca22ff15b90ec70d88ca335b8a42e79.gz'", + "P00 INFO: check command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/log/pgbackrest/demo-archive-push-async.log" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + " WAL file\\(s\\) to archive|pushed WAL file 0000000" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "-------------------PROCESS START-------------------", + "P00 INFO: archive-push command begin 2.08: [pg_xlog/000000080000000000000027] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: push 5 WAL file(s) to archive: 000000080000000000000027...00000008000000000000002B", + "P01 DETAIL: pushed WAL file 000000080000000000000027 to archive", + "P02 DETAIL: pushed WAL file 000000080000000000000028 to archive", + "P01 DETAIL: pushed WAL file 000000080000000000000029 to archive", + "P02 DETAIL: pushed WAL file 00000008000000000000002A to archive", + "P01 DETAIL: pushed WAL file 00000008000000000000002B to archive", + "P00 INFO: archive-push command end: completed successfully", + "", + "-------------------PROCESS START-------------------", + "P00 INFO: archive-push command begin 2.08: [pg_xlog/00000008000000000000002C] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: push 1 WAL file(s) to archive: 00000008000000000000002C", + "P01 DETAIL: pushed WAL file 00000008000000000000002C to archive", + "P00 INFO: archive-push command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 5" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres cat /var/log/pgbackrest/demo-archive-get-async.log" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "got WAL file [0-F]{24} from archive" + ] + }, + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "-------------------PROCESS START-------------------", + "P00 INFO: archive-get command begin 2.08: [000000080000000000000025, 000000080000000000000026, 000000080000000000000027, 000000080000000000000028, 000000080000000000000029, 00000008000000000000002A, 00000008000000000000002B, 00000008000000000000002C] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000025...00000008000000000000002C", + "P01 DETAIL: got WAL file 000000080000000000000025 from archive", + "P02 DETAIL: got WAL file 000000080000000000000026 from archive", + "P01 DETAIL: WAL file 000000080000000000000027 not found in archive", + "P02 DETAIL: WAL file 000000080000000000000028 not found in archive", + " [filtered 33 lines of output]", + "P00 INFO: archive-get command begin 2.08: [000000080000000000000027, 000000080000000000000028, 000000080000000000000029, 00000008000000000000002A, 00000008000000000000002B, 00000008000000000000002C, 00000008000000000000002D, 00000008000000000000002E] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000027...00000008000000000000002E", + "P01 DETAIL: got WAL file 000000080000000000000027 from archive", + "P02 DETAIL: got WAL file 000000080000000000000028 from archive", + "P02 DETAIL: got WAL file 00000008000000000000002A from archive", + "P01 DETAIL: got WAL file 000000080000000000000029 from archive", + "P01 DETAIL: WAL file 00000008000000000000002C not found in archive", + "P01 DETAIL: WAL file 00000008000000000000002D not found in archive", + "P01 DETAIL: WAL file 00000008000000000000002E not found in archive", + "P02 DETAIL: got WAL file 00000008000000000000002B from archive", + "P00 INFO: archive-get command end: completed successfully", + "", + " [filtered 5 lines of output]", + "P02 DETAIL: WAL file 00000008000000000000002F not found in archive", + "P02 DETAIL: WAL file 000000080000000000000030 not found in archive", + "P01 DETAIL: got WAL file 00000008000000000000002C from archive", + "P00 INFO: archive-get command end: completed successfully", + "", + " [filtered 24 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres psql -c \"alter user replicator password 'jw8s0F4'\"" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "ALTER ROLE" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "repository", + "option" : { + "demo" : { + "pg2-host" : { + "value" : "pg-standby" + }, + "pg2-path" : { + "value" : "/var/lib/postgresql/9.4/demo" + } + }, + "global" : { + "backup-standby" : { + "value" : "y" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-host=pg-primary", + "pg1-path=/var/lib/postgresql/9.4/demo", + "pg2-host=pg-standby", + "pg2-path=/var/lib/postgresql/9.4/demo", + "", + "[global]", + "backup-standby=y", + "process-max=3", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "start-fast=y" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo --log-level-console=detail backup" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "backup file pg-primary|replay on the standby" + ] + }, + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 2 lines of output]", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:56:22\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 00000008000000000000002E, lsn = 0/2E000028", + "P00 INFO: wait for replay on the standby to reach 0/2E000028", + "P00 INFO: replay on the standby reached 0/2E0000C8", + "P02 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/12007 (392KB, 20%) checksum c2daa57c2f174e372048c69d04c4f7cbaa6e23b0", + "P04 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/12009 (240KB, 32%) checksum 89225f4bc52166bd18b0ac1f6081172a17067b46", + " [filtered 9 lines of output]", + "P02 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/11880 (32KB, 88%) checksum f9520d3d55206a085785aebae4f6c4aa1a8fdf00", + "P03 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/11879 (32KB, 90%) checksum 69bc55fdda5f5f8e5d95296aab559f71f0ddde81", + "P01 INFO: backup file pg-primary:/var/lib/postgresql/9.4/demo/global/pg_control (8KB, 90%) checksum d120b63246302deedc6730d22218ca159ae0a364", + "P04 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/11925 (24KB, 92%) checksum 8dc68ff7cd40bb13f381e94300567b0cbd58a4d0", + "P02 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/11900_fsm (24KB, 93%) checksum c526710668d4cb86fd1488df1151e66355f8e861", + "P04 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/global/11883 (16KB, 94%) checksum 67fceae5ba762d363ee233b324dda33f0dbf3b98", + "P01 INFO: backup file pg-primary:/var/lib/postgresql/9.4/demo/backup_label (238B, 94%) checksum 1496a368650fd934e7f59a652a8effcd1c2db746", + "P03 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/global/11884 (16KB, 95%) checksum af5f1cd5ffbea42738c187fbfa843f7b862b16c8", + "P02 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/11928 (16KB, 95%) checksum 88f69a89fb06001330674e448044c7bc5f03b675", + " [filtered 19 lines of output]" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.4 demo stop" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres /usr/lib/postgresql/9.5/bin/initdb \\", + " -D /var/lib/postgresql/9.5/demo -k -A peer" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_createcluster 9.5 demo" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sh -c 'cd /var/lib/postgresql && \\", + " /usr/lib/postgresql/9.5/bin/pg_upgrade \\", + " --old-bindir=/usr/lib/postgresql/9.4/bin \\", + " --new-bindir=/usr/lib/postgresql/9.5/bin \\", + " --old-datadir=/var/lib/postgresql/9.4/demo \\", + " --new-datadir=/var/lib/postgresql/9.5/demo \\", + " --old-options=\" -c config_file=/etc/postgresql/9.4/demo/postgresql.conf\" \\", + " --new-options=\" -c config_file=/etc/postgresql/9.5/demo/postgresql.conf\"'" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "Upgrade Complete" + ] + }, + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + " [filtered 68 lines of output]", + "Creating script to delete old cluster ok", + "", + "Upgrade Complete", + "----------------", + "Optimizer statistics are not transferred by pg_upgrade so,", + " [filtered 4 lines of output]" + ] + } + }, + { + "key" : { + "file" : "/etc/postgresql/9.5/demo/postgresql.conf", + "host" : "pg-primary", + "option" : { + "archive_command" : { + "value" : "'pgbackrest --stanza=demo archive-push %p'" + }, + "archive_mode" : { + "value" : "on" + }, + "listen_addresses" : { + "value" : "'*'" + }, + "log_line_prefix" : { + "value" : "''" + }, + "max_wal_senders" : { + "value" : "3" + }, + "port" : { + "value" : "5432" + }, + "wal_level" : { + "value" : "hot_standby" + } + } + }, + "type" : "cfg-postgresql", + "value" : { + "config" : [ + "archive_command = 'pgbackrest --stanza=demo archive-push %p'", + "archive_mode = on", + "listen_addresses = '*'", + "log_line_prefix = ''", + "max_wal_senders = 3", + "port = 5432", + "wal_level = hot_standby" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-primary", + "option" : { + "demo" : { + "pg1-path" : { + "value" : "/var/lib/postgresql/9.5/demo" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.5/demo", + "", + "[global]", + "archive-async=y", + "log-level-file=detail", + "repo1-host=repository", + "spool-path=/var/spool/pgbackrest", + "", + "[global:archive-get]", + "process-max=2", + "", + "[global:archive-push]", + "process-max=2" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "pg-standby", + "option" : { + "demo" : { + "pg1-path" : { + "value" : "/var/lib/postgresql/9.5/demo" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-path=/var/lib/postgresql/9.5/demo", + "recovery-option=standby_mode=on", + "recovery-option=primary_conninfo=host=172.17.0.4 port=5432 user=replicator", + "", + "[global]", + "archive-async=y", + "log-level-file=detail", + "repo1-host=repository", + "spool-path=/var/spool/pgbackrest", + "", + "[global:archive-get]", + "process-max=2", + "", + "[global:archive-push]", + "process-max=2" + ] + } + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "repository", + "option" : { + "demo" : { + "pg1-path" : { + "value" : "/var/lib/postgresql/9.5/demo" + }, + "pg2-path" : { + "value" : "/var/lib/postgresql/9.5/demo" + } + }, + "global" : { + "backup-standby" : { + "value" : "n" + } + } + } + }, + "type" : "cfg-pgbackrest", + "value" : { + "config" : [ + "[demo]", + "pg1-host=pg-primary", + "pg1-path=/var/lib/postgresql/9.5/demo", + "pg2-host=pg-standby", + "pg2-path=/var/lib/postgresql/9.5/demo", + "", + "[global]", + "backup-standby=n", + "process-max=3", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "start-fast=y" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo cp /etc/postgresql/9.4/demo/pg_hba.conf \\", + " /etc/postgresql/9.5/demo/pg_hba.conf" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo --no-online \\", + " --log-level-console=info stanza-upgrade" + ], + "highlight" : { + "filter" : true, + "filter-context" : 2, + "list" : [ + "completed successfully" + ] + }, + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "P00 INFO: stanza-upgrade command begin 2.08: --no-backup-standby --log-level-console=info --log-level-stderr=off --no-log-timestamp --no-online --pg1-host=pg-primary --pg2-host=pg-standby --pg1-path=/var/lib/postgresql/9.5/demo --pg2-path=/var/lib/postgresql/9.5/demo --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: stanza-upgrade command end: completed successfully" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.5 demo start" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pg_lsclusters" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe", + "value" : { + "output" : [ + "Ver Cluster Port Status Owner Data directory Log file", + "9.4 demo 5432 down postgres /var/lib/postgresql/9.4/demo /var/log/postgresql/postgresql-9.4-demo.log", + "9.5 demo 5432 online postgres /var/lib/postgresql/9.5/demo /var/log/postgresql/postgresql-9.5-demo.log" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo check" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_dropcluster 9.4 demo" + ], + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_dropcluster 9.4 demo" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_createcluster 9.5 demo" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo check" + ], + "host" : "repository", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u pgbackrest pgbackrest --stanza=demo --type=full backup" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo --delta restore" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/postgresql/9.5/demo/postgresql.conf", + "host" : "pg-standby", + "option" : { + "hot_standby" : { + "value" : "on" + } + } + }, + "type" : "cfg-postgresql", + "value" : { + "config" : [ + "hot_standby = on" + ] + } + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo pg_ctlcluster 9.5 demo start" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres sleep 2" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo -u postgres pgbackrest --stanza=demo check" + ], + "host" : "pg-standby", + "load-env" : true, + "output" : true, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "file" : "/etc/pgbackrest/pgbackrest.conf", + "host" : "repository", + "option" : { + "global" : { + "backup-standby" : { + "value" : "y" + } + } + } }, - "type" : "host", + "type" : "cfg-pgbackrest", "value" : { - "ip" : "172.17.0.2" + "config" : [ + "[demo]", + "pg1-host=pg-primary", + "pg1-path=/var/lib/postgresql/9.5/demo", + "pg2-host=pg-standby", + "pg2-path=/var/lib/postgresql/9.5/demo", + "", + "[global]", + "backup-standby=y", + "process-max=3", + "repo1-path=/var/lib/pgbackrest", + "repo1-retention-full=2", + "start-fast=y" + ] } - }, + } + ] + } + }, + "{\"os-type\":\"centos6\"}" : { + "all" : { + "user-guide" : [ { "key" : { "id" : "build", - "image" : "pgbackrest/doc:co6-base", + "image" : "pgbackrest/doc:centos6", "name" : "build", - "os" : "co6", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "centos6", "update-hosts" : true }, "type" : "host", "value" : { - "ip" : "172.17.0.3" + "ip" : "172.17.0.2" } }, { "key" : { "bash-wrap" : true, "cmd" : [ - "sudo mkdir /root/pgbackrest-release-2.07" + "sudo mkdir /root/pgbackrest-release-2.08" ], "host" : "build", "load-env" : true, @@ -45,7 +5784,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo cp -r /backrest/libc /root/pgbackrest-release-2.07" + "sudo cp -r /backrest/libc /root/pgbackrest-release-2.08" ], "host" : "build", "load-env" : true, @@ -58,7 +5797,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo cp -r /backrest/src /root/pgbackrest-release-2.07" + "sudo cp -r /backrest/src /root/pgbackrest-release-2.08" ], "host" : "build", "load-env" : true, @@ -71,7 +5810,8 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo yum install build-essential gcc openssl-devel perl-ExtUtils-Embed" + "sudo yum install build-essential gcc openssl-devel libxml2-devel \\", + " perl-ExtUtils-Embed" ], "cmd-extra" : "-y 2>&1", "host" : "build", @@ -103,7 +5843,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo make -s -C /root/pgbackrest-release-2.07/src" + "sudo make -s -C /root/pgbackrest-release-2.08/src" ], "host" : "build", "load-env" : true, @@ -112,12 +5852,26 @@ }, "type" : "exe" }, + { + "key" : { + "id" : "s3", + "image" : "pgbackrest/test:s3-server-20180612A", + "name" : "s3-server", + "os" : "centos6", + "update-hosts" : true + }, + "type" : "host", + "value" : { + "ip" : "172.17.0.3" + } + }, { "key" : { "id" : "pg1", - "image" : "pgbackrest/doc:co6-base", + "image" : "pgbackrest/doc:centos6", "name" : "pg-primary", - "os" : "co6", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "centos6", "update-hosts" : true }, "type" : "host", @@ -129,7 +5883,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo scp build:/root/pgbackrest-release-2.07/src/pgbackrest /usr/bin" + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" ], "cmd-extra" : "2>&1", "host" : "pg-primary", @@ -157,7 +5911,7 @@ "bash-wrap" : true, "cmd" : [ "sudo yum install perl perl-Time-HiRes perl-parent perl-JSON \\", - " perl-Digest-SHA perl-DBD-Pg perl-XML-LibXML perl-IO-Socket-SSL" + " perl-Digest-SHA perl-DBD-Pg" ], "cmd-extra" : "-y 2>&1", "host" : "pg-primary", @@ -272,7 +6026,7 @@ "type" : "exe", "value" : { "output" : [ - "pgBackRest 2.07 - General help", + "pgBackRest 2.08 - General help", "", "Usage:", " pgbackrest [options] [command]", @@ -416,7 +6170,7 @@ "type" : "exe", "value" : { "output" : [ - "pgBackRest 2.07 - 'backup' command - 'log-path' option help", + "pgBackRest 2.08 - 'backup' command - 'log-path' option help", "", "Path where log files are stored.", "", @@ -654,7 +6408,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stanza-create command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: stanza-create command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", "P00 INFO: stanza-create command end: completed successfully" ] } @@ -680,8 +6434,8 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: check command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", - "P00 INFO: WAL segment 000000010000000000000001 successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.5-1/0000000100000000/000000010000000000000001-46adeaeb3b4b3f05ecc9c4ca10cfe58748de60e0.gz'", + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: WAL segment 000000010000000000000001 successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.5-1/0000000100000000/000000010000000000000001-d621b25bc1008520dc7287ce20702641d3cbf09f.gz'", "P00 INFO: check command end: completed successfully" ] } @@ -708,9 +6462,9 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo", "P00 WARN: no prior backup exists, incr backup has been changed to full", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 13:56:08\": backup begins after the next regular checkpoint completes", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:28:38\": backup begins after the next regular checkpoint completes", "P00 INFO: backup start archive = 000000010000000000000002, lsn = 0/2000028", " [filtered 851 lines of output]", "P01 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12216 (0B, 100%)", @@ -736,7 +6490,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-135608F" + "20190102-062838F" ] } }, @@ -762,10 +6516,10 @@ "type" : "exe", "value" : { "output" : [ - " [filtered 4 lines of output]", - "P01 INFO: backup file /var/lib/pgsql/9.5/data/global/pg_control (8KB, 97%) checksum e4ea52265963b787e47c97ab5e3dd53ee5cfcbbb", - "P01 INFO: backup file /var/lib/pgsql/9.5/data/backup_label (236B, 100%) checksum 576eb86cb25096550660ee9d693b152dcabf5344", - "P00 INFO: diff backup size = 8.2KB", + " [filtered 5 lines of output]", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/pg_log/postgresql.log (887B, 97%) checksum 4a69a63a232e6618be0d5d18c0fff4107789c1e4", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/backup_label (236B, 100%) checksum ecc4144f2bf5e2436127d087b000b7f300a20799", + "P00 INFO: diff backup size = 9KB", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", "P00 INFO: backup stop archive = 000000010000000000000003, lsn = 0/30000F8", " [filtered 4 lines of output]" @@ -800,18 +6554,18 @@ " db (current)", " wal archive min/max (9.5-1): 000000010000000000000002 / 000000010000000000000003", "", - " full backup: 20181116-135608F", - " timestamp start/stop: 2018-11-16 13:56:08 / 2018-11-16 13:56:21", + " full backup: 20190102-062838F", + " timestamp start/stop: 2019-01-02 06:28:38 / 2019-01-02 06:28:52", " wal start/stop: 000000010000000000000002 / 000000010000000000000002", " database size: 20.5MB, backup size: 20.5MB", " repository size: 2.4MB, repository backup size: 2.4MB", "", - " diff backup: 20181116-135608F_20181116-135622D", - " timestamp start/stop: 2018-11-16 13:56:22 / 2018-11-16 13:56:25", + " diff backup: 20190102-062838F_20190102-062853D", + " timestamp start/stop: 2019-01-02 06:28:53 / 2019-01-02 06:28:57", " wal start/stop: 000000010000000000000003 / 000000010000000000000003", - " database size: 20.5MB, backup size: 8.2KB", - " repository size: 2.4MB, repository backup size: 400B", - " backup reference list: 20181116-135608F" + " database size: 20.5MB, backup size: 9KB", + " repository size: 2.4MB, repository backup size: 752B", + " backup reference list: 20190102-062838F" ] } }, @@ -841,19 +6595,6 @@ }, "type" : "exe" }, - { - "key" : { - "bash-wrap" : true, - "cmd" : [ - "sudo -u postgres sleep 2" - ], - "host" : "pg-primary", - "load-env" : true, - "output" : false, - "run-as-user" : null - }, - "type" : "exe" - }, { "key" : { "bash-wrap" : true, @@ -982,10 +6723,10 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --type=incr", - "P00 INFO: last backup label = 20181116-135608F_20181116-135622D, version = 2.07", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 13:56:46\": backup begins after the next regular checkpoint completes", - "P00 INFO: backup start archive = 000000020000000000000005, lsn = 0/5000028", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --type=incr", + "P00 INFO: last backup label = 20190102-062838F_20190102-062853D, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:29:20\": backup begins after the next regular checkpoint completes", + "P00 INFO: backup start archive = 000000020000000000000006, lsn = 0/6000028", "P00 WARN: a timeline switch has occurred since the last backup, enabling delta checksum", " [filtered 10 lines of output]" ] @@ -1043,12 +6784,12 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", - "P00 INFO: last backup label = 20181116-135608F_20181116-135646I, version = 2.07", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 13:56:51\": backup begins after the requested immediate checkpoint completes", - "P00 INFO: backup start archive = 000000020000000000000006, lsn = 0/6000028", - "P01 INFO: backup file /var/lib/pgsql/9.5/data/global/pg_control (8KB, 97%) checksum d7e54a67bda2934ca3d8c161cfe260dbc865ff75", - " [filtered 8 lines of output]" + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", + "P00 INFO: last backup label = 20190102-062838F_20190102-062920I, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:29:26\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 000000020000000000000007, lsn = 0/7000028", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/global/pg_control (8KB, 79%) checksum 7f6eb363dc2439be4169cee31b1000765559a6f1", + " [filtered 9 lines of output]" ] } }, @@ -1089,9 +6830,9 @@ "value" : { "output" : [ " [filtered 2 lines of output]", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 13:56:56\": backup begins after the requested immediate checkpoint completes", - "P00 INFO: backup start archive = 000000020000000000000007, lsn = 0/7000028", - "P00 ERROR: [047]: unable to create path '/var/lib/pgbackrest/backup/demo/20181116-135608F_20181116-135656I': Permission denied", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:29:31\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 000000020000000000000009, lsn = 0/9000028", + "P00 ERROR: [047]: unable to create path '/var/lib/pgbackrest/backup/demo/20190102-062838F_20190102-062931I': Permission denied", "P00 INFO: backup command end: aborted with exception [047]" ] } @@ -1132,12 +6873,12 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", - "P00 INFO: last backup label = 20181116-135608F_20181116-135651I, version = 2.07", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 13:56:58\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", + "P00 INFO: last backup label = 20190102-062838F_20190102-062926I, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:29:35\": backup begins after the requested immediate checkpoint completes", "P00 ERROR: [057]: ERROR: a backup is already in progress", " HINT: Run pg_stop_backup() and try again.:", - " select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_xlogfile_name(lsn), lsn::text, (select setting::int8 from pg_settings where name = 'wal_segment_size') * (select setting::int8 from pg_settings where name = 'wal_block_size') from pg_start_backup('pgBackRest backup started at 2018-11-16 13:56:58', true) as lsn" + " select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_xlogfile_name(lsn), lsn::text, (select setting::int8 from pg_settings where name = 'wal_segment_size') * (select setting::int8 from pg_settings where name = 'wal_block_size') from pg_start_backup('pgBackRest backup started at 2019-01-02 06:29:35', true) as lsn" ] } }, @@ -1194,13 +6935,13 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --stop-auto --type=incr", - "P00 INFO: last backup label = 20181116-135608F_20181116-135651I, version = 2.07", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --stop-auto --type=incr", + "P00 INFO: last backup label = 20190102-062838F_20190102-062926I, version = 2.08", "P00 WARN: the cluster is already in backup mode but no pgBackRest backup process is running. pg_stop_backup() will be called so a new backup can be started.", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 13:57:00\": backup begins after the requested immediate checkpoint completes", - "P00 INFO: backup start archive = 000000020000000000000008, lsn = 0/8000028", - "P01 INFO: backup file /var/lib/pgsql/9.5/data/global/pg_control (8KB, 83%) checksum 399487858e6f490172d94b03cbb91ba625e0f515", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:29:37\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 00000002000000000000000A, lsn = 0/A000028", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/global/pg_control (8KB, 75%) checksum fe25d63ee9a5939096e98d0a5303969ac1836ee0", " [filtered 9 lines of output]" ] } @@ -1227,7 +6968,7 @@ " \"id\" : 1", " },", " \"id\" : \"9.5-1\",", - " \"max\" : \"000000020000000000000008\",", + " \"max\" : \"00000002000000000000000A\",", " \"min\" : \"000000010000000000000002\"", " }", " ],", @@ -1239,25 +6980,25 @@ " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", " },", " \"info\" : {", - " \"delta\" : 21501376,", + " \"delta\" : 21575532,", " \"repository\" : {", - " \"delta\" : 2530096,", - " \"size\" : 2530096", + " \"delta\" : 2529904,", + " \"size\" : 2529904", " },", - " \"size\" : 21501376", + " \"size\" : 21575532", " },", - " \"label\" : \"20181116-135608F\",", + " \"label\" : \"20190102-062838F\",", " \"prior\" : null,", " \"reference\" : null,", " \"timestamp\" : {", - " \"start\" : 1542376568,", - " \"stop\" : 1542376581", + " \"start\" : 1546410518,", + " \"stop\" : 1546410532", " },", " \"type\" : \"full\"", " },", @@ -1268,121 +7009,120 @@ " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", " },", " \"info\" : {", - " \"delta\" : 8428,", + " \"delta\" : 9315,", " \"repository\" : {", - " \"delta\" : 400,", - " \"size\" : 2530096", + " \"delta\" : 752,", + " \"size\" : 2529904", " },", - " \"size\" : 21501376", + " \"size\" : 21575639", " },", - " \"label\" : \"20181116-135608F_20181116-135622D\",", - " \"prior\" : \"20181116-135608F\",", + " \"label\" : \"20190102-062838F_20190102-062853D\",", + " \"prior\" : \"20190102-062838F\",", " \"reference\" : [", - " \"20181116-135608F\"", + " \"20190102-062838F\"", " ],", " \"timestamp\" : {", - " \"start\" : 1542376582,", - " \"stop\" : 1542376585", + " \"start\" : 1546410533,", + " \"stop\" : 1546410537", " },", " \"type\" : \"diff\"", " },", " {", " \"archive\" : {", - " \"start\" : \"000000020000000000000005\",", - " \"stop\" : \"000000020000000000000005\"", + " \"start\" : \"000000020000000000000006\",", + " \"stop\" : \"000000020000000000000006\"", " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", " },", " \"info\" : {", - " \"delta\" : 9348,", + " \"delta\" : 10161,", " \"repository\" : {", - " \"delta\" : 832,", - " \"size\" : 2530256", + " \"delta\" : 912,", + " \"size\" : 2530064", " },", - " \"size\" : 21501944", + " \"size\" : 21576485", " },", - " \"label\" : \"20181116-135608F_20181116-135646I\",", - " \"prior\" : \"20181116-135608F_20181116-135622D\",", + " \"label\" : \"20190102-062838F_20190102-062920I\",", + " \"prior\" : \"20190102-062838F_20190102-062853D\",", " \"reference\" : [", - " \"20181116-135608F\"", + " \"20190102-062838F\"", " ],", " \"timestamp\" : {", - " \"start\" : 1542376606,", - " \"stop\" : 1542376610", + " \"start\" : 1546410560,", + " \"stop\" : 1546410565", " },", " \"type\" : \"incr\"", " },", " {", " \"archive\" : {", - " \"start\" : \"000000020000000000000006\",", - " \"stop\" : \"000000020000000000000006\"", + " \"start\" : \"000000020000000000000007\",", + " \"stop\" : \"000000020000000000000007\"", " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", " },", " \"info\" : {", - " \"delta\" : 8428,", + " \"delta\" : 10268,", " \"repository\" : {", - " \"delta\" : 400,", - " \"size\" : 2530256", + " \"delta\" : 912,", + " \"size\" : 2530064", " },", - " \"size\" : 21501944", + " \"size\" : 21576592", " },", - " \"label\" : \"20181116-135608F_20181116-135651I\",", - " \"prior\" : \"20181116-135608F_20181116-135646I\",", + " \"label\" : \"20190102-062838F_20190102-062926I\",", + " \"prior\" : \"20190102-062838F_20190102-062920I\",", " \"reference\" : [", - " \"20181116-135608F\",", - " \"20181116-135608F_20181116-135646I\"", + " \"20190102-062838F\"", " ],", " \"timestamp\" : {", - " \"start\" : 1542376611,", - " \"stop\" : 1542376615", + " \"start\" : 1546410566,", + " \"stop\" : 1546410570", " },", " \"type\" : \"incr\"", " },", " {", " \"archive\" : {", - " \"start\" : \"000000020000000000000008\",", - " \"stop\" : \"000000020000000000000008\"", + " \"start\" : \"00000002000000000000000A\",", + " \"stop\" : \"00000002000000000000000A\"", " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", " },", " \"info\" : {", - " \"delta\" : 9773,", + " \"delta\" : 11014,", " \"repository\" : {", - " \"delta\" : 1024,", - " \"size\" : 2530448", + " \"delta\" : 1120,", + " \"size\" : 2530272", " },", - " \"size\" : 21502369", + " \"size\" : 21577338", " },", - " \"label\" : \"20181116-135608F_20181116-135700I\",", - " \"prior\" : \"20181116-135608F_20181116-135651I\",", + " \"label\" : \"20190102-062838F_20190102-062937I\",", + " \"prior\" : \"20190102-062838F_20190102-062926I\",", " \"reference\" : [", - " \"20181116-135608F\"", + " \"20190102-062838F\"", " ],", " \"timestamp\" : {", - " \"start\" : 1542376620,", - " \"stop\" : 1542376625", + " \"start\" : 1546410577,", + " \"stop\" : 1546410582", " },", " \"type\" : \"incr\"", " }", @@ -1391,7 +7131,7 @@ " \"db\" : [", " {", " \"id\" : 1,", - " \"system-id\" : 6624456843115663664,", + " \"system-id\" : 6641782507979645253,", " \"version\" : \"9.5\"", " }", " ],", @@ -1546,7 +7286,7 @@ "output" : [ " name | last_successful_backup | last_archived_wal ", "--------+------------------------+--------------------------", - " \"demo\" | 2018-11-16 13:57:05+00 | 000000020000000000000008", + " \"demo\" | 2019-01-02 06:29:42+00 | 00000002000000000000000A", "(1 row)" ] } @@ -1593,7 +7333,7 @@ "filter" : true, "filter-context" : 2, "list" : [ - "archive retention on backup 20181116-135608F|remove archive" + "archive retention on backup 20190102-062838F|remove archive" ] }, "host" : "pg-primary", @@ -1607,7 +7347,7 @@ " [filtered 860 lines of output]", "P00 INFO: backup command end: completed successfully", "P00 INFO: expire command begin", - "P00 DETAIL: archive retention on backup 20181116-135608F, archiveId = 9.5-1, start = 000000010000000000000002", + "P00 DETAIL: archive retention on backup 20190102-062838F, archiveId = 9.5-1, start = 000000010000000000000002", "P00 DETAIL: no archive to remove, archiveId = 9.5-1", "P00 INFO: expire command end: completed successfully" ] @@ -1627,7 +7367,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-135708F" + "20190102-062947F" ] } }, @@ -1642,7 +7382,7 @@ "filter" : true, "filter-context" : 2, "list" : [ - "expire full backup set\\: 20181116-135608F|archive retention on backup 20181116-135708F|remove archive" + "expire full backup set\\: 20190102-062838F|archive retention on backup 20190102-062947F|remove archive" ] }, "host" : "pg-primary", @@ -1656,9 +7396,9 @@ " [filtered 860 lines of output]", "P00 INFO: backup command end: completed successfully", "P00 INFO: expire command begin", - "P00 INFO: expire full backup set: 20181116-135608F, 20181116-135608F_20181116-135622D, 20181116-135608F_20181116-135646I, 20181116-135608F_20181116-135651I, 20181116-135608F_20181116-135700I", - "P00 INFO: remove expired backup 20181116-135608F_20181116-135700I", - "P00 INFO: remove expired backup 20181116-135608F_20181116-135651I", + "P00 INFO: expire full backup set: 20190102-062838F, 20190102-062838F_20190102-062853D, 20190102-062838F_20190102-062920I, 20190102-062838F_20190102-062926I, 20190102-062838F_20190102-062937I", + "P00 INFO: remove expired backup 20190102-062838F_20190102-062937I", + "P00 INFO: remove expired backup 20190102-062838F_20190102-062926I", " [filtered 3 lines of output]" ] } @@ -1722,7 +7462,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-135722F_20181116-135736D" + "20190102-063001F_20190102-063016D" ] } }, @@ -1750,7 +7490,7 @@ "filter" : true, "filter-context" : 2, "list" : [ - "expire diff backup set: 20181116-135722F_20181116-135736D" + "expire diff backup set: 20190102-063001F_20190102-063016D" ] }, "host" : "pg-primary", @@ -1761,12 +7501,12 @@ "type" : "exe", "value" : { "output" : [ - " [filtered 11 lines of output]", + " [filtered 12 lines of output]", "P00 INFO: backup command end: completed successfully", "P00 INFO: expire command begin", - "P00 INFO: expire diff backup set: 20181116-135722F_20181116-135736D, 20181116-135722F_20181116-135741I", - "P00 INFO: remove expired backup 20181116-135722F_20181116-135741I", - "P00 INFO: remove expired backup 20181116-135722F_20181116-135736D" + "P00 INFO: expire diff backup set: 20190102-063001F_20190102-063016D, 20190102-063001F_20190102-063021I", + "P00 INFO: remove expired backup 20190102-063001F_20190102-063021I", + "P00 INFO: remove expired backup 20190102-063001F_20190102-063016D" ] } }, @@ -1816,7 +7556,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-135722F_20181116-135745D" + "20190102-063001F_20190102-063026D" ] } }, @@ -1859,8 +7599,8 @@ "output" : [ " [filtered 9 lines of output]", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", - "P00 INFO: backup stop archive = 000000020000000000000011, lsn = 0/110000F8", - "P00 INFO: new backup label = 20181116-135722F_20181116-135750D", + "P00 INFO: backup stop archive = 000000020000000000000015, lsn = 0/150000F8", + "P00 INFO: new backup label = 20190102-063001F_20190102-063033D", "P00 INFO: backup command end: completed successfully", "P00 INFO: expire command begin" ] @@ -1880,7 +7620,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-135722F_20181116-135750D" + "20190102-063001F_20190102-063033D" ] } }, @@ -1895,7 +7635,7 @@ "filter" : true, "filter-context" : 2, "list" : [ - "archive retention on backup 20181116-135722F_20181116-135745D|remove archive" + "archive retention on backup 20190102-063001F_20190102-063026D|remove archive" ] }, "host" : "pg-primary", @@ -1906,13 +7646,14 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: expire command begin 2.07: --log-level-console=detail --log-level-stderr=off --no-log-timestamp --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-archive=1 --repo1-retention-archive-type=diff --repo1-retention-diff=2 --repo1-retention-full=2 --stanza=demo", - "P00 DETAIL: archive retention on backup 20181116-135708F, archiveId = 9.5-1, start = 00000002000000000000000A, stop = 00000002000000000000000A", - "P00 DETAIL: archive retention on backup 20181116-135722F, archiveId = 9.5-1, start = 00000002000000000000000B, stop = 00000002000000000000000B", - "P00 DETAIL: archive retention on backup 20181116-135722F_20181116-135745D, archiveId = 9.5-1, start = 00000002000000000000000E, stop = 00000002000000000000000E", - "P00 DETAIL: archive retention on backup 20181116-135722F_20181116-135750D, archiveId = 9.5-1, start = 000000020000000000000011", - "P00 DETAIL: remove archive: archiveId = 9.5-1, start = 00000002000000000000000C, stop = 00000002000000000000000D", - "P00 DETAIL: remove archive: archiveId = 9.5-1, start = 00000002000000000000000F, stop = 000000020000000000000010", + "P00 INFO: expire command begin 2.08: --log-level-console=detail --log-level-stderr=off --no-log-timestamp --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-archive=1 --repo1-retention-archive-type=diff --repo1-retention-diff=2 --repo1-retention-full=2 --stanza=demo", + "P00 DETAIL: archive retention on backup 20190102-062947F, archiveId = 9.5-1, start = 00000002000000000000000C, stop = 00000002000000000000000C", + "P00 DETAIL: archive retention on backup 20190102-063001F, archiveId = 9.5-1, start = 00000002000000000000000E, stop = 00000002000000000000000E", + "P00 DETAIL: archive retention on backup 20190102-063001F_20190102-063026D, archiveId = 9.5-1, start = 000000020000000000000012, stop = 000000020000000000000012", + "P00 DETAIL: archive retention on backup 20190102-063001F_20190102-063033D, archiveId = 9.5-1, start = 000000020000000000000015", + "P00 DETAIL: remove archive: archiveId = 9.5-1, start = 00000002000000000000000D, stop = 00000002000000000000000D", + "P00 DETAIL: remove archive: archiveId = 9.5-1, start = 00000002000000000000000F, stop = 000000020000000000000011", + "P00 DETAIL: remove archive: archiveId = 9.5-1, start = 000000020000000000000013, stop = 000000020000000000000014", "P00 INFO: expire command end: completed successfully" ] } @@ -2335,7 +8076,7 @@ "type" : "exe", "value" : { "output" : [ - "2018-11-16 13:58:36.265225+00" + "2019-01-02 06:31:25.224189+00" ] } }, @@ -2388,7 +8129,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres pgbackrest --stanza=demo --delta \\", - " --type=time \"--target=2018-11-16 13:58:36.265225+00\" restore" + " --type=time \"--target=2019-01-02 06:31:25.224189+00\" restore" ], "host" : "pg-primary", "load-env" : true, @@ -2432,7 +8173,7 @@ "value" : { "output" : [ "restore_command = 'pgbackrest --stanza=demo archive-get %f \"%p\"'", - "recovery_target_time = '2018-11-16 13:58:36.265225+00'" + "recovery_target_time = '2019-01-02 06:31:25.224189+00'" ] } }, @@ -2511,19 +8252,19 @@ "type" : "exe", "value" : { "output" : [ - "LOG: database system was interrupted; last known up at 2018-11-16 13:58:29 UTC", - "LOG: starting point-in-time recovery to 2018-11-16 13:58:36.265225+00", + "LOG: database system was interrupted; last known up at 2019-01-02 06:31:16 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:31:25.224189+00", "LOG: restored log file \"00000004.history\" from archive", - "LOG: restored log file \"000000040000000000000016\" from archive", - "LOG: redo starts at 0/16000028", - "LOG: consistent recovery state reached at 0/160000F8", - "LOG: restored log file \"000000040000000000000017\" from archive", - "LOG: recovery stopping before commit of transaction 630, time 2018-11-16 13:58:36.478389+00", - "LOG: redo done at 0/1701C908", - "LOG: last completed transaction was at log time 2018-11-16 13:58:36.008013+00", + "LOG: restored log file \"00000004000000000000001A\" from archive", + "LOG: redo starts at 0/1A000028", + "LOG: consistent recovery state reached at 0/1A0000F8", + "LOG: restored log file \"00000004000000000000001B\" from archive", + "LOG: recovery stopping before commit of transaction 630, time 2019-01-02 06:31:25.646121+00", + "LOG: redo done at 0/1B01BBB8", + "LOG: last completed transaction was at log time 2019-01-02 06:31:24.874336+00", "LOG: selected new timeline ID: 5", "LOG: archive recovery complete", - " [filtered 3 lines of output]" + " [filtered 4 lines of output]" ] } }, @@ -2572,7 +8313,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-135722F_20181116-135828D" + "20190102-063001F_20190102-063115D" ] } }, @@ -2607,7 +8348,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres pgbackrest --stanza=demo --delta \\", - " --type=time \"--target=2018-11-16 13:58:36.265225+00\" restore" + " --type=time \"--target=2019-01-02 06:31:25.224189+00\" restore" ], "host" : "pg-primary", "load-env" : true, @@ -2704,15 +8445,15 @@ "type" : "exe", "value" : { "output" : [ - "LOG: database system was interrupted; last known up at 2018-11-16 13:58:47 UTC", - "LOG: starting point-in-time recovery to 2018-11-16 13:58:36.265225+00", + "LOG: database system was interrupted; last known up at 2019-01-02 06:31:39 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:31:25.224189+00", "LOG: restored log file \"00000005.history\" from archive", - "LOG: restored log file \"000000050000000000000018\" from archive", - "LOG: redo starts at 0/18000028", - "LOG: consistent recovery state reached at 0/180000F8", - "LOG: redo done at 0/180000F8", - "LOG: restored log file \"000000050000000000000018\" from archive", - " [filtered 7 lines of output]" + "LOG: restored log file \"00000005000000000000001C\" from archive", + "LOG: redo starts at 0/1C000028", + "LOG: consistent recovery state reached at 0/1C0000F8", + "LOG: redo done at 0/1C0000F8", + "LOG: restored log file \"00000005000000000000001C\" from archive", + " [filtered 8 lines of output]" ] } }, @@ -2726,7 +8467,7 @@ "filter" : false, "filter-context" : 2, "list" : [ - "20181116-135722F_20181116-135828D" + "20190102-063001F_20190102-063115D" ] }, "host" : "pg-primary", @@ -2742,47 +8483,47 @@ " cipher: aes-256-cbc", "", " db (current)", - " wal archive min/max (9.5-1): 00000002000000000000000A / 000000050000000000000018", + " wal archive min/max (9.5-1): 00000002000000000000000C / 00000005000000000000001C", "", - " full backup: 20181116-135708F", - " timestamp start/stop: 2018-11-16 13:57:08 / 2018-11-16 13:57:21", - " wal start/stop: 00000002000000000000000A / 00000002000000000000000A", + " full backup: 20190102-062947F", + " timestamp start/stop: 2019-01-02 06:29:47 / 2019-01-02 06:30:00", + " wal start/stop: 00000002000000000000000C / 00000002000000000000000C", " database size: 20.5MB, backup size: 20.5MB", " repository size: 2.4MB, repository backup size: 2.4MB", "", - " full backup: 20181116-135722F", - " timestamp start/stop: 2018-11-16 13:57:22 / 2018-11-16 13:57:35", - " wal start/stop: 00000002000000000000000B / 00000002000000000000000B", + " full backup: 20190102-063001F", + " timestamp start/stop: 2019-01-02 06:30:01 / 2019-01-02 06:30:14", + " wal start/stop: 00000002000000000000000E / 00000002000000000000000E", " database size: 20.5MB, backup size: 20.5MB", " repository size: 2.4MB, repository backup size: 2.4MB", "", - " diff backup: 20181116-135722F_20181116-135750D", - " timestamp start/stop: 2018-11-16 13:57:50 / 2018-11-16 13:57:54", - " wal start/stop: 000000020000000000000011 / 000000020000000000000011", - " database size: 20.5MB, backup size: 113.9KB", - " repository size: 2.4MB, repository backup size: 12.5KB", - " backup reference list: 20181116-135722F", - "", - " incr backup: 20181116-135722F_20181116-135804I", - " timestamp start/stop: 2018-11-16 13:58:04 / 2018-11-16 13:58:16", - " wal start/stop: 000000030000000000000013 / 000000030000000000000013", - " database size: 33.8MB, backup size: 13.4MB", + " diff backup: 20190102-063001F_20190102-063033D", + " timestamp start/stop: 2019-01-02 06:30:33 / 2019-01-02 06:30:37", + " wal start/stop: 000000020000000000000015 / 000000020000000000000015", + " database size: 20.5MB, backup size: 116.2KB", + " repository size: 2.4MB, repository backup size: 12.6KB", + " backup reference list: 20190102-063001F", + "", + " incr backup: 20190102-063001F_20190102-063048I", + " timestamp start/stop: 2019-01-02 06:30:48 / 2019-01-02 06:31:00", + " wal start/stop: 000000030000000000000017 / 000000030000000000000017", + " database size: 33.9MB, backup size: 13.4MB", " repository size: 4MB, repository backup size: 1.6MB", - " backup reference list: 20181116-135722F, 20181116-135722F_20181116-135750D", + " backup reference list: 20190102-063001F, 20190102-063001F_20190102-063033D", "", - " diff backup: 20181116-135722F_20181116-135828D", - " timestamp start/stop: 2018-11-16 13:58:28 / 2018-11-16 13:58:35", - " wal start/stop: 000000040000000000000016 / 000000040000000000000016", - " database size: 27.1MB, backup size: 6.8MB", + " diff backup: 20190102-063001F_20190102-063115D", + " timestamp start/stop: 2019-01-02 06:31:15 / 2019-01-02 06:31:24", + " wal start/stop: 00000004000000000000001A / 00000004000000000000001A", + " database size: 27.2MB, backup size: 6.8MB", " repository size: 3.2MB, repository backup size: 831.3KB", - " backup reference list: 20181116-135722F", + " backup reference list: 20190102-063001F", "", - " incr backup: 20181116-135722F_20181116-135846I", - " timestamp start/stop: 2018-11-16 13:58:46 / 2018-11-16 13:58:51", - " wal start/stop: 000000050000000000000018 / 000000050000000000000018", - " database size: 27.1MB, backup size: 1.9MB", - " repository size: 3.2MB, repository backup size: 209.5KB", - " backup reference list: 20181116-135722F, 20181116-135722F_20181116-135828D" + " incr backup: 20190102-063001F_20190102-063138I", + " timestamp start/stop: 2019-01-02 06:31:38 / 2019-01-02 06:31:44", + " wal start/stop: 00000005000000000000001C / 00000005000000000000001C", + " database size: 27.2MB, backup size: 1.9MB", + " repository size: 3.2MB, repository backup size: 209.6KB", + " backup reference list: 20190102-063001F, 20190102-063001F_20190102-063115D" ] } }, @@ -2804,8 +8545,8 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres pgbackrest --stanza=demo --delta \\", - " --type=time \"--target=2018-11-16 13:58:36.265225+00\" \\", - " --set=20181116-135722F_20181116-135828D restore" + " --type=time \"--target=2019-01-02 06:31:25.224189+00\" \\", + " --set=20190102-063001F_20190102-063115D restore" ], "host" : "pg-primary", "load-env" : true, @@ -2902,22 +8643,36 @@ "type" : "exe", "value" : { "output" : [ - "LOG: database system was interrupted; last known up at 2018-11-16 13:58:29 UTC", - "LOG: starting point-in-time recovery to 2018-11-16 13:58:36.265225+00", + "LOG: database system was interrupted; last known up at 2019-01-02 06:31:16 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:31:25.224189+00", "LOG: restored log file \"00000004.history\" from archive", - "LOG: restored log file \"000000040000000000000016\" from archive", - "LOG: redo starts at 0/16000028", - "LOG: consistent recovery state reached at 0/160000F8", - "LOG: restored log file \"000000040000000000000017\" from archive", - "LOG: recovery stopping before commit of transaction 630, time 2018-11-16 13:58:36.478389+00", - "LOG: redo done at 0/1701C908", - "LOG: last completed transaction was at log time 2018-11-16 13:58:36.008013+00", + "LOG: restored log file \"00000004000000000000001A\" from archive", + "LOG: redo starts at 0/1A000028", + "LOG: consistent recovery state reached at 0/1A0000F8", + "LOG: restored log file \"00000004000000000000001B\" from archive", + "LOG: recovery stopping before commit of transaction 630, time 2019-01-02 06:31:25.646121+00", + "LOG: redo done at 0/1B01BBB8", + "LOG: last completed transaction was at log time 2019-01-02 06:31:24.874336+00", "LOG: restored log file \"00000005.history\" from archive", "LOG: restored log file \"00000006.history\" from archive", - " [filtered 5 lines of output]" + " [filtered 6 lines of output]" ] } }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo yum install perl-XML-LibXML perl-IO-Socket-SSL" + ], + "cmd-extra" : "-y 2>&1", + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, { "key" : { "bash-wrap" : true, @@ -3029,7 +8784,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "echo \"172.17.0.2 demo-bucket.s3.amazonaws.com s3.amazonaws.com\" | tee -a /etc/hosts" + "echo \"172.17.0.3 demo-bucket.s3.amazonaws.com s3.amazonaws.com\" | tee -a /etc/hosts" ], "host" : "pg-primary", "load-env" : true, @@ -3059,7 +8814,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stanza-create command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stanza-create command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", "P00 INFO: stanza-create command end: completed successfully" ] } @@ -3086,16 +8841,16 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=4 --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-retention-diff=2 --repo1-retention-full=2 --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo --start-fast --stop-auto", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=4 --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-retention-diff=2 --repo1-retention-full=2 --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo --start-fast --stop-auto", "P00 WARN: no prior backup exists, incr backup has been changed to full", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 13:59:13\": backup begins after the requested immediate checkpoint completes", - "P00 INFO: backup start archive = 000000070000000000000018, lsn = 0/18000028", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:32:23\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 00000007000000000000001C, lsn = 0/1C000028", " [filtered 1119 lines of output]", - "P03 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12216 (0B, 100%)", - "P01 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12211 (0B, 100%)", - "P00 INFO: full backup size = 27.2MB", + "P04 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12216 (0B, 100%)", + "P02 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12211 (0B, 100%)", + "P00 INFO: full backup size = 27.3MB", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", - "P00 INFO: backup stop archive = 000000070000000000000018, lsn = 0/18000130", + "P00 INFO: backup stop archive = 00000007000000000000001C, lsn = 0/1C000130", " [filtered 4 lines of output]" ] } @@ -3134,7 +8889,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stop command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stop command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", "P00 INFO: stop command end: completed successfully" ] } @@ -3160,7 +8915,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stanza-delete command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stanza-delete command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", "P00 INFO: stanza-delete command end: completed successfully" ] } @@ -3181,9 +8936,10 @@ { "key" : { "id" : "repo1", - "image" : "pgbackrest/doc:co6-base", + "image" : "pgbackrest/doc:centos6", "name" : "repository", - "os" : "co6", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "centos6", "update-hosts" : true }, "type" : "host", @@ -3221,7 +8977,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo scp build:/root/pgbackrest-release-2.07/src/pgbackrest /usr/bin" + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" ], "cmd-extra" : "2>&1", "host" : "repository", @@ -3249,7 +9005,7 @@ "bash-wrap" : true, "cmd" : [ "sudo yum install perl perl-Time-HiRes perl-parent perl-JSON \\", - " perl-Digest-SHA perl-DBD-Pg perl-XML-LibXML perl-IO-Socket-SSL" + " perl-Digest-SHA perl-DBD-Pg" ], "cmd-extra" : "-y 2>&1", "host" : "repository", @@ -3806,18 +9562,18 @@ " cipher: none", "", " db (current)", - " wal archive min/max (9.5-1): 00000008000000000000001F / 000000080000000000000021", + " wal archive min/max (9.5-1): 000000080000000000000023 / 000000080000000000000025", "", - " full backup: 20181116-140058F", - " timestamp start/stop: 2018-11-16 14:00:58 / 2018-11-16 14:01:16", - " wal start/stop: 00000008000000000000001F / 00000008000000000000001F", - " database size: 27.2MB, backup size: 27.2MB", + " full backup: 20190102-063504F", + " timestamp start/stop: 2019-01-02 06:35:04 / 2019-01-02 06:35:22", + " wal start/stop: 000000080000000000000023 / 000000080000000000000023", + " database size: 27.3MB, backup size: 27.3MB", " repository size: 3.1MB, repository backup size: 3.1MB", "", - " full backup: 20181116-140117F", - " timestamp start/stop: 2018-11-16 14:01:17 / 2018-11-16 14:01:26", - " wal start/stop: 000000080000000000000021 / 000000080000000000000021", - " database size: 27.2MB, backup size: 27.2MB", + " full backup: 20190102-063524F", + " timestamp start/stop: 2019-01-02 06:35:24 / 2019-01-02 06:35:38", + " wal start/stop: 000000080000000000000025 / 000000080000000000000025", + " database size: 27.3MB, backup size: 27.3MB", " repository size: 3.1MB, repository backup size: 3.1MB" ] } @@ -3947,9 +9703,10 @@ { "key" : { "id" : "pg2", - "image" : "pgbackrest/doc:co6-base", + "image" : "pgbackrest/doc:centos6", "name" : "pg-standby", - "os" : "co6", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "centos6", "update-hosts" : true }, "type" : "host", @@ -3961,7 +9718,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo scp build:/root/pgbackrest-release-2.07/src/pgbackrest /usr/bin" + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" ], "cmd-extra" : "2>&1", "host" : "pg-standby", @@ -3989,7 +9746,7 @@ "bash-wrap" : true, "cmd" : [ "sudo yum install perl perl-Time-HiRes perl-parent perl-JSON \\", - " perl-Digest-SHA perl-DBD-Pg perl-XML-LibXML perl-IO-Socket-SSL" + " perl-Digest-SHA perl-DBD-Pg" ], "cmd-extra" : "-y 2>&1", "host" : "pg-standby", @@ -4269,6 +10026,12 @@ "file" : "/var/lib/pgsql/9.5/data/postgresql.conf", "host" : "pg-standby", "option" : { + "archive_command" : { + "value" : "'pgbackrest --stanza=demo archive-push %p'" + }, + "archive_mode" : { + "value" : "on" + }, "hot_standby" : { "value" : "on" }, @@ -4277,15 +10040,25 @@ }, "log_line_prefix" : { "value" : "''" + }, + "max_wal_senders" : { + "value" : "3" + }, + "wal_level" : { + "value" : "hot_standby" } } }, "type" : "cfg-postgresql", "value" : { "config" : [ + "archive_command = 'pgbackrest --stanza=demo archive-push %p'", + "archive_mode = on", "hot_standby = on", "log_filename = 'postgresql.log'", - "log_line_prefix = ''" + "log_line_prefix = ''", + "max_wal_senders = 3", + "wal_level = hot_standby" ] } }, @@ -4349,12 +10122,12 @@ "type" : "exe", "value" : { "output" : [ - "LOG: database system was interrupted; last known up at 2018-11-16 14:01:18 UTC", + "LOG: database system was interrupted; last known up at 2019-01-02 06:35:25 UTC", "LOG: entering standby mode", "LOG: restored log file \"00000008.history\" from archive", - "LOG: restored log file \"000000080000000000000021\" from archive", - "LOG: redo starts at 0/21000028", - "LOG: consistent recovery state reached at 0/210000F8", + "LOG: restored log file \"000000080000000000000025\" from archive", + "LOG: redo starts at 0/25000028", + "LOG: consistent recovery state reached at 0/250000F8", "LOG: database system is ready to accept read only connections" ] } @@ -4436,7 +10209,7 @@ "output" : [ " pg_switch_xlog | now ", "----------------+-------------------------------", - " 0/22020338 | 2018-11-16 14:02:00.285016+00", + " 0/2601F5A8 | 2019-01-02 06:37:24.694566+00", "(1 row)" ] } @@ -4463,9 +10236,9 @@ "type" : "exe", "value" : { "output" : [ - " message | now ", - "----------------+-------------------------------", - " Important Data | 2018-11-16 14:02:02.335059+00", + " message | now ", + "----------------+------------------------------", + " Important Data | 2019-01-02 06:37:26.59232+00", "(1 row)" ] } @@ -4491,7 +10264,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: check command begin 2.07: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-host=repository --stanza=demo", + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-host=repository --stanza=demo", "P00 INFO: switch xlog cannot be performed on the standby, all other checks passed successfully", "P00 INFO: check command end: completed successfully" ] @@ -4657,9 +10430,13 @@ "type" : "cfg-postgresql", "value" : { "config" : [ + "archive_command = 'pgbackrest --stanza=demo archive-push %p'", + "archive_mode = on", "hot_standby = on", "log_filename = 'postgresql.log'", - "log_line_prefix = ''" + "log_line_prefix = ''", + "max_wal_senders = 3", + "wal_level = hot_standby" ] } }, @@ -4725,8 +10502,8 @@ "output" : [ " [filtered 6 lines of output]", "LOG: database system is ready to accept read only connections", - "LOG: restored log file \"000000080000000000000022\" from archive", - "LOG: started streaming WAL from primary at 0/23000000 on timeline 8" + "LOG: restored log file \"000000080000000000000026\" from archive", + "LOG: started streaming WAL from primary at 0/27000000 on timeline 8" ] } }, @@ -4758,7 +10535,7 @@ "output" : [ " message | now ", "----------------+-------------------------------", - " Important Data | 2018-11-16 14:02:16.389624+00", + " Important Data | 2019-01-02 06:37:44.101661+00", "(1 row)" ] } @@ -4787,7 +10564,7 @@ "output" : [ " message | now ", "----------------+-------------------------------", - " Important Data | 2018-11-16 14:02:16.780079+00", + " Important Data | 2019-01-02 06:37:44.634672+00", "(1 row)" ] } @@ -5019,8 +10796,8 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: check command begin 2.07: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-host=repository --stanza=demo", - "P00 INFO: WAL segment 000000080000000000000028 successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.5-1/0000000800000000/000000080000000000000028-6f086c6ff39b96d59952a7d57239ad9cfe2a13d6.gz'", + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-host=repository --stanza=demo", + "P00 INFO: WAL segment 00000008000000000000002C successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.5-1/0000000800000000/00000008000000000000002C-12c383dbd8a4bcf248ae41aff45dd8245e41fc9b.gz'", "P00 INFO: check command end: completed successfully" ] } @@ -5047,24 +10824,19 @@ "value" : { "output" : [ "-------------------PROCESS START-------------------", - "P00 INFO: archive-push command begin 2.07: [pg_xlog/000000080000000000000023] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: push 2 WAL file(s) to archive: 000000080000000000000023...000000080000000000000024", - "P01 DETAIL: pushed WAL file 000000080000000000000023 to archive", - "P02 DETAIL: pushed WAL file 000000080000000000000024 to archive", - "P00 INFO: archive-push command end: completed successfully", - "", - "-------------------PROCESS START-------------------", - "P00 INFO: archive-push command begin 2.07: [pg_xlog/000000080000000000000025] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: push 3 WAL file(s) to archive: 000000080000000000000025...000000080000000000000027", - "P01 DETAIL: pushed WAL file 000000080000000000000025 to archive", - "P02 DETAIL: pushed WAL file 000000080000000000000026 to archive", + "P00 INFO: archive-push command begin 2.08: [pg_xlog/000000080000000000000027] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: push 4 WAL file(s) to archive: 000000080000000000000027...00000008000000000000002A", + "P02 DETAIL: pushed WAL file 000000080000000000000028 to archive", "P01 DETAIL: pushed WAL file 000000080000000000000027 to archive", + "P02 DETAIL: pushed WAL file 000000080000000000000029 to archive", + "P01 DETAIL: pushed WAL file 00000008000000000000002A to archive", "P00 INFO: archive-push command end: completed successfully", "", "-------------------PROCESS START-------------------", - "P00 INFO: archive-push command begin 2.07: [pg_xlog/000000080000000000000028] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: push 1 WAL file(s) to archive: 000000080000000000000028", - "P01 DETAIL: pushed WAL file 000000080000000000000028 to archive", + "P00 INFO: archive-push command begin 2.08: [pg_xlog/00000008000000000000002B] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: push 2 WAL file(s) to archive: 00000008000000000000002B...00000008000000000000002C", + "P01 DETAIL: pushed WAL file 00000008000000000000002B to archive", + "P02 DETAIL: pushed WAL file 00000008000000000000002C to archive", "P00 INFO: archive-push command end: completed successfully" ] } @@ -5104,24 +10876,26 @@ "value" : { "output" : [ "-------------------PROCESS START-------------------", - "P00 INFO: archive-get command begin 2.07: [000000080000000000000021, 000000080000000000000022, 000000080000000000000023, 000000080000000000000024, 000000080000000000000025, 000000080000000000000026, 000000080000000000000027, 000000080000000000000028] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000021...000000080000000000000028", - "P01 DETAIL: got WAL file 000000080000000000000021 from archive", - "P02 DETAIL: got WAL file 000000080000000000000022 from archive", - "P01 DETAIL: WAL file 000000080000000000000023 not found in archive", - "P02 DETAIL: WAL file 000000080000000000000024 not found in archive", - " [filtered 33 lines of output]", - "P00 INFO: archive-get command begin 2.07: [000000080000000000000023, 000000080000000000000024, 000000080000000000000025, 000000080000000000000026, 000000080000000000000027, 000000080000000000000028, 000000080000000000000029, 00000008000000000000002A] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000023...00000008000000000000002A", - "P01 DETAIL: got WAL file 000000080000000000000023 from archive", - "P02 DETAIL: got WAL file 000000080000000000000024 from archive", + "P00 INFO: archive-get command begin 2.08: [000000080000000000000025, 000000080000000000000026, 000000080000000000000027, 000000080000000000000028, 000000080000000000000029, 00000008000000000000002A, 00000008000000000000002B, 00000008000000000000002C] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000025...00000008000000000000002C", "P01 DETAIL: got WAL file 000000080000000000000025 from archive", "P02 DETAIL: got WAL file 000000080000000000000026 from archive", - "P01 DETAIL: got WAL file 000000080000000000000027 from archive", + "P01 DETAIL: WAL file 000000080000000000000027 not found in archive", + "P02 DETAIL: WAL file 000000080000000000000028 not found in archive", + " [filtered 33 lines of output]", + "P00 INFO: archive-get command begin 2.08: [000000080000000000000027, 000000080000000000000028, 000000080000000000000029, 00000008000000000000002A, 00000008000000000000002B, 00000008000000000000002C, 00000008000000000000002D, 00000008000000000000002E] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000027...00000008000000000000002E", "P02 DETAIL: got WAL file 000000080000000000000028 from archive", - "P02 DETAIL: WAL file 00000008000000000000002A not found in archive", - "P01 DETAIL: WAL file 000000080000000000000029 not found in archive", - " [filtered 13 lines of output]" + "P01 DETAIL: got WAL file 000000080000000000000027 from archive", + "P02 DETAIL: got WAL file 000000080000000000000029 from archive", + "P01 DETAIL: got WAL file 00000008000000000000002A from archive", + "P02 DETAIL: got WAL file 00000008000000000000002B from archive", + "P02 DETAIL: WAL file 00000008000000000000002D not found in archive", + "P02 DETAIL: WAL file 00000008000000000000002E not found in archive", + "P01 DETAIL: got WAL file 00000008000000000000002C from archive", + "P00 INFO: archive-get command end: completed successfully", + "", + " [filtered 20 lines of output]" ] } }, @@ -5203,19 +10977,22 @@ "value" : { "output" : [ " [filtered 2 lines of output]", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:02:34\": backup begins after the requested immediate checkpoint completes", - "P00 INFO: backup start archive = 00000008000000000000002A, lsn = 0/2A000028", - "P00 INFO: wait for replay on the standby to reach 0/2A000028", - "P00 INFO: replay on the standby reached 0/2A0000D0", - "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/global/pg_control (8KB, 0%) checksum b3a870e60d380cf869320f31ae7d5994c2422ad8", - "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/pg_log/postgresql.log (5.2KB, 0%) checksum a33a42f257f3fe8d5a2f9e62ee7e4c33af1f2e51", - "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/pg_hba.conf (4.1KB, 0%) checksum 1c0bca2f7f44d354aaaefb2c21fd1290b7379690", - "P03 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/1249 (360KB, 17%) checksum d54da37b44acccdf8ad024e8d332c0b9cdcf5c17", - "P04 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/2674 (352KB, 34%) checksum 73892aa79f02e9b5665ed3faca717adbad60860a", - "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/backup_label (238B, 34%) checksum e702a2e62643f23e5e546e156b0ff7b77c5f3e4d", - "P02 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/2608 (432KB, 54%) checksum b2c2d2fe31b5748f26cd634725cbd0399bd74733", - "P03 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/2673 (304KB, 68%) checksum 970913838fda501011e8751b782434e0681dca2d", - " [filtered 34 lines of output]" + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:38:06\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 00000008000000000000002E, lsn = 0/2E000028", + "P00 INFO: wait for replay on the standby to reach 0/2E000028", + "P00 INFO: replay on the standby reached 0/2E000350", + "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/pg_log/postgresql.log (9.5KB, 0%) checksum 10e54a279cb1aeb7bddbf48a61b913eafd57ed2c", + "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/global/pg_control (8KB, 0%) checksum ef1d9b5337dfeeda40df266e3f2c5dae6e51d49d", + "P03 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/2674 (360KB, 17%) checksum feeb4dfd14b7074de7089e71eef01f1c9627e8d5", + "P02 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/2608 (432KB, 37%) checksum 3e09539fa7c8cc8a1e0094fb4bb49caa696884df", + "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/pg_hba.conf (4.1KB, 37%) checksum 1c0bca2f7f44d354aaaefb2c21fd1290b7379690", + "P03 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/2673 (320KB, 52%) checksum f36fb2e91f3c411fbb300ff47de0448314b01fbc", + "P02 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/2658 (112KB, 57%) checksum 792300a98ebedd7af38defafa5cd5c8a017e1b6e", + "P04 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/1249 (360KB, 74%) checksum b2ffe1a69fb1ce37c1bef2b14c63bc1c61b5dd79", + "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/backup_label (238B, 74%) checksum bc3d621c1040ad1d40cef7afda5394fda873531c", + "P03 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/1259 (104KB, 78%) checksum a6e9a6332c879bb297c087416f59dcec6d868adc", + "P04 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12378/1247 (72KB, 82%) checksum 7ce25768bd9aa69cd4853b976e6fd7643ad65a2e", + " [filtered 31 lines of output]" ] } }, @@ -5478,7 +11255,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stanza-upgrade command begin 2.07: --no-backup-standby --log-level-console=info --log-level-stderr=off --no-log-timestamp --no-online --pg1-host=pg-primary --pg2-host=pg-standby --pg1-path=/var/lib/pgsql/9.6/data --pg2-path=/var/lib/pgsql/9.6/data --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: stanza-upgrade command begin 2.08: --no-backup-standby --log-level-console=info --log-level-stderr=off --no-log-timestamp --no-online --pg1-host=pg-primary --pg2-host=pg-standby --pg1-path=/var/lib/pgsql/9.6/data --pg2-path=/var/lib/pgsql/9.6/data --repo1-path=/var/lib/pgbackrest --stanza=demo", "P00 INFO: stanza-upgrade command end: completed successfully" ] } @@ -5515,7 +11292,7 @@ "type" : "exe", "value" : { "output" : [ - "postgresql-9.6 (pid 5237) is running..." + "postgresql-9.6 (pid 5357) is running..." ] } }, @@ -5699,53 +11476,28 @@ ] } }, - "default" : { + "{\"os-type\":\"centos7\"}" : { "all" : { "user-guide" : [ - { - "key" : { - "id" : "s3", - "image" : "pgbackrest/test:s3-server-20180612A", - "name" : "s3-server", - "os" : "u16", - "update-hosts" : true - }, - "type" : "host", - "value" : { - "ip" : "172.17.0.2" - } - }, { "key" : { "id" : "build", - "image" : "pgbackrest/doc:u16-base", + "image" : "pgbackrest/doc:centos7", "name" : "build", - "os" : "u16", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "centos7", "update-hosts" : true }, "type" : "host", "value" : { - "ip" : "172.17.0.3" + "ip" : "172.17.0.2" } }, { "key" : { "bash-wrap" : true, "cmd" : [ - "sudo mkdir /root/pgbackrest-release-2.07" - ], - "host" : "build", - "load-env" : true, - "output" : false, - "run-as-user" : null - }, - "type" : "exe" - }, - { - "key" : { - "bash-wrap" : true, - "cmd" : [ - "sudo cp -r /backrest/libc /root/pgbackrest-release-2.07" + "sudo mkdir /root/pgbackrest-release-2.08" ], "host" : "build", "load-env" : true, @@ -5758,7 +11510,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo cp -r /backrest/src /root/pgbackrest-release-2.07" + "sudo cp -r /backrest/libc /root/pgbackrest-release-2.08" ], "host" : "build", "load-env" : true, @@ -5771,7 +11523,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo apt-get update" + "sudo cp -r /backrest/src /root/pgbackrest-release-2.08" ], "host" : "build", "load-env" : true, @@ -5784,7 +11536,8 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo apt-get install build-essential libssl-dev libperl-dev" + "sudo yum install build-essential gcc make openssl-devel libxml2-devel \\", + " perl-ExtUtils-Embed" ], "cmd-extra" : "-y 2>&1", "host" : "build", @@ -5808,7 +11561,7 @@ "type" : "exe", "value" : { "output" : [ - " USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS" + " USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES" ] } }, @@ -5816,7 +11569,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo make -s -C /root/pgbackrest-release-2.07/src" + "sudo make -s -C /root/pgbackrest-release-2.08/src" ], "host" : "build", "load-env" : true, @@ -5825,12 +11578,26 @@ }, "type" : "exe" }, + { + "key" : { + "id" : "s3", + "image" : "pgbackrest/test:s3-server-20180612A", + "name" : "s3-server", + "os" : "centos7", + "update-hosts" : true + }, + "type" : "host", + "value" : { + "ip" : "172.17.0.3" + } + }, { "key" : { "id" : "pg1", - "image" : "pgbackrest/doc:u16-base", + "image" : "pgbackrest/doc:centos7", "name" : "pg-primary", - "os" : "u16", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "centos7", "update-hosts" : true }, "type" : "host", @@ -5842,7 +11609,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo scp build:/root/pgbackrest-release-2.07/src/pgbackrest /usr/bin" + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" ], "cmd-extra" : "2>&1", "host" : "pg-primary", @@ -5869,7 +11636,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo apt-get install libdbd-pg-perl libio-socket-ssl-perl libxml-libxml-perl" + "sudo yum install perl perl-Time-HiRes perl-Digest-SHA perl-DBD-Pg perl-JSON-PP" ], "cmd-extra" : "-y 2>&1", "host" : "pg-primary", @@ -5984,7 +11751,7 @@ "type" : "exe", "value" : { "output" : [ - "pgBackRest 2.07 - General help", + "pgBackRest 2.08 - General help", "", "Usage:", " pgbackrest [options] [command]", @@ -6013,8 +11780,8 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres /usr/lib/postgresql/9.4/bin/initdb \\", - " -D /var/lib/postgresql/9.4/demo -k -A peer" + "sudo -u postgres /usr/pgsql-9.5/bin/initdb \\", + " -D /var/lib/pgsql/9.5/data -k -A peer" ], "host" : "pg-primary", "load-env" : true, @@ -6025,48 +11792,46 @@ }, { "key" : { - "bash-wrap" : true, - "cmd" : [ - "sudo pg_createcluster 9.4 demo" - ], + "file" : "/var/lib/pgsql/9.5/data/postgresql.conf", "host" : "pg-primary", - "load-env" : true, - "output" : true, - "run-as-user" : null + "option" : { + "listen_addresses" : { + "value" : "'*'" + } + } }, - "type" : "exe", + "type" : "cfg-postgresql", "value" : { - "output" : [ - "Configuring already existing cluster (configuration: /etc/postgresql/9.4/demo, data: /var/lib/postgresql/9.4/demo, owner: 106:110)", - "Ver Cluster Port Status Owner Data directory Log file", - "9.4 demo 5432 down postgres /var/lib/postgresql/9.4/demo /var/log/postgresql/postgresql-9.4-demo.log" + "config" : [ + "listen_addresses = '*'" ] } }, { "key" : { - "file" : "/etc/postgresql/9.4/demo/postgresql.conf", + "file" : "/var/lib/pgsql/9.5/data/postgresql.conf", "host" : "pg-primary", "option" : { - "listen_addresses" : { - "value" : "'*'" + "log_line_prefix" : { + "value" : "''" } } }, "type" : "cfg-postgresql", "value" : { "config" : [ - "listen_addresses = '*'" + "listen_addresses = '*'", + "log_line_prefix = ''" ] } }, { "key" : { - "file" : "/etc/postgresql/9.4/demo/postgresql.conf", + "file" : "/var/lib/pgsql/9.5/data/postgresql.conf", "host" : "pg-primary", "option" : { - "log_line_prefix" : { - "value" : "''" + "log_filename" : { + "value" : "'postgresql.log'" } } }, @@ -6074,6 +11839,7 @@ "value" : { "config" : [ "listen_addresses = '*'", + "log_filename = 'postgresql.log'", "log_line_prefix = ''" ] } @@ -6085,7 +11851,7 @@ "option" : { "demo" : { "pg1-path" : { - "value" : "/var/lib/postgresql/9.4/demo" + "value" : "/var/lib/pgsql/9.5/data" } }, "global" : { @@ -6102,7 +11868,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo" + "pg1-path=/var/lib/pgsql/9.5/data" ] } }, @@ -6129,7 +11895,7 @@ "type" : "exe", "value" : { "output" : [ - "pgBackRest 2.07 - 'backup' command - 'log-path' option help", + "pgBackRest 2.08 - 'backup' command - 'log-path' option help", "", "Path where log files are stored.", "", @@ -6196,7 +11962,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-path=/var/lib/pgbackrest" @@ -6205,7 +11971,7 @@ }, { "key" : { - "file" : "/etc/postgresql/9.4/demo/postgresql.conf", + "file" : "/var/lib/pgsql/9.5/data/postgresql.conf", "host" : "pg-primary", "option" : { "archive_command" : { @@ -6228,6 +11994,7 @@ "archive_command = 'pgbackrest --stanza=demo archive-push %p'", "archive_mode = on", "listen_addresses = '*'", + "log_filename = 'postgresql.log'", "log_line_prefix = ''", "max_wal_senders = 3", "wal_level = hot_standby" @@ -6238,7 +12005,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo restart" + "sudo systemctl restart postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -6276,7 +12043,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-path=/var/lib/pgbackrest", @@ -6302,7 +12069,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-path=/var/lib/pgbackrest", @@ -6332,7 +12099,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", @@ -6366,7 +12133,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stanza-create command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: stanza-create command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", "P00 INFO: stanza-create command end: completed successfully" ] } @@ -6392,8 +12159,8 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: check command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", - "P00 INFO: WAL segment 000000010000000000000001 successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.4-1/0000000100000000/000000010000000000000001-705735f4439628a66904794a74d3ddb3eab5502a.gz'", + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: WAL segment 000000010000000000000001 successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.5-1/0000000100000000/000000010000000000000001-0712b49e5f69a552c6848bf460ea7b20ec93d88d.gz'", "P00 INFO: check command end: completed successfully" ] } @@ -6420,16 +12187,16 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo", "P00 WARN: no prior backup exists, incr backup has been changed to full", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:05:05\": backup begins after the next regular checkpoint completes", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:09:10\": backup begins after the next regular checkpoint completes", "P00 INFO: backup start archive = 000000010000000000000002, lsn = 0/2000028", - " [filtered 754 lines of output]", - "P01 INFO: backup file /var/lib/postgresql/9.4/demo/base/1/11895 (0B, 100%)", - "P01 INFO: backup file /var/lib/postgresql/9.4/demo/base/1/11885 (0B, 100%)", - "P00 INFO: full backup size = 19.2MB", + " [filtered 851 lines of output]", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12280 (0B, 100%)", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12275 (0B, 100%)", + "P00 INFO: full backup size = 20.6MB", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", - "P00 INFO: backup stop archive = 000000010000000000000002, lsn = 0/2000128", + "P00 INFO: backup stop archive = 000000010000000000000002, lsn = 0/2000130", " [filtered 4 lines of output]" ] } @@ -6448,7 +12215,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-140505F" + "20190102-060910F" ] } }, @@ -6475,11 +12242,11 @@ "value" : { "output" : [ " [filtered 4 lines of output]", - "P01 INFO: backup file /var/lib/postgresql/9.4/demo/global/pg_control (8KB, 97%) checksum 9376cc0ac9bf5ba102df3f1a1de4fbf30012783d", - "P01 INFO: backup file /var/lib/postgresql/9.4/demo/backup_label (236B, 100%) checksum e46e73f23e19ce0edef3941133f253933e9de105", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/global/pg_control (8KB, 97%) checksum 095a0e372205150a876f1faaaac6dcee230358ed", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/backup_label (236B, 100%) checksum d694ecdaacdf1516317f565bf3d6b2a6516df6d3", "P00 INFO: diff backup size = 8.2KB", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", - "P00 INFO: backup stop archive = 000000010000000000000003, lsn = 0/30000F0", + "P00 INFO: backup stop archive = 000000010000000000000003, lsn = 0/30000F8", " [filtered 4 lines of output]" ] } @@ -6510,20 +12277,20 @@ " cipher: aes-256-cbc", "", " db (current)", - " wal archive min/max (9.4-1): 000000010000000000000002 / 000000010000000000000003", + " wal archive min/max (9.5-1): 000000010000000000000002 / 000000010000000000000003", "", - " full backup: 20181116-140505F", - " timestamp start/stop: 2018-11-16 14:05:05 / 2018-11-16 14:05:17", + " full backup: 20190102-060910F", + " timestamp start/stop: 2019-01-02 06:09:10 / 2019-01-02 06:09:24", " wal start/stop: 000000010000000000000002 / 000000010000000000000002", - " database size: 19.2MB, backup size: 19.2MB", - " repository size: 2.2MB, repository backup size: 2.2MB", + " database size: 20.6MB, backup size: 20.6MB", + " repository size: 2.4MB, repository backup size: 2.4MB", "", - " diff backup: 20181116-140505F_20181116-140517D", - " timestamp start/stop: 2018-11-16 14:05:17 / 2018-11-16 14:05:21", + " diff backup: 20190102-060910F_20190102-060925D", + " timestamp start/stop: 2019-01-02 06:09:25 / 2019-01-02 06:09:29", " wal start/stop: 000000010000000000000003 / 000000010000000000000003", - " database size: 19.2MB, backup size: 8.2KB", - " repository size: 2.2MB, repository backup size: 400B", - " backup reference list: 20181116-140505F" + " database size: 20.6MB, backup size: 8.2KB", + " repository size: 2.4MB, repository backup size: 400B", + " backup reference list: 20190102-060910F" ] } }, @@ -6531,7 +12298,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -6544,7 +12311,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres rm /var/lib/postgresql/9.4/demo/global/pg_control" + "sudo -u postgres rm /var/lib/pgsql/9.5/data/global/pg_control" ], "host" : "pg-primary", "load-env" : true, @@ -6557,9 +12324,23 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "err-expect" : "1", + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo systemctl status postgresql-9.5.service" + ], + "err-expect" : "3", "highlight" : { "filter" : true, "filter-context" : 2, @@ -6575,10 +12356,13 @@ "type" : "exe", "value" : { "output" : [ - "The PostgreSQL server failed to start. Please check the log output:", - "postgres: could not find the database system", - "Expected to find it in the directory \"/var/lib/postgresql/9.4/demo\",", - "but could not open file \"/var/lib/postgresql/9.4/demo/global/pg_control\": No such file or directory" + " [filtered 6 lines of output]", + "", + "Jan 02 06:09:32 pg-primary systemd[1]: Starting PostgreSQL 9.5 database server...", + "Jan 02 06:09:32 pg-primary pg_ctl[1050]: postgres: could not find the database system", + "Jan 02 06:09:32 pg-primary pg_ctl[1050]: Expected to find it in the directory \"/var/lib/pgsql/9.5/data\",", + "Jan 02 06:09:32 pg-primary pg_ctl[1050]: but could not open file \"/var/lib/pgsql/9.5/data/global/pg_control\": No such file or directory", + " [filtered 3 lines of output]" ] } }, @@ -6586,20 +12370,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres sleep 2" - ], - "host" : "pg-primary", - "load-env" : true, - "output" : false, - "run-as-user" : null - }, - "type" : "exe" - }, - { - "key" : { - "bash-wrap" : true, - "cmd" : [ - "sudo -u postgres find /var/lib/postgresql/9.4/demo -mindepth 1 -delete" + "sudo -u postgres find /var/lib/pgsql/9.5/data -mindepth 1 -delete" ], "host" : "pg-primary", "load-env" : true, @@ -6625,7 +12396,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -6669,12 +12440,12 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --type=incr", - "P00 INFO: last backup label = 20181116-140505F_20181116-140517D, version = 2.07", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:05:39\": backup begins after the next regular checkpoint completes", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --type=incr", + "P00 INFO: last backup label = 20190102-060910F_20190102-060925D, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:09:48\": backup begins after the next regular checkpoint completes", "P00 INFO: backup start archive = 000000020000000000000005, lsn = 0/5000028", "P00 WARN: a timeline switch has occurred since the last backup, enabling delta checksum", - " [filtered 9 lines of output]" + " [filtered 10 lines of output]" ] } }, @@ -6694,7 +12465,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", @@ -6730,11 +12501,11 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", - "P00 INFO: last backup label = 20181116-140505F_20181116-140539I, version = 2.07", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:05:44\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", + "P00 INFO: last backup label = 20190102-060910F_20190102-060948I, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:09:54\": backup begins after the requested immediate checkpoint completes", "P00 INFO: backup start archive = 000000020000000000000006, lsn = 0/6000028", - "P01 INFO: backup file /var/lib/postgresql/9.4/demo/global/pg_control (8KB, 97%) checksum 312279136f663d9dfc5545859712c99083f56b84", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/global/pg_control (8KB, 97%) checksum 76f4e9ad47ff9add13849de51ccdfb8139d66eaa", " [filtered 8 lines of output]" ] } @@ -6776,9 +12547,9 @@ "value" : { "output" : [ " [filtered 2 lines of output]", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:05:48\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:09:58\": backup begins after the requested immediate checkpoint completes", "P00 INFO: backup start archive = 000000020000000000000007, lsn = 0/7000028", - "P00 ERROR: [047]: unable to create path '/var/lib/pgbackrest/backup/demo/20181116-140505F_20181116-140548I': Permission denied", + "P00 ERROR: [047]: unable to create path '/var/lib/pgbackrest/backup/demo/20190102-060910F_20190102-060958I': Permission denied", "P00 INFO: backup command end: aborted with exception [047]" ] } @@ -6819,12 +12590,12 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", - "P00 INFO: last backup label = 20181116-140505F_20181116-140544I, version = 2.07", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:05:50\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --type=incr", + "P00 INFO: last backup label = 20190102-060910F_20190102-060954I, version = 2.08", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:10:02\": backup begins after the requested immediate checkpoint completes", "P00 ERROR: [057]: ERROR: a backup is already in progress", " HINT: Run pg_stop_backup() and try again.:", - " select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_xlogfile_name(lsn), lsn::text, (select setting::int8 from pg_settings where name = 'wal_segment_size') * (select setting::int8 from pg_settings where name = 'wal_block_size') from pg_start_backup('pgBackRest backup started at 2018-11-16 14:05:50', true) as lsn" + " select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.US TZ'), pg_xlogfile_name(lsn), lsn::text, (select setting::int8 from pg_settings where name = 'wal_segment_size') * (select setting::int8 from pg_settings where name = 'wal_block_size') from pg_start_backup('pgBackRest backup started at 2019-01-02 06:10:02', true) as lsn" ] } }, @@ -6844,7 +12615,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", @@ -6881,14 +12652,14 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --stop-auto --type=incr", - "P00 INFO: last backup label = 20181116-140505F_20181116-140544I, version = 2.07", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-full=2 --stanza=demo --start-fast --stop-auto --type=incr", + "P00 INFO: last backup label = 20190102-060910F_20190102-060954I, version = 2.08", "P00 WARN: the cluster is already in backup mode but no pgBackRest backup process is running. pg_stop_backup() will be called so a new backup can be started.", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:05:52\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:10:04\": backup begins after the requested immediate checkpoint completes", "P00 INFO: backup start archive = 000000020000000000000008, lsn = 0/8000028", - "P01 INFO: backup file /var/lib/postgresql/9.4/demo/global/pg_control (8KB, 97%) checksum 01b3d75ac68bd790f435cf97a3d7d000e40bc5c2", - " [filtered 8 lines of output]" + "P01 INFO: backup file /var/lib/pgsql/9.5/data/global/pg_control (8KB, 83%) checksum 673ff11ab62f3547d567713d4ed8ce7c22de17b4", + " [filtered 9 lines of output]" ] } }, @@ -6913,7 +12684,7 @@ " \"database\" : {", " \"id\" : 1", " },", - " \"id\" : \"9.4-1\",", + " \"id\" : \"9.5-1\",", " \"max\" : \"000000020000000000000008\",", " \"min\" : \"000000010000000000000002\"", " }", @@ -6926,25 +12697,25 @@ " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", " },", " \"info\" : {", - " \"delta\" : 20162900,", + " \"delta\" : 21697944,", " \"repository\" : {", - " \"delta\" : 2389184,", - " \"size\" : 2389184", + " \"delta\" : 2543648,", + " \"size\" : 2543648", " },", - " \"size\" : 20162900", + " \"size\" : 21697944", " },", - " \"label\" : \"20181116-140505F\",", + " \"label\" : \"20190102-060910F\",", " \"prior\" : null,", " \"reference\" : null,", " \"timestamp\" : {", - " \"start\" : 1542377105,", - " \"stop\" : 1542377117", + " \"start\" : 1546409350,", + " \"stop\" : 1546409364", " },", " \"type\" : \"full\"", " },", @@ -6955,7 +12726,7 @@ " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", @@ -6964,18 +12735,18 @@ " \"delta\" : 8428,", " \"repository\" : {", " \"delta\" : 400,", - " \"size\" : 2389184", + " \"size\" : 2543648", " },", - " \"size\" : 20162900", + " \"size\" : 21697944", " },", - " \"label\" : \"20181116-140505F_20181116-140517D\",", - " \"prior\" : \"20181116-140505F\",", + " \"label\" : \"20190102-060910F_20190102-060925D\",", + " \"prior\" : \"20190102-060910F\",", " \"reference\" : [", - " \"20181116-140505F\"", + " \"20190102-060910F\"", " ],", " \"timestamp\" : {", - " \"start\" : 1542377117,", - " \"stop\" : 1542377121", + " \"start\" : 1546409365,", + " \"stop\" : 1546409369", " },", " \"type\" : \"diff\"", " },", @@ -6986,27 +12757,27 @@ " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", " },", " \"info\" : {", - " \"delta\" : 8428,", + " \"delta\" : 9348,", " \"repository\" : {", - " \"delta\" : 400,", - " \"size\" : 2389184", + " \"delta\" : 832,", + " \"size\" : 2543808", " },", - " \"size\" : 20162900", + " \"size\" : 21698512", " },", - " \"label\" : \"20181116-140505F_20181116-140539I\",", - " \"prior\" : \"20181116-140505F_20181116-140517D\",", + " \"label\" : \"20190102-060910F_20190102-060948I\",", + " \"prior\" : \"20190102-060910F_20190102-060925D\",", " \"reference\" : [", - " \"20181116-140505F\"", + " \"20190102-060910F\"", " ],", " \"timestamp\" : {", - " \"start\" : 1542377139,", - " \"stop\" : 1542377143", + " \"start\" : 1546409388,", + " \"stop\" : 1546409392", " },", " \"type\" : \"incr\"", " },", @@ -7017,7 +12788,7 @@ " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", @@ -7026,18 +12797,19 @@ " \"delta\" : 8428,", " \"repository\" : {", " \"delta\" : 400,", - " \"size\" : 2389184", + " \"size\" : 2543808", " },", - " \"size\" : 20162900", + " \"size\" : 21698512", " },", - " \"label\" : \"20181116-140505F_20181116-140544I\",", - " \"prior\" : \"20181116-140505F_20181116-140539I\",", + " \"label\" : \"20190102-060910F_20190102-060954I\",", + " \"prior\" : \"20190102-060910F_20190102-060948I\",", " \"reference\" : [", - " \"20181116-140505F\"", + " \"20190102-060910F\",", + " \"20190102-060910F_20190102-060948I\"", " ],", " \"timestamp\" : {", - " \"start\" : 1542377144,", - " \"stop\" : 1542377147", + " \"start\" : 1546409394,", + " \"stop\" : 1546409397", " },", " \"type\" : \"incr\"", " },", @@ -7048,27 +12820,27 @@ " },", " \"backrest\" : {", " \"format\" : 5,", - " \"version\" : \"2.07\"", + " \"version\" : \"2.08\"", " },", " \"database\" : {", " \"id\" : 1", " },", " \"info\" : {", - " \"delta\" : 8428,", + " \"delta\" : 9773,", " \"repository\" : {", - " \"delta\" : 400,", - " \"size\" : 2389184", + " \"delta\" : 1024,", + " \"size\" : 2544000", " },", - " \"size\" : 20162900", + " \"size\" : 21698937", " },", - " \"label\" : \"20181116-140505F_20181116-140552I\",", - " \"prior\" : \"20181116-140505F_20181116-140544I\",", + " \"label\" : \"20190102-060910F_20190102-061004I\",", + " \"prior\" : \"20190102-060910F_20190102-060954I\",", " \"reference\" : [", - " \"20181116-140505F\"", + " \"20190102-060910F\"", " ],", " \"timestamp\" : {", - " \"start\" : 1542377152,", - " \"stop\" : 1542377157", + " \"start\" : 1546409404,", + " \"stop\" : 1546409409", " },", " \"type\" : \"incr\"", " }", @@ -7077,8 +12849,8 @@ " \"db\" : [", " {", " \"id\" : 1,", - " \"system-id\" : 6624459153247327126,", - " \"version\" : \"9.4\"", + " \"system-id\" : 6641777499792298365,", + " \"version\" : \"9.5\"", " }", " ],", " \"name\" : \"demo\",", @@ -7095,7 +12867,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres mkdir -p /var/lib/postgresql/pgbackrest/doc/example" + "sudo -u postgres mkdir -p /var/lib/pgsql/pgbackrest/doc/example" ], "host" : "pg-primary", "load-env" : true, @@ -7109,7 +12881,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres cp -r /backrest/doc/example/* \\", - " /var/lib/postgresql/pgbackrest/doc/example" + " /var/lib/pgsql/pgbackrest/doc/example" ], "host" : "pg-primary", "load-env" : true, @@ -7123,7 +12895,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres cat \\", - " /var/lib/postgresql/pgbackrest/doc/example/pgsql-pgbackrest-info.sql" + " /var/lib/pgsql/pgbackrest/doc/example/pgsql-pgbackrest-info.sql" ], "host" : "pg-primary", "load-env" : true, @@ -7171,7 +12943,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres psql -f \\", - " /var/lib/postgresql/pgbackrest/doc/example/pgsql-pgbackrest-info.sql" + " /var/lib/pgsql/pgbackrest/doc/example/pgsql-pgbackrest-info.sql" ], "host" : "pg-primary", "load-env" : true, @@ -7185,7 +12957,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres cat \\", - " /var/lib/postgresql/pgbackrest/doc/example/pgsql-pgbackrest-query.sql" + " /var/lib/pgsql/pgbackrest/doc/example/pgsql-pgbackrest-query.sql" ], "host" : "pg-primary", "load-env" : true, @@ -7220,7 +12992,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres psql -f \\", - " /var/lib/postgresql/pgbackrest/doc/example/pgsql-pgbackrest-query.sql" + " /var/lib/pgsql/pgbackrest/doc/example/pgsql-pgbackrest-query.sql" ], "host" : "pg-primary", "load-env" : true, @@ -7232,63 +13004,11 @@ "output" : [ " name | last_successful_backup | last_archived_wal ", "--------+------------------------+--------------------------", - " \"demo\" | 2018-11-16 14:05:57+00 | 000000020000000000000008", + " \"demo\" | 2019-01-02 06:10:09+00 | 000000020000000000000008", "(1 row)" ] } }, - { - "key" : { - "bash-wrap" : true, - "cmd" : [ - "sudo apt-get install jq" - ], - "cmd-extra" : "-y 2>&1", - "host" : "pg-primary", - "load-env" : true, - "output" : false, - "run-as-user" : null - }, - "type" : "exe" - }, - { - "key" : { - "bash-wrap" : true, - "cmd" : [ - "sudo -u postgres pgbackrest --output=json --stanza=demo info | \\", - " jq '.[0] | .backup[-1] | .timestamp.stop'" - ], - "host" : "pg-primary", - "load-env" : true, - "output" : true, - "run-as-user" : null - }, - "type" : "exe", - "value" : { - "output" : [ - "1542377157" - ] - } - }, - { - "key" : { - "bash-wrap" : true, - "cmd" : [ - "sudo -u postgres pgbackrest --output=json --stanza=demo info | \\", - " jq '.[0] | .archive[-1] | .max'" - ], - "host" : "pg-primary", - "load-env" : true, - "output" : true, - "run-as-user" : null - }, - "type" : "exe", - "value" : { - "output" : [ - "\"000000020000000000000008\"" - ] - } - }, { "key" : { "file" : "/etc/pgbackrest/pgbackrest.conf", @@ -7305,7 +13025,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", @@ -7331,7 +13051,7 @@ "filter" : true, "filter-context" : 2, "list" : [ - "archive retention on backup 20181116-140505F|remove archive" + "archive retention on backup 20190102-060910F|remove archive" ] }, "host" : "pg-primary", @@ -7342,11 +13062,11 @@ "type" : "exe", "value" : { "output" : [ - " [filtered 763 lines of output]", + " [filtered 860 lines of output]", "P00 INFO: backup command end: completed successfully", "P00 INFO: expire command begin", - "P00 DETAIL: archive retention on backup 20181116-140505F, archiveId = 9.4-1, start = 000000010000000000000002", - "P00 DETAIL: no archive to remove, archiveId = 9.4-1", + "P00 DETAIL: archive retention on backup 20190102-060910F, archiveId = 9.5-1, start = 000000010000000000000002", + "P00 DETAIL: no archive to remove, archiveId = 9.5-1", "P00 INFO: expire command end: completed successfully" ] } @@ -7365,7 +13085,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-140603F" + "20190102-061014F" ] } }, @@ -7380,7 +13100,7 @@ "filter" : true, "filter-context" : 2, "list" : [ - "expire full backup set\\: 20181116-140505F|archive retention on backup 20181116-140603F|remove archive" + "expire full backup set\\: 20190102-060910F|archive retention on backup 20190102-061014F|remove archive" ] }, "host" : "pg-primary", @@ -7391,12 +13111,12 @@ "type" : "exe", "value" : { "output" : [ - " [filtered 763 lines of output]", + " [filtered 860 lines of output]", "P00 INFO: backup command end: completed successfully", "P00 INFO: expire command begin", - "P00 INFO: expire full backup set: 20181116-140505F, 20181116-140505F_20181116-140517D, 20181116-140505F_20181116-140539I, 20181116-140505F_20181116-140544I, 20181116-140505F_20181116-140552I", - "P00 INFO: remove expired backup 20181116-140505F_20181116-140552I", - "P00 INFO: remove expired backup 20181116-140505F_20181116-140544I", + "P00 INFO: expire full backup set: 20190102-060910F, 20190102-060910F_20190102-060925D, 20190102-060910F_20190102-060948I, 20190102-060910F_20190102-060954I, 20190102-060910F_20190102-061004I", + "P00 INFO: remove expired backup 20190102-060910F_20190102-061004I", + "P00 INFO: remove expired backup 20190102-060910F_20190102-060954I", " [filtered 3 lines of output]" ] } @@ -7417,7 +13137,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", @@ -7460,7 +13180,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-140615F_20181116-140627D" + "20190102-061029F_20190102-061044D" ] } }, @@ -7488,7 +13208,7 @@ "filter" : true, "filter-context" : 2, "list" : [ - "expire diff backup set: 20181116-140615F_20181116-140627D" + "expire diff backup set: 20190102-061029F_20190102-061044D" ] }, "host" : "pg-primary", @@ -7502,9 +13222,9 @@ " [filtered 11 lines of output]", "P00 INFO: backup command end: completed successfully", "P00 INFO: expire command begin", - "P00 INFO: expire diff backup set: 20181116-140615F_20181116-140627D, 20181116-140615F_20181116-140632I", - "P00 INFO: remove expired backup 20181116-140615F_20181116-140632I", - "P00 INFO: remove expired backup 20181116-140615F_20181116-140627D" + "P00 INFO: expire diff backup set: 20190102-061029F_20190102-061044D, 20190102-061029F_20190102-061049I", + "P00 INFO: remove expired backup 20190102-061029F_20190102-061049I", + "P00 INFO: remove expired backup 20190102-061029F_20190102-061044D" ] } }, @@ -7524,7 +13244,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-cipher-pass=zWaf6XtpjIVZC5444yXB+cgFDFl7MxGlgkZSaoPvTGirhPygu4jOKOXf9LO4vjfO", @@ -7554,7 +13274,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-140615F_20181116-140635D" + "20190102-061029F_20190102-061054D" ] } }, @@ -7595,10 +13315,10 @@ "type" : "exe", "value" : { "output" : [ - " [filtered 8 lines of output]", + " [filtered 9 lines of output]", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", - "P00 INFO: backup stop archive = 000000020000000000000013, lsn = 0/130000F0", - "P00 INFO: new backup label = 20181116-140615F_20181116-140641D", + "P00 INFO: backup stop archive = 000000020000000000000013, lsn = 0/130000F8", + "P00 INFO: new backup label = 20190102-061029F_20190102-061101D", "P00 INFO: backup command end: completed successfully", "P00 INFO: expire command begin" ] @@ -7618,7 +13338,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-140615F_20181116-140641D" + "20190102-061029F_20190102-061101D" ] } }, @@ -7633,7 +13353,7 @@ "filter" : true, "filter-context" : 2, "list" : [ - "archive retention on backup 20181116-140615F_20181116-140635D|remove archive" + "archive retention on backup 20190102-061029F_20190102-061054D|remove archive" ] }, "host" : "pg-primary", @@ -7644,13 +13364,14 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: expire command begin 2.07: --log-level-console=detail --log-level-stderr=off --no-log-timestamp --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-archive=1 --repo1-retention-archive-type=diff --repo1-retention-diff=2 --repo1-retention-full=2 --stanza=demo", - "P00 DETAIL: archive retention on backup 20181116-140603F, archiveId = 9.4-1, start = 00000002000000000000000A, stop = 00000002000000000000000A", - "P00 DETAIL: archive retention on backup 20181116-140615F, archiveId = 9.4-1, start = 00000002000000000000000B, stop = 00000002000000000000000B", - "P00 DETAIL: archive retention on backup 20181116-140615F_20181116-140635D, archiveId = 9.4-1, start = 00000002000000000000000F, stop = 00000002000000000000000F", - "P00 DETAIL: archive retention on backup 20181116-140615F_20181116-140641D, archiveId = 9.4-1, start = 000000020000000000000013", - "P00 DETAIL: remove archive: archiveId = 9.4-1, start = 00000002000000000000000C, stop = 00000002000000000000000E", - "P00 DETAIL: remove archive: archiveId = 9.4-1, start = 000000020000000000000010, stop = 000000020000000000000012", + "P00 INFO: expire command begin 2.08: --log-level-console=detail --log-level-stderr=off --no-log-timestamp --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=/var/lib/pgbackrest --repo1-retention-archive=1 --repo1-retention-archive-type=diff --repo1-retention-diff=2 --repo1-retention-full=2 --stanza=demo", + "P00 DETAIL: archive retention on backup 20190102-061014F, archiveId = 9.5-1, start = 00000002000000000000000A, stop = 00000002000000000000000A", + "P00 DETAIL: archive retention on backup 20190102-061029F, archiveId = 9.5-1, start = 00000002000000000000000C, stop = 00000002000000000000000C", + "P00 DETAIL: archive retention on backup 20190102-061029F_20190102-061054D, archiveId = 9.5-1, start = 000000020000000000000010, stop = 000000020000000000000010", + "P00 DETAIL: archive retention on backup 20190102-061029F_20190102-061101D, archiveId = 9.5-1, start = 000000020000000000000013", + "P00 DETAIL: remove archive: archiveId = 9.5-1, start = 00000002000000000000000B, stop = 00000002000000000000000B", + "P00 DETAIL: remove archive: archiveId = 9.5-1, start = 00000002000000000000000D, stop = 00000002000000000000000F", + "P00 DETAIL: remove archive: archiveId = 9.5-1, start = 000000020000000000000011, stop = 000000020000000000000012", "P00 INFO: expire command end: completed successfully" ] } @@ -7659,7 +13380,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -7690,15 +13411,9 @@ "type" : "exe", "value" : { "output" : [ - " [filtered 693 lines of output]", - "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/base/12134/PG_VERSION - exists and matches backup (4B, 99%) checksum 8dbabb96e032b8d9f1993c0e4b9141e71ade01a1", - "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/base/1/PG_VERSION - exists and matches backup (4B, 99%) checksum 8dbabb96e032b8d9f1993c0e4b9141e71ade01a1", - "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/PG_VERSION - exists and matches backup (4B, 100%) checksum 8dbabb96e032b8d9f1993c0e4b9141e71ade01a1", - "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/global/12086 - exists and is zero size (0B, 100%)", - "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/global/12038 - exists and is zero size (0B, 100%)", - " [filtered 83 lines of output]", - "P01 DETAIL: restore file /var/lib/postgresql/9.4/demo/base/1/11885 - exists and is zero size (0B, 100%)", - "P00 INFO: write /var/lib/postgresql/9.4/demo/recovery.conf", + " [filtered 877 lines of output]", + "P01 DETAIL: restore file /var/lib/pgsql/9.5/data/base/1/12275 - exists and is zero size (0B, 100%)", + "P00 INFO: write /var/lib/pgsql/9.5/data/recovery.conf", "P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)", "P00 INFO: restore command end: completed successfully" ] @@ -7708,7 +13423,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -7839,7 +13554,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres du -sh /var/lib/postgresql/9.4/demo/base/24576" + "sudo -u postgres du -sh /var/lib/pgsql/9.5/data/base/24576" ], "host" : "pg-primary", "load-env" : true, @@ -7849,7 +13564,7 @@ "type" : "exe", "value" : { "output" : [ - "6.4M\t/var/lib/postgresql/9.4/demo/base/24576" + "6.9M\t/var/lib/pgsql/9.5/data/base/24576" ] } }, @@ -7857,7 +13572,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -7884,7 +13599,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -7957,7 +13672,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres du -sh /var/lib/postgresql/9.4/demo/base/24576" + "sudo -u postgres du -sh /var/lib/pgsql/9.5/data/base/24576" ], "host" : "pg-primary", "load-env" : true, @@ -7967,7 +13682,7 @@ "type" : "exe", "value" : { "output" : [ - "152K\t/var/lib/postgresql/9.4/demo/base/24576" + "152K\t/var/lib/pgsql/9.5/data/base/24576" ] } }, @@ -8013,8 +13728,8 @@ " oid | datname ", "-------+-----------", " 1 | template1", - " 12134 | template0", - " 12139 | postgres", + " 12437 | template0", + " 12442 | postgres", " 24577 | test2", "(4 rows)" ] @@ -8079,7 +13794,7 @@ "type" : "exe", "value" : { "output" : [ - "2018-11-16 14:07:24.729058+00" + "2019-01-02 06:11:50.647181+00" ] } }, @@ -8118,7 +13833,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -8132,7 +13847,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres pgbackrest --stanza=demo --delta \\", - " --type=time \"--target=2018-11-16 14:07:24.729058+00\" restore" + " --type=time \"--target=2019-01-02 06:11:50.647181+00\" restore" ], "host" : "pg-primary", "load-env" : true, @@ -8145,7 +13860,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + "sudo rm /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "host" : "pg-primary", "load-env" : true, @@ -8158,7 +13873,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres cat /var/lib/postgresql/9.4/demo/recovery.conf" + "sudo -u postgres cat /var/lib/pgsql/9.5/data/recovery.conf" ], "highlight" : { "filter" : true, @@ -8176,7 +13891,7 @@ "value" : { "output" : [ "restore_command = 'pgbackrest --stanza=demo archive-get %f \"%p\"'", - "recovery_target_time = '2018-11-16 14:07:24.729058+00'" + "recovery_target_time = '2019-01-02 06:11:50.647181+00'" ] } }, @@ -8184,7 +13899,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -8238,7 +13953,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + "sudo -u postgres cat /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "highlight" : { "filter" : true, @@ -8255,19 +13970,19 @@ "type" : "exe", "value" : { "output" : [ - "LOG: database system was interrupted; last known up at 2018-11-16 14:07:17 UTC", - "LOG: starting point-in-time recovery to 2018-11-16 14:07:24.729058+00", + "LOG: database system was interrupted; last known up at 2019-01-02 06:11:41 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:11:50.647181+00", "LOG: restored log file \"00000004.history\" from archive", "LOG: restored log file \"000000040000000000000018\" from archive", - " [filtered 2 lines of output]", - "LOG: incomplete startup packet", + "LOG: redo starts at 0/18000028", + "LOG: consistent recovery state reached at 0/180000F8", "LOG: restored log file \"000000040000000000000019\" from archive", - "LOG: recovery stopping before commit of transaction 689, time 2018-11-16 14:07:24.999221+00", - "LOG: redo done at 0/19016E90", - "LOG: last completed transaction was at log time 2018-11-16 14:07:24.465041+00", + "LOG: recovery stopping before commit of transaction 712, time 2019-01-02 06:11:50.958059+00", + "LOG: redo done at 0/1901BC40", + "LOG: last completed transaction was at log time 2019-01-02 06:11:50.314328+00", "LOG: selected new timeline ID: 5", - "LOG: restored log file \"00000004.history\" from archive", - " [filtered 4 lines of output]" + "LOG: archive recovery complete", + " [filtered 3 lines of output]" ] } }, @@ -8316,7 +14031,7 @@ "type" : "exe", "value" : { "output" : [ - "20181116-140615F_20181116-140716D" + "20190102-061029F_20190102-061140D" ] } }, @@ -8337,7 +14052,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -8351,7 +14066,7 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres pgbackrest --stanza=demo --delta \\", - " --type=time \"--target=2018-11-16 14:07:24.729058+00\" restore" + " --type=time \"--target=2019-01-02 06:11:50.647181+00\" restore" ], "host" : "pg-primary", "load-env" : true, @@ -8364,7 +14079,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + "sudo rm /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "host" : "pg-primary", "load-env" : true, @@ -8377,7 +14092,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -8431,7 +14146,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + "sudo -u postgres cat /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "highlight" : { "filter" : true, @@ -8448,16 +14163,15 @@ "type" : "exe", "value" : { "output" : [ - "LOG: database system was interrupted; last known up at 2018-11-16 14:07:35 UTC", - "LOG: starting point-in-time recovery to 2018-11-16 14:07:24.729058+00", - "FATAL: the database system is starting up", + "LOG: database system was interrupted; last known up at 2019-01-02 06:12:02 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:11:50.647181+00", "LOG: restored log file \"00000005.history\" from archive", "LOG: restored log file \"00000005000000000000001A\" from archive", "LOG: redo starts at 0/1A000028", - "LOG: consistent recovery state reached at 0/1A0000F0", - "LOG: incomplete startup packet", - "LOG: redo done at 0/1A0000F0", - " [filtered 10 lines of output]" + "LOG: consistent recovery state reached at 0/1A0000F8", + "LOG: redo done at 0/1A0000F8", + "LOG: restored log file \"00000005000000000000001A\" from archive", + " [filtered 7 lines of output]" ] } }, @@ -8471,7 +14185,7 @@ "filter" : false, "filter-context" : 2, "list" : [ - "20181116-140615F_20181116-140716D" + "20190102-061029F_20190102-061140D" ] }, "host" : "pg-primary", @@ -8487,47 +14201,47 @@ " cipher: aes-256-cbc", "", " db (current)", - " wal archive min/max (9.4-1): 00000002000000000000000A / 00000005000000000000001A", + " wal archive min/max (9.5-1): 00000002000000000000000A / 00000005000000000000001A", "", - " full backup: 20181116-140603F", - " timestamp start/stop: 2018-11-16 14:06:03 / 2018-11-16 14:06:14", + " full backup: 20190102-061014F", + " timestamp start/stop: 2019-01-02 06:10:14 / 2019-01-02 06:10:28", " wal start/stop: 00000002000000000000000A / 00000002000000000000000A", - " database size: 19.2MB, backup size: 19.2MB", - " repository size: 2.2MB, repository backup size: 2.2MB", + " database size: 20.7MB, backup size: 20.7MB", + " repository size: 2.4MB, repository backup size: 2.4MB", "", - " full backup: 20181116-140615F", - " timestamp start/stop: 2018-11-16 14:06:15 / 2018-11-16 14:06:26", - " wal start/stop: 00000002000000000000000B / 00000002000000000000000B", - " database size: 19.2MB, backup size: 19.2MB", - " repository size: 2.2MB, repository backup size: 2.2MB", + " full backup: 20190102-061029F", + " timestamp start/stop: 2019-01-02 06:10:29 / 2019-01-02 06:10:43", + " wal start/stop: 00000002000000000000000C / 00000002000000000000000C", + " database size: 20.7MB, backup size: 20.7MB", + " repository size: 2.4MB, repository backup size: 2.4MB", "", - " diff backup: 20181116-140615F_20181116-140641D", - " timestamp start/stop: 2018-11-16 14:06:41 / 2018-11-16 14:06:44", + " diff backup: 20190102-061029F_20190102-061101D", + " timestamp start/stop: 2019-01-02 06:11:01 / 2019-01-02 06:11:04", " wal start/stop: 000000020000000000000013 / 000000020000000000000013", - " database size: 19.2MB, backup size: 72.2KB", - " repository size: 2.2MB, repository backup size: 9.8KB", - " backup reference list: 20181116-140615F", + " database size: 20.7MB, backup size: 113.9KB", + " repository size: 2.4MB, repository backup size: 12.6KB", + " backup reference list: 20190102-061029F", "", - " incr backup: 20181116-140615F_20181116-140655I", - " timestamp start/stop: 2018-11-16 14:06:55 / 2018-11-16 14:07:03", + " incr backup: 20190102-061029F_20190102-061115I", + " timestamp start/stop: 2019-01-02 06:11:15 / 2019-01-02 06:11:27", " wal start/stop: 000000030000000000000015 / 000000030000000000000015", - " database size: 31.7MB, backup size: 12.5MB", - " repository size: 3.7MB, repository backup size: 1.5MB", - " backup reference list: 20181116-140615F, 20181116-140615F_20181116-140641D", + " database size: 34.1MB, backup size: 13.5MB", + " repository size: 4MB, repository backup size: 1.6MB", + " backup reference list: 20190102-061029F, 20190102-061029F_20190102-061101D", "", - " diff backup: 20181116-140615F_20181116-140716D", - " timestamp start/stop: 2018-11-16 14:07:16 / 2018-11-16 14:07:24", + " diff backup: 20190102-061029F_20190102-061140D", + " timestamp start/stop: 2019-01-02 06:11:40 / 2019-01-02 06:11:49", " wal start/stop: 000000040000000000000018 / 000000040000000000000018", - " database size: 25.5MB, backup size: 6.3MB", - " repository size: 3MB, repository backup size: 780.9KB", - " backup reference list: 20181116-140615F", + " database size: 27.4MB, backup size: 6.9MB", + " repository size: 3.2MB, repository backup size: 835.9KB", + " backup reference list: 20190102-061029F", "", - " incr backup: 20181116-140615F_20181116-140734I", - " timestamp start/stop: 2018-11-16 14:07:34 / 2018-11-16 14:07:39", + " incr backup: 20190102-061029F_20190102-061201I", + " timestamp start/stop: 2019-01-02 06:12:01 / 2019-01-02 06:12:07", " wal start/stop: 00000005000000000000001A / 00000005000000000000001A", - " database size: 25.5MB, backup size: 1.7MB", - " repository size: 3MB, repository backup size: 201.5KB", - " backup reference list: 20181116-140615F, 20181116-140615F_20181116-140716D" + " database size: 27.4MB, backup size: 2MB", + " repository size: 3.2MB, repository backup size: 209.9KB", + " backup reference list: 20190102-061029F, 20190102-061029F_20190102-061140D" ] } }, @@ -8535,7 +14249,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -8549,8 +14263,8 @@ "bash-wrap" : true, "cmd" : [ "sudo -u postgres pgbackrest --stanza=demo --delta \\", - " --type=time \"--target=2018-11-16 14:07:24.729058+00\" \\", - " --set=20181116-140615F_20181116-140716D restore" + " --type=time \"--target=2019-01-02 06:11:50.647181+00\" \\", + " --set=20190102-061029F_20190102-061140D restore" ], "host" : "pg-primary", "load-env" : true, @@ -8563,7 +14277,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + "sudo rm /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "host" : "pg-primary", "load-env" : true, @@ -8576,7 +14290,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -8630,7 +14344,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + "sudo -u postgres cat /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "highlight" : { "filter" : true, @@ -8647,22 +14361,36 @@ "type" : "exe", "value" : { "output" : [ - "LOG: database system was interrupted; last known up at 2018-11-16 14:07:17 UTC", - "LOG: starting point-in-time recovery to 2018-11-16 14:07:24.729058+00", + "LOG: database system was interrupted; last known up at 2019-01-02 06:11:41 UTC", + "LOG: starting point-in-time recovery to 2019-01-02 06:11:50.647181+00", "LOG: restored log file \"00000004.history\" from archive", "LOG: restored log file \"000000040000000000000018\" from archive", - " [filtered 2 lines of output]", - "LOG: incomplete startup packet", + "LOG: redo starts at 0/18000028", + "LOG: consistent recovery state reached at 0/180000F8", "LOG: restored log file \"000000040000000000000019\" from archive", - "LOG: recovery stopping before commit of transaction 689, time 2018-11-16 14:07:24.999221+00", - "LOG: redo done at 0/19016E90", - "LOG: last completed transaction was at log time 2018-11-16 14:07:24.465041+00", + "LOG: recovery stopping before commit of transaction 712, time 2019-01-02 06:11:50.958059+00", + "LOG: redo done at 0/1901BC40", + "LOG: last completed transaction was at log time 2019-01-02 06:11:50.314328+00", "LOG: restored log file \"00000005.history\" from archive", "LOG: restored log file \"00000006.history\" from archive", - " [filtered 7 lines of output]" + " [filtered 5 lines of output]" ] } }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo yum install perl-XML-LibXML perl-IO-Socket-SSL" + ], + "cmd-extra" : "-y 2>&1", + "host" : "pg-primary", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, { "key" : { "bash-wrap" : true, @@ -8693,7 +14421,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-cipher-type=none", @@ -8748,7 +14476,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "process-max=4", @@ -8774,7 +14502,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "echo \"172.17.0.2 demo-bucket.s3.amazonaws.com s3.amazonaws.com\" | tee -a /etc/hosts" + "echo \"172.17.0.3 demo-bucket.s3.amazonaws.com s3.amazonaws.com\" | tee -a /etc/hosts" ], "host" : "pg-primary", "load-env" : true, @@ -8804,7 +14532,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stanza-create command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stanza-create command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", "P00 INFO: stanza-create command end: completed successfully" ] } @@ -8831,16 +14559,16 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: backup command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=4 --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-retention-diff=2 --repo1-retention-full=2 --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo --start-fast --stop-auto", + "P00 INFO: backup command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=4 --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-retention-diff=2 --repo1-retention-full=2 --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo --start-fast --stop-auto", "P00 WARN: no prior backup exists, incr backup has been changed to full", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:08:04\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:12:50\": backup begins after the requested immediate checkpoint completes", "P00 INFO: backup start archive = 00000007000000000000001A, lsn = 0/1A000028", - " [filtered 995 lines of output]", - "P04 INFO: backup file /var/lib/postgresql/9.4/demo/base/1/11895 (0B, 100%)", - "P01 INFO: backup file /var/lib/postgresql/9.4/demo/base/1/11885 (0B, 100%)", - "P00 INFO: full backup size = 25.5MB", + " [filtered 1119 lines of output]", + "P01 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12280 (0B, 100%)", + "P02 INFO: backup file /var/lib/pgsql/9.5/data/base/1/12275 (0B, 100%)", + "P00 INFO: full backup size = 27.4MB", "P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive", - "P00 INFO: backup stop archive = 00000007000000000000001A, lsn = 0/1A000128", + "P00 INFO: backup stop archive = 00000007000000000000001A, lsn = 0/1A000130", " [filtered 4 lines of output]" ] } @@ -8849,7 +14577,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -8879,7 +14607,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stop command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stop command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", "P00 INFO: stop command end: completed successfully" ] } @@ -8905,7 +14633,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stanza-delete command begin 2.07: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", + "P00 INFO: stanza-delete command begin 2.08: --log-level-console=info --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-cipher-type=none --repo1-path=/demo-repo --repo1-s3-bucket=demo-bucket --repo1-s3-endpoint=s3.amazonaws.com --repo1-s3-key=<redacted> --repo1-s3-key-secret=<redacted> --repo1-s3-region=us-east-1 --no-repo1-s3-verify-ssl --repo1-type=s3 --stanza=demo", "P00 INFO: stanza-delete command end: completed successfully" ] } @@ -8914,7 +14642,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -8926,9 +14654,10 @@ { "key" : { "id" : "repo1", - "image" : "pgbackrest/doc:u16-base", + "image" : "pgbackrest/doc:centos7", "name" : "repository", - "os" : "u16", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "centos7", "update-hosts" : true }, "type" : "host", @@ -8940,7 +14669,20 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo adduser --disabled-password --gecos \"\" pgbackrest" + "sudo groupadd pgbackrest" + ], + "host" : "repository", + "load-env" : true, + "output" : false, + "run-as-user" : null + }, + "type" : "exe" + }, + { + "key" : { + "bash-wrap" : true, + "cmd" : [ + "sudo adduser -gpgbackrest -n pgbackrest" ], "host" : "repository", "load-env" : true, @@ -8953,7 +14695,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo scp build:/root/pgbackrest-release-2.07/src/pgbackrest /usr/bin" + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" ], "cmd-extra" : "2>&1", "host" : "repository", @@ -8980,7 +14722,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo apt-get install libdbd-pg-perl libio-socket-ssl-perl libxml-libxml-perl" + "sudo yum install perl perl-Time-HiRes perl-Digest-SHA perl-DBD-Pg perl-JSON-PP" ], "cmd-extra" : "-y 2>&1", "host" : "repository", @@ -9151,7 +14893,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres mkdir -m 750 -p /var/lib/postgresql/.ssh" + "sudo -u postgres mkdir -m 750 -p /var/lib/pgsql/.ssh" ], "host" : "pg-primary", "load-env" : true, @@ -9164,7 +14906,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres ssh-keygen -f /var/lib/postgresql/.ssh/id_rsa \\", + "sudo -u postgres ssh-keygen -f /var/lib/pgsql/.ssh/id_rsa \\", " -t rsa -b 4096 -N \"\"" ], "host" : "pg-primary", @@ -9180,7 +14922,7 @@ "cmd" : [ "(echo -n 'no-agent-forwarding,no-X11-forwarding,no-port-forwarding,' && \\", " echo -n 'command=\"/usr/bin/pgbackrest ${SSH_ORIGINAL_COMMAND#* }\" ' && \\", - " sudo ssh root@pg-primary cat /var/lib/postgresql/.ssh/id_rsa.pub) | \\", + " sudo ssh root@pg-primary cat /var/lib/pgsql/.ssh/id_rsa.pub) | \\", " sudo -u pgbackrest tee -a /home/pgbackrest/.ssh/authorized_keys" ], "host" : "repository", @@ -9197,7 +14939,7 @@ "(echo -n 'no-agent-forwarding,no-X11-forwarding,no-port-forwarding,' && \\", " echo -n 'command=\"/usr/bin/pgbackrest ${SSH_ORIGINAL_COMMAND#* }\" ' && \\", " sudo ssh root@repository cat /home/pgbackrest/.ssh/id_rsa.pub) | \\", - " sudo -u postgres tee -a /var/lib/postgresql/.ssh/authorized_keys" + " sudo -u postgres tee -a /var/lib/pgsql/.ssh/authorized_keys" ], "host" : "pg-primary", "load-env" : true, @@ -9264,7 +15006,7 @@ "value" : "pg-primary" }, "pg1-path" : { - "value" : "/var/lib/postgresql/9.4/demo" + "value" : "/var/lib/pgsql/9.5/data" } }, "global" : { @@ -9288,7 +15030,7 @@ "config" : [ "[demo]", "pg1-host=pg-primary", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "repo1-path=/var/lib/pgbackrest", @@ -9304,7 +15046,7 @@ "option" : { "demo" : { "pg1-path" : { - "value" : "/var/lib/postgresql/9.4/demo" + "value" : "/var/lib/pgsql/9.5/data" } }, "global" : { @@ -9328,7 +15070,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "log-level-file=detail", @@ -9397,7 +15139,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -9423,7 +15165,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -9488,7 +15230,7 @@ "config" : [ "[demo]", "pg1-host=pg-primary", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "process-max=3", @@ -9537,19 +15279,19 @@ " cipher: none", "", " db (current)", - " wal archive min/max (9.4-1): 000000080000000000000021 / 000000080000000000000022", - "", - " full backup: 20181116-140948F", - " timestamp start/stop: 2018-11-16 14:09:48 / 2018-11-16 14:10:02", - " wal start/stop: 000000080000000000000021 / 000000080000000000000021", - " database size: 25.5MB, backup size: 25.5MB", - " repository size: 3MB, repository backup size: 3MB", + " wal archive min/max (9.5-1): 000000080000000000000022 / 000000080000000000000023", "", - " full backup: 20181116-141003F", - " timestamp start/stop: 2018-11-16 14:10:03 / 2018-11-16 14:10:11", + " full backup: 20190102-061534F", + " timestamp start/stop: 2019-01-02 06:15:34 / 2019-01-02 06:15:52", " wal start/stop: 000000080000000000000022 / 000000080000000000000022", - " database size: 25.5MB, backup size: 25.5MB", - " repository size: 3MB, repository backup size: 3MB" + " database size: 27.4MB, backup size: 27.4MB", + " repository size: 3.2MB, repository backup size: 3.2MB", + "", + " full backup: 20190102-061553F", + " timestamp start/stop: 2019-01-02 06:15:53 / 2019-01-02 06:16:05", + " wal start/stop: 000000080000000000000023 / 000000080000000000000023", + " database size: 27.4MB, backup size: 27.4MB", + " repository size: 3.2MB, repository backup size: 3.2MB" ] } }, @@ -9678,9 +15420,10 @@ { "key" : { "id" : "pg2", - "image" : "pgbackrest/doc:u16-base", + "image" : "pgbackrest/doc:centos7", "name" : "pg-standby", - "os" : "u16", + "option" : "-v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run", + "os" : "centos7", "update-hosts" : true }, "type" : "host", @@ -9692,7 +15435,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo scp build:/root/pgbackrest-release-2.07/src/pgbackrest /usr/bin" + "sudo scp build:/root/pgbackrest-release-2.08/src/pgbackrest /usr/bin" ], "cmd-extra" : "2>&1", "host" : "pg-standby", @@ -9719,7 +15462,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo apt-get install libdbd-pg-perl libio-socket-ssl-perl libxml-libxml-perl" + "sudo yum install perl perl-Time-HiRes perl-Digest-SHA perl-DBD-Pg perl-JSON-PP" ], "cmd-extra" : "-y 2>&1", "host" : "pg-standby", @@ -9824,7 +15567,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres mkdir -m 750 -p /var/lib/postgresql/.ssh" + "sudo -u postgres mkdir -m 750 -p /var/lib/pgsql/.ssh" ], "host" : "pg-standby", "load-env" : true, @@ -9837,7 +15580,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres ssh-keygen -f /var/lib/postgresql/.ssh/id_rsa \\", + "sudo -u postgres ssh-keygen -f /var/lib/pgsql/.ssh/id_rsa \\", " -t rsa -b 4096 -N \"\"" ], "host" : "pg-standby", @@ -9853,7 +15596,7 @@ "cmd" : [ "(echo -n 'no-agent-forwarding,no-X11-forwarding,no-port-forwarding,' && \\", " echo -n 'command=\"/usr/bin/pgbackrest ${SSH_ORIGINAL_COMMAND#* }\" ' && \\", - " sudo ssh root@pg-standby cat /var/lib/postgresql/.ssh/id_rsa.pub) | \\", + " sudo ssh root@pg-standby cat /var/lib/pgsql/.ssh/id_rsa.pub) | \\", " sudo -u pgbackrest tee -a /home/pgbackrest/.ssh/authorized_keys" ], "host" : "repository", @@ -9870,7 +15613,7 @@ "(echo -n 'no-agent-forwarding,no-X11-forwarding,no-port-forwarding,' && \\", " echo -n 'command=\"/usr/bin/pgbackrest ${SSH_ORIGINAL_COMMAND#* }\" ' && \\", " sudo ssh root@repository cat /home/pgbackrest/.ssh/id_rsa.pub) | \\", - " sudo -u postgres tee -a /var/lib/postgresql/.ssh/authorized_keys" + " sudo -u postgres tee -a /var/lib/pgsql/.ssh/authorized_keys" ], "host" : "pg-standby", "load-env" : true, @@ -9914,7 +15657,7 @@ "option" : { "demo" : { "pg1-path" : { - "value" : "/var/lib/postgresql/9.4/demo" + "value" : "/var/lib/pgsql/9.5/data" }, "recovery-option" : { "value" : "standby_mode=on" @@ -9940,7 +15683,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "recovery-option=standby_mode=on", "", "[global]", @@ -9953,7 +15696,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_createcluster 9.4 demo" + "sudo -u postgres mkdir -p -m 700 /var/lib/pgsql/9.5/data" ], "host" : "pg-standby", "load-env" : true, @@ -9966,7 +15709,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres pgbackrest --stanza=demo --delta restore" + "sudo -u postgres pgbackrest --stanza=demo restore" ], "host" : "pg-standby", "load-env" : true, @@ -9979,7 +15722,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres cat /var/lib/postgresql/9.4/demo/recovery.conf" + "sudo -u postgres cat /var/lib/pgsql/9.5/data/recovery.conf" ], "host" : "pg-standby", "load-env" : true, @@ -9996,9 +15739,15 @@ }, { "key" : { - "file" : "/etc/postgresql/9.4/demo/postgresql.conf", + "file" : "/var/lib/pgsql/9.5/data/postgresql.conf", "host" : "pg-standby", "option" : { + "archive_command" : { + "value" : "'pgbackrest --stanza=demo archive-push %p'" + }, + "archive_mode" : { + "value" : "on" + }, "hot_standby" : { "value" : "on" }, @@ -10007,15 +15756,25 @@ }, "log_line_prefix" : { "value" : "''" + }, + "max_wal_senders" : { + "value" : "3" + }, + "wal_level" : { + "value" : "hot_standby" } } }, "type" : "cfg-postgresql", "value" : { "config" : [ + "archive_command = 'pgbackrest --stanza=demo archive-push %p'", + "archive_mode = on", "hot_standby = on", "log_filename = 'postgresql.log'", - "log_line_prefix = ''" + "log_line_prefix = ''", + "max_wal_senders = 3", + "wal_level = hot_standby" ] } }, @@ -10023,7 +15782,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + "sudo rm /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "host" : "pg-standby", "load-env" : true, @@ -10036,7 +15795,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-standby", "load-env" : true, @@ -10062,7 +15821,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + "sudo -u postgres cat /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "highlight" : { "filter" : true, @@ -10079,15 +15838,13 @@ "type" : "exe", "value" : { "output" : [ - "LOG: could not bind IPv6 socket: Cannot assign requested address", - "HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.", - "LOG: database system was interrupted; last known up at 2018-11-16 14:10:04 UTC", + "LOG: database system was interrupted; last known up at 2019-01-02 06:15:54 UTC", "LOG: entering standby mode", "LOG: restored log file \"00000008.history\" from archive", - "LOG: incomplete startup packet", - "LOG: restored log file \"000000080000000000000022\" from archive", - "LOG: redo starts at 0/22000028", - "LOG: consistent recovery state reached at 0/22000128", + "FATAL: the database system is starting up", + "LOG: restored log file \"000000080000000000000023\" from archive", + "LOG: redo starts at 0/23000028", + "LOG: consistent recovery state reached at 0/230000F8", "LOG: database system is ready to accept read only connections" ] } @@ -10169,7 +15926,7 @@ "output" : [ " pg_switch_xlog | now ", "----------------+-------------------------------", - " 0/23019A70 | 2018-11-16 14:10:54.153678+00", + " 0/2401F630 | 2019-01-02 06:17:41.653652+00", "(1 row)" ] } @@ -10198,7 +15955,7 @@ "output" : [ " message | now ", "----------------+-------------------------------", - " Important Data | 2018-11-16 14:10:56.123629+00", + " Important Data | 2019-01-02 06:17:43.647592+00", "(1 row)" ] } @@ -10224,7 +15981,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: check command begin 2.07: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-host=repository --stanza=demo", + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-host=repository --stanza=demo", "P00 INFO: switch xlog cannot be performed on the standby, all other checks passed successfully", "P00 INFO: check command end: completed successfully" ] @@ -10255,7 +16012,7 @@ "cmd" : [ "sudo -u postgres sh -c 'echo \\", " \"host replication replicator 172.17.0.6/32 md5\" \\", - " >> /etc/postgresql/9.4/demo/pg_hba.conf'" + " >> /var/lib/pgsql/9.5/data/pg_hba.conf'" ], "host" : "pg-primary", "load-env" : true, @@ -10268,7 +16025,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo reload" + "sudo systemctl reload postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -10293,7 +16050,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "recovery-option=standby_mode=on", "recovery-option=primary_conninfo=host=172.17.0.4 port=5432 user=replicator", "", @@ -10309,7 +16066,7 @@ "cmd" : [ "sudo -u postgres sh -c 'echo \\", " \"172.17.0.4:*:replication:replicator:jw8s0F4\" \\", - " >> /var/lib/postgresql/.pgpass'" + " >> /var/lib/pgsql/.pgpass'" ], "host" : "pg-standby", "load-env" : true, @@ -10322,7 +16079,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres chmod 600 /var/lib/postgresql/.pgpass" + "sudo -u postgres chmod 600 /var/lib/pgsql/.pgpass" ], "host" : "pg-standby", "load-env" : true, @@ -10335,7 +16092,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-standby", "load-env" : true, @@ -10361,7 +16118,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres cat /var/lib/postgresql/9.4/demo/recovery.conf" + "sudo -u postgres cat /var/lib/pgsql/9.5/data/recovery.conf" ], "host" : "pg-standby", "load-env" : true, @@ -10377,11 +16134,34 @@ ] } }, + { + "key" : { + "file" : "/var/lib/pgsql/9.5/data/postgresql.conf", + "host" : "pg-standby", + "option" : { + "hot_standby" : { + "value" : "on" + } + } + }, + "type" : "cfg-postgresql", + "value" : { + "config" : [ + "archive_command = 'pgbackrest --stanza=demo archive-push %p'", + "archive_mode = on", + "hot_standby = on", + "log_filename = 'postgresql.log'", + "log_line_prefix = ''", + "max_wal_senders = 3", + "wal_level = hot_standby" + ] + } + }, { "key" : { "bash-wrap" : true, "cmd" : [ - "sudo rm /var/log/postgresql/postgresql-9.4-demo.log" + "sudo rm /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "host" : "pg-standby", "load-env" : true, @@ -10394,7 +16174,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo start" + "sudo systemctl start postgresql-9.5.service" ], "host" : "pg-standby", "load-env" : true, @@ -10420,7 +16200,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres cat /var/log/postgresql/postgresql-9.4-demo.log" + "sudo -u postgres cat /var/lib/pgsql/9.5/data/pg_log/postgresql.log" ], "highlight" : { "filter" : true, @@ -10437,10 +16217,10 @@ "type" : "exe", "value" : { "output" : [ - " [filtered 9 lines of output]", + " [filtered 7 lines of output]", "LOG: database system is ready to accept read only connections", - "LOG: restored log file \"000000080000000000000023\" from archive", - "LOG: started streaming WAL from primary at 0/24000000 on timeline 8" + "LOG: restored log file \"000000080000000000000024\" from archive", + "LOG: started streaming WAL from primary at 0/25000000 on timeline 8" ] } }, @@ -10470,9 +16250,9 @@ "type" : "exe", "value" : { "output" : [ - " message | now ", - "----------------+-------------------------------", - " Important Data | 2018-11-16 14:11:08.819079+00", + " message | now ", + "----------------+-----------------------------", + " Important Data | 2019-01-02 06:18:00.2247+00", "(1 row)" ] } @@ -10499,9 +16279,9 @@ "type" : "exe", "value" : { "output" : [ - " message | now ", - "----------------+-------------------------------", - " Important Data | 2018-11-16 14:11:09.196646+00", + " message | now ", + "----------------+------------------------------", + " Important Data | 2019-01-02 06:18:00.60708+00", "(1 row)" ] } @@ -10587,7 +16367,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "", "[global]", "archive-async=y", @@ -10632,7 +16412,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "recovery-option=standby_mode=on", "recovery-option=primary_conninfo=host=172.17.0.4 port=5432 user=replicator", "", @@ -10672,7 +16452,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo restart" + "sudo systemctl restart postgresql-9.5.service" ], "host" : "pg-standby", "load-env" : true, @@ -10733,8 +16513,8 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: check command begin 2.07: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --repo1-host=repository --stanza=demo", - "P00 INFO: WAL segment 000000080000000000000029 successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.4-1/0000000800000000/000000080000000000000029-8fbb758475f45a7a34ace2950b9eca89acb7a5b7.gz'", + "P00 INFO: check command begin 2.08: --log-level-console=info --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --repo1-host=repository --stanza=demo", + "P00 INFO: WAL segment 00000008000000000000002A successfully stored in the archive at '/var/lib/pgbackrest/archive/demo/9.5-1/0000000800000000/00000008000000000000002A-1f0e73ebe55f9d2b35c6631ae68502fb2c554f41.gz'", "P00 INFO: check command end: completed successfully" ] } @@ -10761,24 +16541,24 @@ "value" : { "output" : [ "-------------------PROCESS START-------------------", - "P00 INFO: archive-push command begin 2.07: [pg_xlog/000000080000000000000024] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: push 2 WAL file(s) to archive: 000000080000000000000024...000000080000000000000025", - "P02 DETAIL: pushed WAL file 000000080000000000000025 to archive", - "P01 DETAIL: pushed WAL file 000000080000000000000024 to archive", + "P00 INFO: archive-push command begin 2.08: [pg_xlog/000000080000000000000025] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: push 4 WAL file(s) to archive: 000000080000000000000025...000000080000000000000028", + "P01 DETAIL: pushed WAL file 000000080000000000000025 to archive", + "P02 DETAIL: pushed WAL file 000000080000000000000026 to archive", + "P02 DETAIL: pushed WAL file 000000080000000000000028 to archive", + "P01 DETAIL: pushed WAL file 000000080000000000000027 to archive", "P00 INFO: archive-push command end: completed successfully", "", "-------------------PROCESS START-------------------", - "P00 INFO: archive-push command begin 2.07: [pg_xlog/000000080000000000000026] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: push 3 WAL file(s) to archive: 000000080000000000000026...000000080000000000000028", - "P01 DETAIL: pushed WAL file 000000080000000000000026 to archive", - "P02 DETAIL: pushed WAL file 000000080000000000000027 to archive", - "P01 DETAIL: pushed WAL file 000000080000000000000028 to archive", + "P00 INFO: archive-push command begin 2.08: [pg_xlog/000000080000000000000029] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: push 1 WAL file(s) to archive: 000000080000000000000029", + "P01 DETAIL: pushed WAL file 000000080000000000000029 to archive", "P00 INFO: archive-push command end: completed successfully", "", "-------------------PROCESS START-------------------", - "P00 INFO: archive-push command begin 2.07: [pg_xlog/000000080000000000000029] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: push 1 WAL file(s) to archive: 000000080000000000000029", - "P01 DETAIL: pushed WAL file 000000080000000000000029 to archive", + "P00 INFO: archive-push command begin 2.08: [pg_xlog/00000008000000000000002A] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: push 1 WAL file(s) to archive: 00000008000000000000002A", + "P01 DETAIL: pushed WAL file 00000008000000000000002A to archive", "P00 INFO: archive-push command end: completed successfully" ] } @@ -10818,29 +16598,29 @@ "value" : { "output" : [ "-------------------PROCESS START-------------------", - "P00 INFO: archive-get command begin 2.07: [000000080000000000000022, 000000080000000000000023, 000000080000000000000024, 000000080000000000000025, 000000080000000000000026, 000000080000000000000027, 000000080000000000000028, 000000080000000000000029] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000022...000000080000000000000029", - "P01 DETAIL: got WAL file 000000080000000000000022 from archive", - "P02 DETAIL: got WAL file 000000080000000000000023 from archive", - "P01 DETAIL: WAL file 000000080000000000000024 not found in archive", - "P02 DETAIL: WAL file 000000080000000000000025 not found in archive", + "P00 INFO: archive-get command begin 2.08: [000000080000000000000023, 000000080000000000000024, 000000080000000000000025, 000000080000000000000026, 000000080000000000000027, 000000080000000000000028, 000000080000000000000029, 00000008000000000000002A] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000023...00000008000000000000002A", + "P01 DETAIL: got WAL file 000000080000000000000023 from archive", + "P02 DETAIL: got WAL file 000000080000000000000024 from archive", + "P01 DETAIL: WAL file 000000080000000000000025 not found in archive", + "P02 DETAIL: WAL file 000000080000000000000026 not found in archive", " [filtered 33 lines of output]", - "P00 INFO: archive-get command begin 2.07: [000000080000000000000024, 000000080000000000000025, 000000080000000000000026, 000000080000000000000027, 000000080000000000000028, 000000080000000000000029, 00000008000000000000002A, 00000008000000000000002B] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/postgresql/9.4/demo --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", - "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000024...00000008000000000000002B", - "P02 DETAIL: got WAL file 000000080000000000000025 from archive", - "P01 DETAIL: got WAL file 000000080000000000000024 from archive", - "P01 DETAIL: got WAL file 000000080000000000000027 from archive", + "P00 INFO: archive-get command begin 2.08: [000000080000000000000025, 000000080000000000000026, 000000080000000000000027, 000000080000000000000028, 000000080000000000000029, 00000008000000000000002A, 00000008000000000000002B, 00000008000000000000002C] --archive-async --log-level-console=off --log-level-file=detail --log-level-stderr=off --no-log-timestamp --pg1-path=/var/lib/pgsql/9.5/data --process-max=2 --repo1-host=repository --spool-path=/var/spool/pgbackrest --stanza=demo", + "P00 INFO: get 8 WAL file(s) from archive: 000000080000000000000025...00000008000000000000002C", + "P01 DETAIL: got WAL file 000000080000000000000025 from archive", "P02 DETAIL: got WAL file 000000080000000000000026 from archive", - "P02 DETAIL: WAL file 000000080000000000000029 not found in archive", - "P02 DETAIL: WAL file 00000008000000000000002A not found in archive", - "P02 DETAIL: WAL file 00000008000000000000002B not found in archive", - "P01 DETAIL: got WAL file 000000080000000000000028 from archive", + "P02 DETAIL: got WAL file 000000080000000000000028 from archive", + "P01 DETAIL: got WAL file 000000080000000000000027 from archive", + "P01 DETAIL: WAL file 00000008000000000000002A not found in archive", + "P01 DETAIL: WAL file 00000008000000000000002B not found in archive", + "P01 DETAIL: WAL file 00000008000000000000002C not found in archive", + "P02 DETAIL: got WAL file 000000080000000000000029 from archive", "P00 INFO: archive-get command end: completed successfully", "", - " [filtered 5 lines of output]", - "P02 DETAIL: WAL file 00000008000000000000002C not found in archive", - "P02 DETAIL: WAL file 00000008000000000000002D not found in archive", - "P01 DETAIL: got WAL file 000000080000000000000029 from archive", + " [filtered 8 lines of output]", + "P02 DETAIL: WAL file 000000080000000000000030 not found in archive", + "P02 DETAIL: WAL file 000000080000000000000031 not found in archive", + "P01 DETAIL: got WAL file 00000008000000000000002A from archive", "P00 INFO: archive-get command end: completed successfully", "", " [filtered 24 lines of output]" @@ -10875,7 +16655,7 @@ "value" : "pg-standby" }, "pg2-path" : { - "value" : "/var/lib/postgresql/9.4/demo" + "value" : "/var/lib/pgsql/9.5/data" } }, "global" : { @@ -10890,9 +16670,9 @@ "config" : [ "[demo]", "pg1-host=pg-primary", - "pg1-path=/var/lib/postgresql/9.4/demo", + "pg1-path=/var/lib/pgsql/9.5/data", "pg2-host=pg-standby", - "pg2-path=/var/lib/postgresql/9.4/demo", + "pg2-path=/var/lib/pgsql/9.5/data", "", "[global]", "backup-standby=y", @@ -10925,17 +16705,17 @@ "value" : { "output" : [ " [filtered 2 lines of output]", - "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2018-11-16 14:11:29\": backup begins after the requested immediate checkpoint completes", - "P00 INFO: backup start archive = 00000008000000000000002B, lsn = 0/2B000028", - "P00 INFO: wait for replay on the standby to reach 0/2B000028", - "P00 INFO: replay on the standby reached 0/2B000348", - "P04 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/12009 (240KB, 12%) checksum fce9715f97ef77cd98d1b2de81c1b0dedec86555", - "P01 INFO: backup file pg-primary:/var/lib/postgresql/9.4/demo/global/pg_control (8KB, 12%) checksum 4fc90d85950af0e51f5b2c536fb4fb9472f240d0", - "P03 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/11889 (344KB, 30%) checksum 219fced6df5c08f234b951b1899f41bdb18aa831", - "P01 INFO: backup file pg-primary:/var/lib/postgresql/9.4/demo/backup_label (238B, 30%) checksum 414172d4dbfcf89d140effe8944f8f0ea4e112c8", - "P04 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/12010 (232KB, 42%) checksum 89b4f19c56cc54d901e4b092393e89fc2ffb1a67", - "P02 INFO: backup file pg-standby:/var/lib/postgresql/9.4/demo/base/12139/12007 (392KB, 62%) checksum 2bbf47457d16a9e46074c716afd66a89a7e7fb6f", - " [filtered 33 lines of output]" + "P00 INFO: execute exclusive pg_start_backup() with label \"pgBackRest backup started at 2019-01-02 06:18:25\": backup begins after the requested immediate checkpoint completes", + "P00 INFO: backup start archive = 00000008000000000000002C, lsn = 0/2C000028", + "P00 INFO: wait for replay on the standby to reach 0/2C000028", + "P00 INFO: replay on the standby reached 0/2C0000D0", + "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/global/pg_control (8KB, 0%) checksum 9977e9f13c1bf19bc18467fd4b8295bf2fdc24a1", + "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/pg_log/postgresql.log (5.5KB, 0%) checksum f752f34a0f4c7f7747ddba1fb698e76c228e4651", + "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/pg_hba.conf (4.1KB, 0%) checksum 1c0bca2f7f44d354aaaefb2c21fd1290b7379690", + "P01 INFO: backup file pg-primary:/var/lib/pgsql/9.5/data/backup_label (238B, 0%) checksum 005edfae8617d0d9541ff6aee6b44a53b72aafe8", + "P02 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12442/2608 (432KB, 20%) checksum 63f8727cb3a11a4859f37861097e37974b971d61", + "P04 INFO: backup file pg-standby:/var/lib/pgsql/9.5/data/base/12442/1249 (360KB, 37%) checksum af7b7f0bd4f4767f67425f29a1ff75b274b8299d", + " [filtered 36 lines of output]" ] } }, @@ -10943,7 +16723,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-primary", "load-env" : true, @@ -10956,7 +16736,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.4 demo stop" + "sudo systemctl stop postgresql-9.5.service" ], "host" : "pg-standby", "load-env" : true, @@ -10969,21 +16749,8 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres /usr/lib/postgresql/9.5/bin/initdb \\", - " -D /var/lib/postgresql/9.5/demo -k -A peer" - ], - "host" : "pg-primary", - "load-env" : true, - "output" : false, - "run-as-user" : null - }, - "type" : "exe" - }, - { - "key" : { - "bash-wrap" : true, - "cmd" : [ - "sudo pg_createcluster 9.5 demo" + "sudo -u postgres /usr/pgsql-9.6/bin/initdb \\", + " -D /var/lib/pgsql/9.6/data -k -A peer" ], "host" : "pg-primary", "load-env" : true, @@ -10996,14 +16763,14 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres sh -c 'cd /var/lib/postgresql && \\", - " /usr/lib/postgresql/9.5/bin/pg_upgrade \\", - " --old-bindir=/usr/lib/postgresql/9.4/bin \\", - " --new-bindir=/usr/lib/postgresql/9.5/bin \\", - " --old-datadir=/var/lib/postgresql/9.4/demo \\", - " --new-datadir=/var/lib/postgresql/9.5/demo \\", - " --old-options=\" -c config_file=/etc/postgresql/9.4/demo/postgresql.conf\" \\", - " --new-options=\" -c config_file=/etc/postgresql/9.5/demo/postgresql.conf\"'" + "sudo -u postgres sh -c 'cd /var/lib/pgsql && \\", + " /usr/pgsql-9.6/bin/pg_upgrade \\", + " --old-bindir=/usr/pgsql-9.5/bin \\", + " --new-bindir=/usr/pgsql-9.6/bin \\", + " --old-datadir=/var/lib/pgsql/9.5/data \\", + " --new-datadir=/var/lib/pgsql/9.6/data \\", + " --old-options=\" -c config_file=/var/lib/pgsql/9.5/data/postgresql.conf\" \\", + " --new-options=\" -c config_file=/var/lib/pgsql/9.6/data/postgresql.conf\"'" ], "highlight" : { "filter" : true, @@ -11020,7 +16787,7 @@ "type" : "exe", "value" : { "output" : [ - " [filtered 68 lines of output]", + " [filtered 69 lines of output]", "Creating script to delete old cluster ok", "", "Upgrade Complete", @@ -11032,7 +16799,7 @@ }, { "key" : { - "file" : "/etc/postgresql/9.5/demo/postgresql.conf", + "file" : "/var/lib/pgsql/9.6/data/postgresql.conf", "host" : "pg-primary", "option" : { "archive_command" : { @@ -11078,7 +16845,7 @@ "option" : { "demo" : { "pg1-path" : { - "value" : "/var/lib/postgresql/9.5/demo" + "value" : "/var/lib/pgsql/9.6/data" } } } @@ -11087,7 +16854,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.5/demo", + "pg1-path=/var/lib/pgsql/9.6/data", "", "[global]", "archive-async=y", @@ -11110,7 +16877,7 @@ "option" : { "demo" : { "pg1-path" : { - "value" : "/var/lib/postgresql/9.5/demo" + "value" : "/var/lib/pgsql/9.6/data" } } } @@ -11119,7 +16886,7 @@ "value" : { "config" : [ "[demo]", - "pg1-path=/var/lib/postgresql/9.5/demo", + "pg1-path=/var/lib/pgsql/9.6/data", "recovery-option=standby_mode=on", "recovery-option=primary_conninfo=host=172.17.0.4 port=5432 user=replicator", "", @@ -11144,10 +16911,10 @@ "option" : { "demo" : { "pg1-path" : { - "value" : "/var/lib/postgresql/9.5/demo" + "value" : "/var/lib/pgsql/9.6/data" }, "pg2-path" : { - "value" : "/var/lib/postgresql/9.5/demo" + "value" : "/var/lib/pgsql/9.6/data" } }, "global" : { @@ -11162,9 +16929,9 @@ "config" : [ "[demo]", "pg1-host=pg-primary", - "pg1-path=/var/lib/postgresql/9.5/demo", + "pg1-path=/var/lib/pgsql/9.6/data", "pg2-host=pg-standby", - "pg2-path=/var/lib/postgresql/9.5/demo", + "pg2-path=/var/lib/pgsql/9.6/data", "", "[global]", "backup-standby=n", @@ -11179,8 +16946,8 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo cp /etc/postgresql/9.4/demo/pg_hba.conf \\", - " /etc/postgresql/9.5/demo/pg_hba.conf" + "sudo cp /var/lib/pgsql/9.5/data/pg_hba.conf \\", + " /var/lib/pgsql/9.6/data/pg_hba.conf" ], "host" : "pg-primary", "load-env" : true, @@ -11211,7 +16978,7 @@ "type" : "exe", "value" : { "output" : [ - "P00 INFO: stanza-upgrade command begin 2.07: --no-backup-standby --log-level-console=info --log-level-stderr=off --no-log-timestamp --no-online --pg1-host=pg-primary --pg2-host=pg-standby --pg1-path=/var/lib/postgresql/9.5/demo --pg2-path=/var/lib/postgresql/9.5/demo --repo1-path=/var/lib/pgbackrest --stanza=demo", + "P00 INFO: stanza-upgrade command begin 2.08: --no-backup-standby --log-level-console=info --log-level-stderr=off --no-log-timestamp --no-online --pg1-host=pg-primary --pg2-host=pg-standby --pg1-path=/var/lib/pgsql/9.6/data --pg2-path=/var/lib/pgsql/9.6/data --repo1-path=/var/lib/pgbackrest --stanza=demo", "P00 INFO: stanza-upgrade command end: completed successfully" ] } @@ -11220,7 +16987,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.5 demo start" + "sudo systemctl start postgresql-9.6.service" ], "host" : "pg-primary", "load-env" : true, @@ -11233,7 +17000,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres pg_lsclusters" + "sudo -u postgres systemctl status postgresql-9.6.service" ], "host" : "pg-primary", "load-env" : true, @@ -11243,9 +17010,21 @@ "type" : "exe", "value" : { "output" : [ - "Ver Cluster Port Status Owner Data directory Log file", - "9.4 demo 5432 down postgres /var/lib/postgresql/9.4/demo /var/log/postgresql/postgresql-9.4-demo.log", - "9.5 demo 5432 online postgres /var/lib/postgresql/9.5/demo /var/log/postgresql/postgresql-9.5-demo.log" + "● postgresql-9.6.service - PostgreSQL 9.6 database server", + " Loaded: loaded (/usr/lib/systemd/system/postgresql-9.6.service; disabled; vendor preset: disabled)", + " Active: active (running) since Wed 2019-01-02 06:18:54 UTC; 324ms ago", + " Docs: https://www.postgresql.org/docs/9.6/static/", + " Process: 4631 ExecStartPre=/usr/pgsql-9.6/bin/postgresql96-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)", + " Main PID: 4636 (postmaster)", + " CGroup: /docker/e94a6afb794c61b66362372ba78d6e30de52abf883e2cc641e24666604d00360/system.slice/postgresql-9.6.service", + " ├─4636 /usr/pgsql-9.6/bin/postmaster -D /var/lib/pgsql/9.6/data/", + " ├─4637 postgres: logger process ", + " ├─4639 postgres: checkpointer process ", + " ├─4640 postgres: writer process ", + " ├─4641 postgres: wal writer process ", + " ├─4642 postgres: autovacuum launcher process ", + " ├─4643 postgres: archiver process ", + " └─4644 postgres: stats collector process " ] } }, @@ -11266,7 +17045,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_dropcluster 9.4 demo" + "sudo rm -rf /var/lib/pgsql/9.5/data" ], "host" : "pg-primary", "load-env" : true, @@ -11279,7 +17058,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_dropcluster 9.4 demo" + "sudo rm -rf /var/lib/pgsql/9.5/data" ], "host" : "pg-standby", "load-env" : true, @@ -11292,7 +17071,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_createcluster 9.5 demo" + "sudo -u postgres mkdir -p -m 700 /usr/pgsql-9.6/bin" ], "host" : "pg-standby", "load-env" : true, @@ -11331,7 +17110,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo -u postgres pgbackrest --stanza=demo --delta restore" + "sudo -u postgres pgbackrest --stanza=demo restore" ], "host" : "pg-standby", "load-env" : true, @@ -11342,7 +17121,7 @@ }, { "key" : { - "file" : "/etc/postgresql/9.5/demo/postgresql.conf", + "file" : "/var/lib/pgsql/9.6/data/postgresql.conf", "host" : "pg-standby", "option" : { "hot_standby" : { @@ -11361,7 +17140,7 @@ "key" : { "bash-wrap" : true, "cmd" : [ - "sudo pg_ctlcluster 9.5 demo start" + "sudo systemctl start postgresql-9.6.service" ], "host" : "pg-standby", "load-env" : true, @@ -11413,9 +17192,9 @@ "config" : [ "[demo]", "pg1-host=pg-primary", - "pg1-path=/var/lib/postgresql/9.5/demo", + "pg1-path=/var/lib/pgsql/9.6/data", "pg2-host=pg-standby", - "pg2-path=/var/lib/postgresql/9.5/demo", + "pg2-path=/var/lib/pgsql/9.6/data", "", "[global]", "backup-standby=y", diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 16a79dc39..bce197bc9 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -12,7 +12,7 @@ </intro> <release-list> - <release date="XXXX-XX-XX" version="2.08dev" title="UNDER DEVELOPMENT"> + <release date="2019-01-02" version="2.08" title="Minor Improvements and Bug Fixes"> <release-core-list> <release-bug-list> <release-item> diff --git a/lib/pgBackRest/Version.pm b/lib/pgBackRest/Version.pm index 688fabcd4..9721602ea 100644 --- a/lib/pgBackRest/Version.pm +++ b/lib/pgBackRest/Version.pm @@ -39,7 +39,7 @@ push @EXPORT, qw(projectBin projectBinSet); # 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. #----------------------------------------------------------------------------------------------------------------------------------- -use constant PROJECT_VERSION => '2.08dev'; +use constant PROJECT_VERSION => '2.08'; push @EXPORT, qw(PROJECT_VERSION); # Repository Format Number diff --git a/src/perl/embed.auto.c b/src/perl/embed.auto.c index 8ae79eefe..57357e984 100644 --- a/src/perl/embed.auto.c +++ b/src/perl/embed.auto.c @@ -21696,7 +21696,7 @@ static const EmbeddedModule embeddedModule[] = "\n" "push @EXPORT, qw(projectBin projectBinSet);\n" "\n\n\n\n\n\n" - "use constant PROJECT_VERSION => '2.08dev';\n" + "use constant PROJECT_VERSION => '2.08';\n" "push @EXPORT, qw(PROJECT_VERSION);\n" "\n\n\n\n\n\n" "use constant REPOSITORY_FORMAT => 5;\n" diff --git a/src/version.h b/src/version.h index ae3082037..a82ecba77 100644 --- a/src/version.h +++ b/src/version.h @@ -23,6 +23,6 @@ repository will be invalid unless migration functions are written. /*********************************************************************************************************************************** Software version. Currently this value is maintained in Version.pm and updated by test.pl. ***********************************************************************************************************************************/ -#define PROJECT_VERSION "2.08dev" +#define PROJECT_VERSION "2.08" #endif diff --git a/test/code-count/file-type.yaml b/test/code-count/file-type.yaml index 7ca035c26..f5af1c83b 100644 --- a/test/code-count/file-type.yaml +++ b/test/code-count/file-type.yaml @@ -119,6 +119,10 @@ doc/xml/coding.xml: class: doc/source type: xml +doc/xml/documentation.xml: + class: doc/source + type: xml + doc/xml/dtd/doc.dtd: class: doc/source type: dtd @@ -571,6 +575,14 @@ src/command/help/help.h: class: core type: c/h +src/command/info/info.c: + class: core + type: c + +src/command/info/info.h: + class: core + type: c/h + src/common/assert.h: class: core type: c/h @@ -699,6 +711,38 @@ src/common/io/handle.h: class: core type: c/h +src/common/io/http/client.c: + class: core + type: c + +src/common/io/http/client.h: + class: core + type: c/h + +src/common/io/http/common.c: + class: core + type: c + +src/common/io/http/common.h: + class: core + type: c/h + +src/common/io/http/header.c: + class: core + type: c + +src/common/io/http/header.h: + class: core + type: c/h + +src/common/io/http/query.c: + class: core + type: c + +src/common/io/http/query.h: + class: core + type: c/h + src/common/io/io.c: class: core type: c @@ -719,6 +763,14 @@ src/common/io/read.intern.h: class: core type: c/h +src/common/io/tls/client.c: + class: core + type: c + +src/common/io/tls/client.h: + class: core + type: c/h + src/common/io/write.c: class: core type: c @@ -855,6 +907,14 @@ src/common/type/variantList.h: class: core type: c/h +src/common/type/xml.c: + class: core + type: c + +src/common/type/xml.h: + class: core + type: c/h + src/common/wait.c: class: core type: c @@ -979,6 +1039,22 @@ src/info/infoArchive.h: class: core type: c/h +src/info/infoBackup.c: + class: core + type: c + +src/info/infoBackup.h: + class: core + type: c/h + +src/info/infoManifest.c: + class: core + type: c + +src/info/infoManifest.h: + class: core + type: c/h + src/info/infoPg.c: class: core type: c @@ -1199,6 +1275,22 @@ src/storage/driver/posix/storage.h: class: core type: c/h +src/storage/driver/s3/fileRead.c: + class: core + type: c + +src/storage/driver/s3/fileRead.h: + class: core + type: c/h + +src/storage/driver/s3/storage.c: + class: core + type: c + +src/storage/driver/s3/storage.h: + class: core + type: c/h + src/storage/fileRead.c: class: core type: c @@ -1539,6 +1631,14 @@ test/src/common/harnessTest.h: class: test/harness type: c/h +test/src/common/harnessTls.c: + class: test/harness + type: c + +test/src/common/harnessTls.h: + class: test/harness + type: c/h + test/src/module/archive/commonTest.c: class: test/module type: c @@ -1559,6 +1659,10 @@ test/src/module/command/controlTest.c: class: test/module type: c +test/src/module/command/infoTest.c: + class: test/module + type: c + test/src/module/common/assertOffTest.c: class: test/module type: c @@ -1595,10 +1699,18 @@ test/src/module/common/iniTest.c: class: test/module type: c +test/src/module/common/ioHttpTest.c: + class: test/module + type: c + test/src/module/common/ioTest.c: class: test/module type: c +test/src/module/common/ioTlsTest.c: + class: test/module + type: c + test/src/module/common/lockTest.c: class: test/module type: c @@ -1647,11 +1759,11 @@ test/src/module/common/typeStringTest.c: class: test/module type: c -test/src/module/common/typeVariantListTest.c: +test/src/module/common/typeVariantTest.c: class: test/module type: c -test/src/module/common/typeVariantTest.c: +test/src/module/common/typeXmlTest.c: class: test/module type: c @@ -1703,6 +1815,10 @@ test/src/module/info/infoArchiveTest.c: class: test/module type: c +test/src/module/info/infoBackupTest.c: + class: test/module + type: c + test/src/module/info/infoPgTest.c: class: test/module type: c @@ -1731,6 +1847,10 @@ test/src/module/storage/posixTest.c: class: test/module type: c +test/src/module/storage/s3Test.c: + class: test/module + type: c + test/src/test.c: class: test/harness type: c diff --git a/test/lib/pgBackRestTest/Common/CodeCountTest.pm b/test/lib/pgBackRestTest/Common/CodeCountTest.pm index eb4094d29..61a35535e 100644 --- a/test/lib/pgBackRestTest/Common/CodeCountTest.pm +++ b/test/lib/pgBackRestTest/Common/CodeCountTest.pm @@ -54,6 +54,7 @@ sub codeCountScan $strFile =~ '^doc/site/' || $strFile eq 'libc/typemap' || $strFile eq 'test/Vagrantfile' || + $strFile =~ '^test/certificate/' || $strFile =~ '^test/code-count/' || $strFile =~ '^test/coverage/' || $strFile =~ '^test/data/' || [parent: 98ba7ece2363]