'\" t .\" Title: walmgr3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 09/28/2016 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "WALMGR3" "1" "09/28/2016" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" walmgr3 \- tool for managing WAL\-based replication for PostgreSQL\&. .SH "SYNOPSIS" .sp .nf walmgr3 command [\-\-not\-really] [options] .fi .SH "DESCRIPTION" .sp Walmgr3 is a tool to handle replication of PostgreSQL with PITR (also known as Log Shipping)\&. .sp This script allows to setup and administer the replication, it is also used by PostgreSQL to archive and restore the WAL files\&. .sp See QUICK START below to start your first log shipping in few steps\&. .sp The \fIcommand\fR is one of the Master, Slave, Common or Internal commands listed below\&. .SH "GENERAL OPTIONS" .PP \-V, \-\-version .RS 4 Print version info and exit\&. .RE .PP \-h, \-\-help .RS 4 Show this help message and exit\&. .RE .PP \-q, \-\-quiet .RS 4 Log only errors and warnings\&. .RE .PP \-v, \-\-verbose .RS 4 Log verbosely\&. .RE .PP \-d, \-\-daemon .RS 4 Run in daemon mode (go background)\&. .RE .PP \-n, \-\-not\-really .RS 4 Show what would be done without actually doing anything\&. .RE .SH "SPECIFIC OPTIONS" .PP \-\-ini .RS 4 Display sample ini file\&. .RE .PP \-\-set="\fIparam=val[,param=value]\fR" .RS 4 Override config setting .RE .PP \-\-init\-master .RS 4 Initialize Master walmgr3 configuration\&. .RE .PP \-\-init\-slave .RS 4 Initialize Slave walmgr3 configuration\&. .RE .PP \-\-config\-dir=\fIfilepath\fR .RS 4 Configuration file location for \-\-init\-X commands\&. .RE .PP \-\-slave=\fIhostname\fR .RS 4 Slave host name\&. .RE .PP \-\-pgdata=\fIpath\fR .RS 4 PostgreSQL data directory\&. .RE .PP \-\-ssh\-keygen .RS 4 Generate a SSH key pair if needed (used in Master)\&. .RE .PP \-\-ssh\-add\-key=\fIkeyfile\&.pub\fR .RS 4 Add the public key file to authorized_hosts file (used in Slave)\&. .RE .PP \-\-ssh\-remove\-key=\fIssh_key\fR .RS 4 Remove Master ssh key from authorized_hosts file (used in Slave)\&. .RE .PP \-\-primary\-conninfo=\fIconnection_string\fR .RS 4 Provide the connection string to the streaming replication Master (used in Slave)\&. .RE .PP \-\-add\-password=\fIplaintext_file\fR .RS 4 Add password for streaming replication from plain text file to \&.pgpass\&. Additional fields for password file entry will be extracted from primary\-conninfo (used in Slave)\&. .RE .PP \-\-remove\-password .RS 4 Remove \&.pgpass entry, which was used for streaming replication (used in Slave) .RE .PP \-\-synch\-standby=\fIsynchronous_standby_names\fR .RS 4 Do the same thing as command synch\-standby, but walmgr ini file is not used\&. This option can be used when walmgr ini is not available\&. It tries to guess the postgres config location, \-\-pgdata option may also be needed\&. (used in Master) .RE .SH "DAEMON OPTIONS" .PP \-r, \-\-reload .RS 4 Reload config (send SIGHUP)\&. .RE .PP \-s, \-\-stop .RS 4 Stop program safely (send SIGINT)\&. .RE .PP \-k, \-\-kill .RS 4 Kill program immediately (send SIGTERM)\&. .RE .SH "MASTER COMMANDS" .SS "setup" .sp Sets up PostgreSQL for WAL archiving, creates necessary directory structures on Slave\&. .SS "sync" .sp Copies in\-progress WAL files to Slave\&. .SS "syncdaemon" .sp Start WAL synchronization in daemon mode\&. This will start periodically synching the in\-progress WAL files to Slave\&. .sp The following configuration parameters are used to drive the syncdaemon: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBloop_delay\fR \- how long to sleep between the synchs\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBuse_xlog_functions\fR \- use record based shipping to synchronize in\-progress WAL segments\&. .RE .SS "stop" .sp Stop archiving and de\-configure PostgreSQL archiving\&. .SS "periodic" .sp Runs periodic command if configured\&. This enables to execute arbitrary commands on interval, useful for synchronizing scripts, config files, crontabs etc\&. .SS "synch\-standby" .sp Enables/disables synchronous streaming replication for given application name(s)\&. Does additional check before enabling synchronous mode\&. .SH "SLAVE COMMANDS" .SS "boot" .sp Stop WAL playback and bring the database up so it can accept queries\&. .SS "pause" .sp Pauses WAL playback\&. .SS "continue" .sp Continues previously paused WAL playback\&. .SS "createslave" .sp Creates backup from Master database using streaming replication\&. Also creates recovery\&.conf and starts slave standby\&. Backup is created with pg_basebackup and pg_receivexlog (available in 9\&.2 and up)\&. .SH "COMMON COMMANDS" .SS "listbackups" .sp Lists available backups on Slave node\&. .SS "backup" .sp Creates a new base backup from Master database\&. Will purge expired backups and WAL files on Slave if keep_backups is not specified\&. During a backup a lock file is created in Slave completed_wals directory\&. This is to prevent simultaneous backups and resulting corruption\&. If running backup is terminated, the BACKUPLOCK file may have to be removed manually\&. .sp EXPERIMENTAL: If run on Slave, creates backup from in\-recovery Slave data\&. WAL playback is paused, Slave data directory is backed up to full_backup directory and WAL playback is resumed\&. Backups are rotated as needed\&. The idea is to move the backup load away from production node\&. Usable from PostgreSQL 8\&.2 and up\&. .SS "restore [src[dst]]" .sp Restores the specified backup set to target directory\&. If specified without arguments the latest backup is \fBmoved\fR to Slave data directory (doesn\(cqt obey retention rules)\&. If src backup is specified the backup is copied (instead of moved)\&. Alternative destination directory can be specified with dst\&. .SS "cleanup" .sp Cleanup any walmgr3 files after stop\&. .SH "INTERNAL COMMANDS" .SS "xarchive " .sp On Master, archive one WAL file\&. .SS "xrestore [last restartpoint wal]" .sp On Slave, restore one WAL file\&. .SS "xlock" .sp On Master, create lock file to deny other concurrent backups\&. .SS "xrelease" .sp On Slave, remove backup lock file, allow other backup to run\&. .SS "xrotate" .sp Rotate backups by increasing backup directory suffixes\&. Note that since we also have to make room for next backup, we actually have \fBkeep_backups \- 1\fR backups available after this\&. .sp Unneeded WAL files are not removed here, it is handled by xpurgewals command instead\&. .SS "xpurgewals" .sp On Slave, remove WAL files not needed for recovery\&. .SS "xpartialsync " .sp Read \fIbytes\fR worth of data from stdin, append to the partial WAl file starting from \fIoffset\fR\&. On error it is assumed that master restarts from zero\&. .sp The resulting file is always padded to XLOG_SEGMENT_SIZE bytes to simplify recovery\&. .SH "CONFIGURATION" .SS "Common settings" .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBjob_name\fR .RS 4 .sp Optional\&. Indentifies this script, used in logging\&. Keep unique if using central logging\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBlogfile\fR .RS 4 .sp Where to log\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBuse_skylog\fR .RS 4 .sp Optional\&. If nonzero, \fIskylog\&.ini\fR is used for log configuration\&. .RE .SS "Master settings" .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBpidfile\fR .RS 4 .sp Pid file location for syncdaemon mode (if running with \-d)\&. Otherwise not required\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBmaster_db\fR .RS 4 .sp Database to connect to for pg_start_backup(), etc\&. It is not a good idea to use dbname=template if running syncdaemon in record shipping mode\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBmaster_data\fR .RS 4 .sp Master data directory location\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBmaster_config\fR .RS 4 .sp Master postgresql\&.conf file location\&. This is where archive_command gets updated\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBmaster_restart_cmd\fR .RS 4 .sp The command to restart Master database, this used after changing archive_mode parameter\&. Leave unset if you cannot afford to restart the database at setup/stop\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBslave\fR .RS 4 .sp Slave host and base directory\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBslave_config\fR .RS 4 .sp Configuration file location for the Slave walmgr3\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBcompleted_wals\fR .RS 4 .sp Slave directory where archived WAL files are copied\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBpartial_wals\fR .RS 4 .sp Slave directory where incomplete WAL files are stored\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBfull_backup\fR .RS 4 .sp Slave directory where full backups are stored\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBconfig_backup\fR .RS 4 .sp Optional\&. Slave directory where configuration file backups are stored\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBloop_delay\fR .RS 4 .sp The frequency of syncdaemon updates\&. In record shipping mode only incremental updates are sent, so smaller interval can be used\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBuse_xlog_functions\fR .RS 4 .sp Use pg_xlog functions for record based shipping (available in 8\&.2 and up)\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBcompression\fR .RS 4 .sp If nonzero, a \-z flag is added to rsync cmdline\&. It reduces network traffic at the cost of extra CPU time\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBkeep_symlinks\fR .RS 4 .sp Keep symlinks for pg_xlog and pg_log\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBhot_standby\fR .RS 4 .sp If set to 1, walmgr3 setup will set wal_level to hot_standby (PostgreSQL 9\&.0 and newer)\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBcommand_interval\fR .RS 4 .sp How ofter to run periodic command script\&. In seconds, and only evaluated at log switch times\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBperiodic_command\fR .RS 4 .sp Shell script to be executed at specified time interval\&. Can be used for synchronizing scripts, config files etc\&. .RE .SS "Sample master\&.ini" .sp .if n \{\ .RS 4 .\} .nf [walmgr] job_name = wal\-master logfile = ~/log/%(job_name)s\&.log pidfile = ~/pid/%(job_name)s\&.pid use_skylog = 1 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf master_db = dbname=my_db master_data = /var/lib/postgresql/9\&.1/main master_config = /etc/postgresql/9\&.1/main/postgresql\&.conf master_bin = /usr/lib/postgresql/9\&.1/bin .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf # set this only if you can afford database restarts during setup and stop\&. #master_restart_cmd = /etc/init\&.d/postgresql\-9\&.1 restart .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf slave = slave\-host slave_config = /var/lib/postgresql/conf/wal\-slave\&.ini .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf walmgr_data = /var/lib/postgresql/walshipping completed_wals = %(walmgr_data)s/logs\&.complete partial_wals = %(walmgr_data)s/logs\&.partial full_backup = %(walmgr_data)s/data\&.master config_backup = %(walmgr_data)s/config\&.backup .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf # syncdaemon update frequency loop_delay = 10\&.0 # use record based shipping available since 8\&.2 use_xlog_functions = 0 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf # pass \-z to rsync, useful on low bandwidth links compression = 0 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf # keep symlinks for pg_xlog and pg_log keep_symlinks = 1 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf # tell walmgr to set wal_level to hot_standby during setup #hot_standby = 1 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf # periodic sync #command_interval = 600 #periodic_command = /var/lib/postgresql/walshipping/periodic\&.sh .fi .if n \{\ .RE .\} .SS "Slave settings" .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBslave_data\fR .RS 4 .sp PostgreSQL data directory for the Slave\&. This is where the restored backup is copied/moved\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBslave_bin\fR .RS 4 .sp Specifies the location of PostgreSQL binaries (pg_controldata, etc)\&. Needed if they are not already in the PATH\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBslave_stop_cmd\fR .RS 4 .sp Script to stop PostgreSQL on Slave\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBslave_start_cmd\fR .RS 4 .sp Script to start PostgreSQL on Slave\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBslave_config_dir\fR .RS 4 .sp Directory for PostgreSQL configuration files\&. If specified, walmgr3 restore attempts to restore configuration files from config_backup directory\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBslave_pg_xlog\fR .RS 4 .sp Set to the directory on the Slave where pg_xlog files get written to\&. On a restore to the Slave walmgr3 will create a symbolic link from data/pg_xlog to this location\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBcompleted_wals\fR .RS 4 .sp Directory where complete WAL files are stored\&. Also miscellaneous control files are created in this directory (BACKUPLOCK, STOP, PAUSE, etc\&.)\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBpartial_wals\fR .RS 4 .sp Directory where partial WAL files are stored\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBfull_backup\fR .RS 4 .sp Directory where full backups are stored\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBconfig_backup\fR .RS 4 .sp Optional\&. Slave directory where configuration file backups are stored\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBbackup_datadir\fR .RS 4 .sp Set backup_datadir to \fIno\fR to prevent walmgr3 from making a backup of the data directory when restoring to the Slave\&. This defaults to \fIyes\fR\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBkeep_backups\fR .RS 4 .sp Number of backups to keep\&. Also all WAL files needed to bring earliest backup up to date are kept\&. The backups are rotated before new backup is started, so at one point there is actually one less backup available\&. .sp It probably doesn\(cqt make sense to specify keep_backups if periodic backups are not performed \- the WAL files will pile up quickly\&. .sp Backups will be named data\&.master, data\&.master\&.0, data\&.master\&.1 etc\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBarchive_command\fR .RS 4 .sp Script to execute before rotating away the oldest backup\&. If it fails backups will not be rotated\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBprimary_conninfo\fR .RS 4 .sp Primary database connection string for hot standby \- enabling this will cause the Slave to be started in hot standby mode\&. .RE .SS "Sample slave\&.ini" .sp .if n \{\ .RS 4 .\} .nf [walmgr] job_name = wal\-slave logfile = ~/log/%(job_name)s\&.log use_skylog = 1 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf slave_data = /var/lib/postgresql/9\&.1/main slave_bin = /usr/lib/postgresql/9\&.1/bin slave_stop_cmd = /etc/init\&.d/postgresql\-9\&.1 stop slave_start_cmd = /etc/init\&.d/postgresql\-9\&.1 start slave_config_dir = /etc/postgresql/9\&.1/main .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf # alternative pg_xlog directory for slave, symlinked to pg_xlog on restore #slave_pg_xlog = /vol2/pg_xlog .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf walmgr_data = ~/walshipping completed_wals = %(walmgr_data)s/logs\&.complete partial_wals = %(walmgr_data)s/logs\&.partial full_backup = %(walmgr_data)s/data\&.master config_backup = %(walmgr_data)s/config\&.backup .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf backup_datadir = yes keep_backups = 0 archive_command = .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf # primary database connect string for hot standby \-\- enabling # this will cause the slave to be started in hot standby mode\&. #primary_conninfo = host=master port=5432 user=postgres .fi .if n \{\ .RE .\} .SH "EXIT STATUS" .PP 0 .RS 4 Successful program execution\&. .RE .SH "ENVIRONMENT" .sp PostgreSQL environment variables can be used\&. .SH "QUICK START" .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Set up passwordless ssh\-key on Master and write configuration file .sp .if n \{\ .RS 4 .\} .nf master$ walmgr3 \-\-ssh\-keygen \-\-init\-master \-\-slave .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} Set up passwordless ssh authentication from Master to Slave and write configuration file on Slave .sp .if n \{\ .RS 4 .\} .nf slave$ walmgr3 \-\-init\-slave \-\-ssh\-add\-key=/tmp/id_rsa\&.pub .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} Logging setup on Master and Slave .sp .if n \{\ .RS 4 .\} .nf master$ cp skylog\&.ini ~postgres/ slave$ cp skylog\&.ini ~postgres/ .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 4.\h'+01'\c .\} .el \{\ .sp -1 .IP " 4." 4.2 .\} Start archival process and create a base backup .sp .if n \{\ .RS 4 .\} .nf master$ walmgr3 /var/lib/postgresql/conf/wal\-master\&.ini setup master$ walmgr3 /var/lib/postgresql/conf/wal\-master\&.ini backup .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf CAUTION: starting from PostgreSQL 8\&.3 the archiving is enabled by setting archive_mode GUC to on\&. However changing this parameter requires the server to be restarted\&. .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 5.\h'+01'\c .\} .el \{\ .sp -1 .IP " 5." 4.2 .\} Prepare postgresql\&.conf and pg_hba\&.conf on Slave and start replay .sp .if n \{\ .RS 4 .\} .nf slave$ walmgr3 /var/lib/postgresql/conf/wal\-slave\&.ini restore .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf For debian based distributions the standard configuration files are located in /etc/postgresql/x\&.x/main directory\&. If another scheme is used the postgresql\&.conf and pg_hba\&.conf should be copied to slave full_backup directory\&. Make sure to disable archive_command in slave config\&. .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf \*(Aqwalmgr3 restore\*(Aq moves data in place, creates recovery\&.conf and starts postmaster in recovery mode\&. .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 6.\h'+01'\c .\} .el \{\ .sp -1 .IP " 6." 4.2 .\} In\-progress WAL segments can be backup by command: .sp .if n \{\ .RS 4 .\} .nf master$ walmgr3 /var/lib/postgresql/conf/wal\-master\&.ini sync .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 7.\h'+01'\c .\} .el \{\ .sp -1 .IP " 7." 4.2 .\} If need to stop replay on Slave and boot into normal mode, do: .sp .if n \{\ .RS 4 .\} .nf slave$ walmgr3 /var/lib/postgresql/conf/wal\-slave\&.ini boot .fi .if n \{\ .RE .\} .RE