Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit dbc60c5

Browse files
committed
Rename pg_validatebackup to pg_verifybackup.
Also, use "verify" rather than "validate" to refer to the process being undertaken here. Per discussion, that is a more appropriate term. Discussion: https://www.postgresql.org/message-id/172c9d9b-1d0a-1b94-1456-376b1e017322@2ndquadrant.com Discussion: http://postgr.es/m/CA+TgmobLgMh6p8FmLbj_rv9Uhd7tPrLnAyLgGd2SoSj=qD-bVg@mail.gmail.com
1 parent 26640c4 commit dbc60c5

18 files changed

+142
-142
lines changed

doc/src/sgml/ref/allfiles.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Complete list of usable sgml source files in this directory.
211211
<!ENTITY pgResetwal SYSTEM "pg_resetwal.sgml">
212212
<!ENTITY pgRestore SYSTEM "pg_restore.sgml">
213213
<!ENTITY pgRewind SYSTEM "pg_rewind.sgml">
214-
<!ENTITY pgValidateBackup SYSTEM "pg_validatebackup.sgml">
214+
<!ENTITY pgVerifyBackup SYSTEM "pg_verifybackup.sgml">
215215
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
216216
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
217217
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">

doc/src/sgml/ref/pg_basebackup.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ PostgreSQL documentation
568568
<para>
569569
Disables generation of a backup manifest. If this option is not
570570
specified, the server will generate and send a backup manifest
571-
which can be verified using <xref linkend="app-pgvalidatebackup" />.
571+
which can be verified using <xref linkend="app-pgverifybackup" />.
572572
The manifest is a list of every file present in the backup with the
573573
exception of any WAL files that may be included. It also stores the
574574
size, last modification time, and an optional checksum for each file.
@@ -620,7 +620,7 @@ PostgreSQL documentation
620620
verified not to have been modified since the backup was taken.
621621
</para>
622622
<para>
623-
<xref linkend="app-pgvalidatebackup" /> can be used to check the
623+
<xref linkend="app-pgverifybackup" /> can be used to check the
624624
integrity of a backup against the backup manifest.
625625
</para>
626626
</listitem>

doc/src/sgml/ref/pg_validatebackup.sgml renamed to doc/src/sgml/ref/pg_verifybackup.sgml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<!--
2-
doc/src/sgml/ref/pg_validatebackup.sgml
2+
doc/src/sgml/ref/pg_verifybackup.sgml
33
PostgreSQL documentation
44
-->
55

6-
<refentry id="app-pgvalidatebackup">
7-
<indexterm zone="app-pgvalidatebackup">
8-
<primary>pg_validatebackup</primary>
6+
<refentry id="app-pgverifybackup">
7+
<indexterm zone="app-pgverifybackup">
8+
<primary>pg_verifybackup</primary>
99
</indexterm>
1010

1111
<refmeta>
12-
<refentrytitle>pg_validatebackup</refentrytitle>
12+
<refentrytitle>pg_verifybackup</refentrytitle>
1313
<manvolnum>1</manvolnum>
1414
<refmiscinfo>Application</refmiscinfo>
1515
</refmeta>
1616

1717
<refnamediv>
18-
<refname>pg_validatebackup</refname>
18+
<refname>pg_verifybackup</refname>
1919
<refpurpose>verify the integrity of a base backup of a
2020
<productname>PostgreSQL</productname> cluster</refpurpose>
2121
</refnamediv>
2222

2323
<refsynopsisdiv>
2424
<cmdsynopsis>
25-
<command>pg_validatebackup</command>
25+
<command>pg_verifybackup</command>
2626
<arg rep="repeat"><replaceable>option</replaceable></arg>
2727
</cmdsynopsis>
2828
</refsynopsisdiv>
@@ -32,7 +32,7 @@ PostgreSQL documentation
3232
Description
3333
</title>
3434
<para>
35-
<application>pg_validatebackup</application> is used to check the
35+
<application>pg_verifybackup</application> is used to check the
3636
integrity of a database cluster backup taken using
3737
<command>pg_basebackup</command> against a
3838
<literal>backup_manifest</literal> generated by the server at the time
@@ -41,27 +41,27 @@ PostgreSQL documentation
4141
</para>
4242

4343
<para>
44-
It is important to note that the validation which is performed by
45-
<application>pg_validatebackup</application> does not and can not include
44+
It is important to note that that the validation which is performed by
45+
<application>pg_verifybackup</application> does not and can not include
4646
every check which will be performed by a running server when attempting
4747
to make use of the backup. Even if you use this tool, you should still
4848
perform test restores and verify that the resulting databases work as
4949
expected and that they appear to contain the correct data. However,
50-
<application>pg_validatebackup</application> can detect many problems
50+
<application>pg_verifybackup</application> can detect many problems
5151
that commonly occur due to storage problems or user error.
5252
</para>
5353

5454
<para>
5555
Backup verification proceeds in four stages. First,
56-
<literal>pg_validatebackup</literal> reads the
56+
<literal>pg_verifybackup</literal> reads the
5757
<literal>backup_manifest</literal> file. If that file
5858
does not exist, cannot be read, is malformed, or fails verification
59-
against its own internal checksum, <literal>pg_validatebackup</literal>
59+
against its own internal checksum, <literal>pg_verifybackup</literal>
6060
will terminate with a fatal error.
6161
</para>
6262

6363
<para>
64-
Second, <literal>pg_validatebackup</literal> will attempt to verify that
64+
Second, <literal>pg_verifybackup</literal> will attempt to verify that
6565
the data files currently stored on disk are exactly the same as the data
6666
files which the server intended to send, with some exceptions that are
6767
described below. Extra and missing files will be detected, with a few
@@ -79,7 +79,7 @@ PostgreSQL documentation
7979
</para>
8080

8181
<para>
82-
Next, <literal>pg_validatebackup</literal> will checksum all the files,
82+
Next, <literal>pg_verifybackup</literal> will checksum all the files,
8383
compare the checksums against the values in the manifest, and emit errors
8484
for any files for which the computed checksum does not match the
8585
checksum stored in the manifest. This step is not performed for any files
@@ -89,12 +89,12 @@ PostgreSQL documentation
8989
</para>
9090

9191
<para>
92-
Finally, <literal>pg_validatebackup</literal> will use the manifest to
92+
Finally, <literal>pg_verifybackup</literal> will use the manifest to
9393
verify that the write-ahead log records which will be needed to recover
9494
the backup are present and that they can be read and parsed. The
9595
<literal>backup_manifest</literal> contains information about which
9696
write-ahead log records will be needed, and
97-
<literal>pg_validatebackup</literal> will use that information to
97+
<literal>pg_verifybackup</literal> will use that information to
9898
invoke <literal>pg_waldump</literal> to parse those write-ahed log
9999
records. The <literal>--quiet</literal> flag will be used, so that
100100
<literal>pg_waldump</literal> will only report errors, without producing
@@ -112,7 +112,7 @@ PostgreSQL documentation
112112
are present, they will not be checked by this tool, although
113113
a separate invocation of <literal>pg_waldump</literal> could be used for
114114
that purpose. Also note that WAL verification is version-specific: you
115-
must use the version of <literal>pg_validatebackup</literal>, and thus of
115+
must use the version of <literal>pg_verifybackup</literal>, and thus of
116116
<literal>pg_waldump</literal>, which pertains to the backup being checked.
117117
In contrast, the data file integrity checks should work with any version
118118
of the server that generates a <literal>backup_manifest</literal> file.
@@ -184,7 +184,7 @@ PostgreSQL documentation
184184
<term><option>--quiet</option></term>
185185
<listitem>
186186
<para>
187-
Don't print anything when a backup is successfully validated.
187+
Don't print anything when a backup is successfully verified.
188188
</para>
189189
</listitem>
190190
</varlistentry>
@@ -194,7 +194,7 @@ PostgreSQL documentation
194194
<term><option>--skip-checksums</option></term>
195195
<listitem>
196196
<para>
197-
Do not validate data file checksums. The presence or absence of
197+
Do not verify data file checksums. The presence or absence of
198198
files and the sizes of those files will still be checked. This is
199199
much faster, because the files themselves do not need to be read.
200200
</para>
@@ -224,7 +224,7 @@ PostgreSQL documentation
224224
<term><option>--version</option></term>
225225
<listitem>
226226
<para>
227-
Print the <application>pg_validatebackup</application> version and exit.
227+
Print the <application>pg_verifybackup</application> version and exit.
228228
</para>
229229
</listitem>
230230
</varlistentry>
@@ -234,7 +234,7 @@ PostgreSQL documentation
234234
<term><option>--help</option></term>
235235
<listitem>
236236
<para>
237-
Show help about <application>pg_validatebackup</application> command
237+
Show help about <application>pg_verifybackup</application> command
238238
line arguments, and exit.
239239
</para>
240240
</listitem>
@@ -250,31 +250,31 @@ PostgreSQL documentation
250250

251251
<para>
252252
To create a base backup of the server at <literal>mydbserver</literal> and
253-
validate the integrity of the backup:
253+
verify the integrity of the backup:
254254
<screen>
255255
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/data</userinput>
256-
<prompt>$</prompt> <userinput>pg_validatebackup /usr/local/pgsql/data</userinput>
256+
<prompt>$</prompt> <userinput>pg_verifybackup /usr/local/pgsql/data</userinput>
257257
</screen>
258258
</para>
259259

260260
<para>
261261
To create a base backup of the server at <literal>mydbserver</literal>, move
262-
the manifest somewhere outside the backup directory, and validate the
262+
the manifest somewhere outside the backup directory, and verify the
263263
backup:
264264
<screen>
265265
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/backup1234</userinput>
266266
<prompt>$</prompt> <userinput>mv /usr/local/pgsql/backup1234/backup_manifest /my/secure/location/backup_manifest.1234</userinput>
267-
<prompt>$</prompt> <userinput>pg_validatebackup -m /my/secure/location/backup_manifest.1234 /usr/local/pgsql/backup1234</userinput>
267+
<prompt>$</prompt> <userinput>pg_verifybackup -m /my/secure/location/backup_manifest.1234 /usr/local/pgsql/backup1234</userinput>
268268
</screen>
269269
</para>
270270

271271
<para>
272-
To validate a backup while ignoring a file that was added manually to the
272+
To verify a backup while ignoring a file that was added manually to the
273273
backup directory, and also skipping checksum verification:
274274
<screen>
275275
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/data</userinput>
276276
<prompt>$</prompt> <userinput>edit /usr/local/pgsql/data/note.to.self</userinput>
277-
<prompt>$</prompt> <userinput>pg_validatebackup --ignore=note.to.self --skip-checksums /usr/local/pgsql/data</userinput>
277+
<prompt>$</prompt> <userinput>pg_verifybackup --ignore=note.to.self --skip-checksums /usr/local/pgsql/data</userinput>
278278
</screen>
279279
</para>
280280

doc/src/sgml/reference.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
&pgReceivewal;
256256
&pgRecvlogical;
257257
&pgRestore;
258-
&pgValidateBackup;
258+
&pgVerifyBackup;
259259
&psqlRef;
260260
&reindexdb;
261261
&vacuumdb;

src/bin/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ SUBDIRS = \
2727
pg_test_fsync \
2828
pg_test_timing \
2929
pg_upgrade \
30-
pg_validatebackup \
30+
pg_verifybackup \
3131
pg_waldump \
3232
pgbench \
3333
psql \

src/bin/pg_validatebackup/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/bin/pg_verifybackup/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/pg_verifybackup
2+
/tmp_check/

src/bin/pg_validatebackup/Makefile renamed to src/bin/pg_verifybackup/Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# src/bin/pg_validatebackup/Makefile
1+
# src/bin/pg_verifybackup/Makefile
22

3-
PGFILEDESC = "pg_validatebackup - validate a backup against a backup manifest"
3+
PGFILEDESC = "pg_verifybackup - verify a backup against using a backup manifest"
44
PGAPPICON = win32
55

6-
subdir = src/bin/pg_validatebackup
6+
subdir = src/bin/pg_verifybackup
77
top_builddir = ../../..
88
include $(top_builddir)/src/Makefile.global
99

@@ -13,24 +13,24 @@ LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
1313
OBJS = \
1414
$(WIN32RES) \
1515
parse_manifest.o \
16-
pg_validatebackup.o
16+
pg_verifybackup.o
1717

18-
all: pg_validatebackup
18+
all: pg_verifybackup
1919

20-
pg_validatebackup: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
20+
pg_verifybackup: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
2121
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
2222

2323
install: all installdirs
24-
$(INSTALL_PROGRAM) pg_validatebackup$(X) '$(DESTDIR)$(bindir)/pg_validatebackup$(X)'
24+
$(INSTALL_PROGRAM) pg_verifybackup$(X) '$(DESTDIR)$(bindir)/pg_verifybackup$(X)'
2525

2626
installdirs:
2727
$(MKDIR_P) '$(DESTDIR)$(bindir)'
2828

2929
uninstall:
30-
rm -f '$(DESTDIR)$(bindir)/pg_validatebackup$(X)'
30+
rm -f '$(DESTDIR)$(bindir)/pg_verifybackup$(X)'
3131

3232
clean distclean maintainer-clean:
33-
rm -f pg_validatebackup$(X) $(OBJS)
33+
rm -f pg_verifybackup$(X) $(OBJS)
3434
rm -rf tmp_check
3535

3636
check:

src/bin/pg_validatebackup/parse_manifest.c renamed to src/bin/pg_verifybackup/parse_manifest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* src/bin/pg_validatebackup/parse_manifest.c
9+
* src/bin/pg_verifybackup/parse_manifest.c
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -151,7 +151,7 @@ json_parse_manifest(JsonManifestParseContext *context, char *buffer,
151151
if (parse.state != JM_EXPECT_EOF)
152152
json_manifest_parse_failure(context, "manifest ended unexpectedly");
153153

154-
/* Validate the checksum. */
154+
/* Verify the manifest checksum. */
155155
verify_manifest_checksum(&parse, buffer, size);
156156
}
157157

src/bin/pg_validatebackup/parse_manifest.h renamed to src/bin/pg_verifybackup/parse_manifest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* src/bin/pg_validatebackup/parse_manifest.h
9+
* src/bin/pg_verifybackup/parse_manifest.h
1010
*
1111
*-------------------------------------------------------------------------
1212
*/

0 commit comments

Comments
 (0)