Skip to content

Commit

Permalink
pg_verifybackup : 1è traduction pour la v 13β1
Browse files Browse the repository at this point in the history
  • Loading branch information
Krysztophe authored and gleu committed Jul 3, 2020
1 parent 5e19569 commit 5b9ef81
Showing 1 changed file with 152 additions and 107 deletions.
259 changes: 152 additions & 107 deletions postgresql/ref/pg_verifybackup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ PostgreSQL documentation

<refnamediv>
<refname>pg_verifybackup</refname>
<refpurpose>verify the integrity of a base backup of a
<productname>PostgreSQL</productname> cluster</refpurpose>
<refpurpose>
Vérifie l'intégrité d'une sauvegarde de base d'une instance
<productname>PostgreSQL</productname> </refpurpose>
</refnamediv>

<refsynopsisdiv>
Expand All @@ -33,109 +34,137 @@ PostgreSQL documentation
Description
</title>
<para>
<application>pg_verifybackup</application> is used to check the
integrity of a database cluster backup taken using
<command>pg_basebackup</command> against a
<literal>backup_manifest</literal> generated by the server at the time
of the backup. The backup must be stored in the "plain"
format; a "tar" format backup can be checked after extracting it.
<application>pg_verifybackup</application>
est utilisé pour contrôler l'intégrité d'une sauvegarde
d'une instance effectuée avec
<command>pg_basebackup</command>, grâce au
manifeste de sauvegarde (<literal>backup_manifest</literal>)
généré par le serveur au moment du backup.
La sauvegarde doit être stockée au format «&nbsp;plain&nbsp;&nbsp;
un format «&nbsp;tar&nbsp;:» peut être vérifié après son extraction.
</para>

<para>
It is important to note that the validation which is performed by
<application>pg_verifybackup</application> does not and can not include
every check which will be performed by a running server when attempting
to make use of the backup. Even if you use this tool, you should still
perform test restores and verify that the resulting databases work as
expected and that they appear to contain the correct data. However,
<application>pg_verifybackup</application> can detect many problems
that commonly occur due to storage problems or user error.
Notez que la validation effectuée par
<application>pg_verifybackup</application> n'effectue pas toutes
les vérifications effectuées par un serveur qui cherche à
utiliser cette sauvegarde, et ne pourrait pas le faire.
Même si vous utilisez cet outil, vous devez toujours procéder à
des tests de restauration, vérifier que les bases de données
résultantes fonctionnent comme prévu, et semblent contenir les
bonnes données.
Cependant, <application>pg_verifybackup</application>
peut détecter de nombreux problèmes courants, dus au stockage
ou une erreur de l'utilisateur.
</para>

<para>
Backup verification proceeds in four stages. First,
<literal>pg_verifybackup</literal> reads the
<literal>backup_manifest</literal> file. If that file
does not exist, cannot be read, is malformed, or fails verification
against its own internal checksum, <literal>pg_verifybackup</literal>
will terminate with a fatal error.
La vérification de sauvegarde s'effectue en quatre étapes.
Premièrement, <literal>pg_verifybackup</literal> lit le fichier
<literal>backup_manifest</literal>. S'il n'existe pas, ne peut
être lu, est malformé, ou échoue au contrôle face à sa
propre somme de contrôle interne,
<literal>pg_verifybackup</literal> se termine avec
une erreur fatale.
</para>

<para>
Second, <literal>pg_verifybackup</literal> will attempt to verify that
the data files currently stored on disk are exactly the same as the data
files which the server intended to send, with some exceptions that are
described below. Extra and missing files will be detected, with a few
exceptions. This step will ignore the presence or absence of, or any
modifications to, <literal>postgresql.auto.conf</literal>,
<literal>standby.signal</literal>, and <literal>recovery.signal</literal>,
because it is expected that these files may have been created or modified
as part of the process of taking the backup. It also won't complain about
a <literal>backup_manifest</literal> file in the target directory or
about anything inside <literal>pg_wal</literal>, even though these
files won't be listed in the backup manifest. Only files are checked;
the presence or absence of directories is not verified, except
indirectly: if a directory is missing, any files it should have contained
will necessarily also be missing.
Deuxièmement, <literal>pg_verifybackup</literal>
tentera de vérifier que les fichiers de données en place
sur le disque à ce moment sont exactement les mêmes que les
fichiers que le serveur voulait envoyer, à quelques
exceptions près listées plus bas.
Les fichiers en trop ou manquants seront détectés,
avec quelques exceptions.
Cette étape ignore la présence ou la modification de
<literal>postgresql.auto.conf</literal>,
<literal>standby.signal</literal>,
et <literal>recovery.signal</literal>,
car il est prévisible que la procédure de sauvegarde
les crée ou les modifie.
Il n'y aura pas non plus de plainte à propos d'un fichier
<literal>backup_manifest</literal> dans le répertoire cible,
ou quoi que ce soit dans <literal>pg_wal</literal>, bien que
ces fichiers ne soient pas listés dans le manifeste de sauvegarde.
Seuls les fichiers sont contrôlés&nbsp;; la présence ou l'absence
des répertoires n'est pas vérifiée, ou indirectement&nbsp;:
si un répertoire manque, tout fichier qu'il aurait dû
contenir sera forcément porté manquant.
</para>

<para>
Next, <literal>pg_verifybackup</literal> will checksum all the files,
compare the checksums against the values in the manifest, and emit errors
for any files for which the computed checksum does not match the
checksum stored in the manifest. This step is not performed for any files
which produced errors in the previous step, since they are already known
to have problems. Also, files which were ignored in the previous step are
also ignored in this step.
Ensuite, <literal>pg_verifybackup</literal> calcule les sommes
de contrôle de tous les fichiers, les compare aux valeurs
du manifeste, et émet des erreurs pour tous les fichiers où
la somme de contrôle calculée ne correspond pas à celle du
manifeste.
Cette étape n'est pas effectuée pour les fichiers qui ont
produit des erreurs à l'étape précédente, puisqu'il est déjà
connu qu'ils sont problématiques.
Les fichiers ignorés à l'étape précédente sont aussi ignorés
à celle-ci.
</para>

<para>
Finally, <literal>pg_verifybackup</literal> will use the manifest to
verify that the write-ahead log records which will be needed to recover
the backup are present and that they can be read and parsed. The
<literal>backup_manifest</literal> contains information about which
write-ahead log records will be needed, and
<literal>pg_verifybackup</literal> will use that information to
invoke <literal>pg_waldump</literal> to parse those write-ahed log
records. The <literal>--quiet</literal> flag will be used, so that
<literal>pg_waldump</literal> will only report errors, without producing
any other output. While this level of verification is sufficient to
detect obvious problems such as a missing file or one whose internal
checksums do not match, they aren't extensive enough to detect every
possible problem that might occur when attempting to recover. For
instance, a server bug that produces write-ahead log records that have
the correct checksums but specify nonsensical actions can't be detected
by this method.
Enfin, <literal>pg_verifybackup</literal>
va utiliser le manifeste pour vérifier que les enregistrements
des journaux de transaction nécessaires à la restauration de
la sauvegarde sont présents, et peuvent être lus et analysés.
Le <literal>backup_manifest</literal> contient des informations
sur quels enregistrements des journaux seront nécessaires.
<literal>pg_verifybackup</literal> les utilisent pour
invoquer <literal>pg_waldump</literal> et analyser les journaux.
L'option <literal>--quiet</literal> peut être utilisée pour
que <literal>pg_waldump</literal> ne renvoie que les erreurs,
sans générer d'autre sortie.
Bien qu'à ce niveau les vérifications soient suffisantes pour
détecter les problèmes évidents, comme des fichiers manquants
ou une somme de contrôle incohérente, elles ne sont pas
assez complètes pour détecter tous les problèmes possibles
pouvant arriver lors d'une tentative de restauration.
Par exemple, un bug du serveur générant des journaux de
transaction avec les bonnes sommes de contrôle,
mais spécifiant des opérations absurdes,
ne peut être détecté par cette méthode.
</para>

<para>
Note that if extra WAL files which are not required to recover the backup
are present, they will not be checked by this tool, although
a separate invocation of <literal>pg_waldump</literal> could be used for
that purpose. Also note that WAL verification is version-specific: you
must use the version of <literal>pg_verifybackup</literal>, and thus of
<literal>pg_waldump</literal>, which pertains to the backup being checked.
In contrast, the data file integrity checks should work with any version
of the server that generates a <literal>backup_manifest</literal> file.
</para>
Notez que s'il y a des fichiers WAL en plus,
non nécessaires pour restaurer la
sauvegarde, ils ne seront pas vérifiés par cet
outil, bien qu'un appel séparé à
<literal>pg_waldump</literal> permettent de le
faire. Notez aussi que la vérification des journaux
est spécifique à chaque version&nbsp;: vous devez
utiliser la version de <literal>pg_verifybackup</literal>,
et donc de <literal>pg_waldump</literal>,
qui correspond à la sauvegarde à vérifier.
En revanche, les tests d'intégrité des fichiers
devraient fonctionner avec toutes les versions
du serveur qui génèrent un fichier
<literal>backup_manifest</literal>.
</para>
</refsect1>

<refsect1>
<title>Options</title>

<para>
The following command-line options control the behavior.
Les options de ligne de commande suivantes
modifient le comportement de l'outil.

<variablelist>
<varlistentry>
<term><option>-e</option></term>
<term><option>--exit-on-error</option></term>
<listitem>
<para>
Exit as soon as a problem with the backup is detected. If this option
is not specified, <literal>pg_verifybackup</literal> will continue
checking the backup even after a problem has been detected, and will
report all problems detected as errors.
Sort dès qu'un problème avec la sauvegarde est
détecté. Si cette option n'est pas spécifiée,
<literal>pg_verifybackup</literal> va
continuer à vérifier la sauvegarde après la
détection d'un problème, et rapportera tous les
problèmes en tant qu'erreurs.
</para>
</listitem>
</varlistentry>
Expand All @@ -145,15 +174,19 @@ PostgreSQL documentation
<term><option>--ignore=<replaceable class="parameter">path</replaceable></option></term>
<listitem>
<para>
Ignore the specified file or directory, which should be expressed
as a relative pathname, when comparing the list of data files
actually present in the backup to those listed in the
<literal>backup_manifest</literal> file. If a directory is
specified, this option affects the entire subtree rooted at that
location. Complaints about extra files, missing files, file size
differences, or checksum mismatches will be suppressed if the
relative pathname matches the specified pathname. This option
can be specified multiple times.
Ignore le fichier ou répertoire spécifié
(à exprimer avec un chemin relatif),
lors de la comparaison des fichiers
effectivement dans la sauvegarde avec ceux
listés dans le fichier <literal>backup_manifest</literal>.
Si un répertoire est spécifié, cette option
affecte toute l'arborescence en-dessous.
Les plaintes sur des fichiers excédentaires ou
manquants, des différences de taille,
ou des incohérences de sommes de contrôle,
seront supprimées si le chemin relatif
correspond à celui spécifié.
Cette option peut être répétée plusieurs fois.
</para>
</listitem>
</varlistentry>
Expand All @@ -163,8 +196,9 @@ PostgreSQL documentation
<term><option>--manifest-path=<replaceable class="parameter">path</replaceable></option></term>
<listitem>
<para>
Use the manifest file at the specified path, rather than one located
in the root of the backup directory.
Utiliser le fichier manifeste au chemin
spécifié, plutôt que celui à la racine du
répertoire de sauvegarde.
</para>
</listitem>
</varlistentry>
Expand All @@ -174,8 +208,9 @@ PostgreSQL documentation
<term><option>--no-parse-wal</option></term>
<listitem>
<para>
Don't attempt to parse write-ahead log data that will be needed
to recover from this backup.
N'essaie pas d'analyser les journaux de
transaction nécessaires à la restauration
de la sauvegarde.
</para>
</listitem>
</varlistentry>
Expand All @@ -185,7 +220,8 @@ PostgreSQL documentation
<term><option>--quiet</option></term>
<listitem>
<para>
Don't print anything when a backup is successfully verified.
N'affiche rien si la sauvegarde est
vérifiée avec succès.
</para>
</listitem>
</varlistentry>
Expand All @@ -195,9 +231,11 @@ PostgreSQL documentation
<term><option>--skip-checksums</option></term>
<listitem>
<para>
Do not verify data file checksums. The presence or absence of
files and the sizes of those files will still be checked. This is
much faster, because the files themselves do not need to be read.
Ne vérifie pas les sommes de contrôle.
La présence ou l'absence des fichiers
et leur taille sera toujours contrôlée.
C'est beaucoup plus rapide, car il n'y a pas
besoin de lire les fichiers eux-mêmes.
</para>
</listitem>
</varlistentry>
Expand All @@ -207,25 +245,29 @@ PostgreSQL documentation
<term><option>--wal-directory=<replaceable class="parameter">path</replaceable></option></term>
<listitem>
<para>
Try to parse WAL files stored in the specified directory, rather than
in <literal>pg_wal</literal>. This may be useful if the backup is
stored in a separate location from the WAL archive.
Essaie d'analyser les fichiers WAL
stockés dans le répertoire indiqué,
plutôt que ceux dans <literal>pg_wal</literal>.
Ce peut être utile si la sauvegarde
est stockée dans un emplacement différent
des archives des journaux.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>

<para>
Other options are also available:
D'autres options sont disponibles&nbsp;:

<variablelist>
<varlistentry>
<term><option>-V</option></term>
<term><option>--version</option></term>
<listitem>
<para>
Print the <application>pg_verifybackup</application> version and exit.
Affiche la version de
<application>pg_verifybackup</application> et sort.
</para>
</listitem>
</varlistentry>
Expand All @@ -235,8 +277,9 @@ PostgreSQL documentation
<term><option>--help</option></term>
<listitem>
<para>
Show help about <application>pg_verifybackup</application> command
line arguments, and exit.
Affiche l'aide sur les arguments en ligne de commande
de <application>pg_verifybackup</application>,
puis sort.
</para>
</listitem>
</varlistentry>
Expand All @@ -247,21 +290,22 @@ PostgreSQL documentation
</refsect1>

<refsect1>
<title>Examples</title>
<title>Exemples</title>

<para>
To create a base backup of the server at <literal>mydbserver</literal> and
verify the integrity of the backup:
Pour créer une sauvegarde de base du serveur sur
<literal>mydbserver</literal>, et vérifier son intégrité&nbsp;:
<screen>
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/data</userinput>
<prompt>$</prompt> <userinput>pg_verifybackup /usr/local/pgsql/data</userinput>
</screen>
</para>

<para>
To create a base backup of the server at <literal>mydbserver</literal>, move
the manifest somewhere outside the backup directory, and verify the
backup:
Pour créer une sauvegarde de base du serveur sur
<literal>mydbserver</literal>,
déplacer le manifeste hors du répertoire de la sauvegarde,
et vérifier l'intégrité de la sauvegarde&nbsp;:
<screen>
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/backup1234</userinput>
<prompt>$</prompt> <userinput>mv /usr/local/pgsql/backup1234/backup_manifest /my/secure/location/backup_manifest.1234</userinput>
Expand All @@ -270,8 +314,9 @@ PostgreSQL documentation
</para>

<para>
To verify a backup while ignoring a file that was added manually to the
backup directory, and also skipping checksum verification:
Pour vérifier une sauvegarde, tout en ignorant un fichier
ajouté manuellement au répertoire de sauvegarde,
et aussi sauter la vérification des sommes de contrôle&nbsp;:
<screen>
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/data</userinput>
<prompt>$</prompt> <userinput>edit /usr/local/pgsql/data/note.to.self</userinput>
Expand All @@ -282,7 +327,7 @@ PostgreSQL documentation
</refsect1>

<refsect1>
<title>See Also</title>
<title>Voir aussi</title>

<simplelist type="inline">
<member><xref linkend="app-pgbasebackup"/></member>
Expand Down

0 comments on commit 5b9ef81

Please sign in to comment.