forked from dalibo/pitrery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restore_wal.1
126 lines (103 loc) · 4.01 KB
/
restore_wal.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH RESTORE_WAL 1 "October 11, 2015"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
restore_wal \- retrieve WAL segment files during database recovery
.SH SYNOPSIS
.B restore_wal
.RI [ options ]
.I walfile destination
.SH DESCRIPTION
The \fBrestore_wal\fP script is the default action that is used for the
\fBpostgres\fP(1) \fIrestore_command\fP in \fIrecovery.conf\fP by
\fBpitrery\ restore\fP. It is responsible for retrieving the archived WAL
segments that are needed during the recovery operation.
.SH OPTIONS
The following options are available:
.TP
.BI "\-C " conf
Use option settings from the specified configuration file instead of the
default \fIpitrery.conf\fP file. This may be a full path to the file to use,
or the name of a configuration file in \fI/etc/pitrery\fP.
.TP
.BI "\-a " [[user@]host:]/dir
The directory on the (local or remote) host where WAL segment files will be
stored. This will override the \fBARCHIVE_DIR\fP option from the
configuration file. When the host name is omited, the archiving is local.
.TP
.B \-X
Retrieve WAL segment files that are not compressed. This will override the
\fBARCHIVE_COMPRESS\fP option from the configuration file (forcing it to be
"no").
.TP
.BI "\-c " command
The command to use for uncompressing WAL segment files. This will override
the \fBARCHIVE_UNCOMPRESS_BIN\fP option from the configuration file.
.TP
.BI "\-s " suffix
The compressed file suffix to expect (e.g., gz, bz2, xz). This will override
the \fBARCHIVE_COMPRESS_SUFFIX\fP option from the configuration file.
.TP
.B \-S
Send messages to the \fBsyslog\fP(3) instead of \fBstdio\fP(3). This will
override the \fBSYSLOG\fP option from the configuration file (forcing it to
be "yes"). Messages sent to \fIstdout\fP will be logged with \fBLOG_INFO\fP
priority, while messages to \fIstderr\fP will be logged with \fBLOG_ERR\fP
priority.
.TP
.BI "\-f " facility
Specify the \fBsyslog\fP facility to use. This will override the
\fBSYSLOG_FACILITY\fP option from the configuration file. Defaults to use
\fBlocal0\fP if not otherwise explicitly set. See \fBlogger\fP(1) for details
of the valid facility strings that can be used here.
.TP
.BI "\-t " ident
An identifier to prefix \fBsyslog\fP output with. This will override the
\fBSYSLOG_IDENT\fP option from the configuration file. Defaults to use the
string "postgres" if not otherwise explicitly set.
.TP
.B \-T
Timestamp the log messages. This will override the \fBLOG_TIMESTAMP\fP option
from the configuration file (forcing it to be "yes").
.TP
.B \-?
Output the brief help summarising the above options.
.TP
.I walfile
The name of the WAL segment to restore, relative to the configured
archive directory. It must be set to \fB%f\fP inside
\fIrecovery.conf\fP when configuring restore_command.
.TP
.I destination
The target path where to restore the file. It must be set to \fB%p\fP
inside \fIrecovery.conf\fP when configuring restore_command.
.SH FILES
.TP
.I /etc/pitrery/pitrery.conf
The default \fBrestore_wal\fP configuration file if not explicitly specified.
.TP
.I $PGATA/recovery.conf
The file created in the \fBPGDATA\fP directory by \fBpitrery\ restore\fP which
configures if and/or how to use \fBrestore_wal\fP to retrieve any needed WAL
segment files during database recovery.
.SH SEE ALSO
.BR archive_wal (1),
.BR pitrery (1).
.SH AUTHOR
.B restore_wal
was written by Nicolas Thauvin <[email protected]>.
This man page was written by Ron <[email protected]>.