%%
%%
-\section*{The Bacula Console Restore Command}
+\section*{La commande restore de la console Bacula}
\label{_ChapterStart13}
-\index[general]{Command!Bacula Console Restore }
-\index[general]{Bacula Console Restore Command }
-\addcontentsline{toc}{section}{Bacula Console Restore Command}
-
-\subsection*{General}
-\index[general]{General }
-\addcontentsline{toc}{subsection}{General}
-
-Below, we will discuss restoring files with the Console {\bf restore} command,
-which is the recommended way of doing it. However, there is a standalone
-program named {\bf bextract}, which also permits restoring files. For more
-information on this program, please see the
-\ilink{Bacula Utility Programs}{bextract} chapter of this manual.
-You will also want to look at the {\bf bls} program in the same chapter, which
-allows you to list the contents of your Volumes. Finally, if you have an old
-Volume that is no longer in the catalog, you can restore the catalog entries
-using the program named {\bf bscan}, documented in the same
-\ilink{Bacula Utility Programs}{bextract} chapter.
-
-In general, to restore a file or a set of files, you must run a {\bf restore}
-job. That is a job with {\bf Type = Restore}. As a consequence, you will need
-a predefined {\bf restore} job in your {\bf bacula-dir.conf} (Director's
-config) file. The exact parameters (Client, FileSet, ...) that you define are
-not important as you can either modify them manually before running the job or
-if you use the {\bf restore} command, explained below, Bacula will
-automatically set them for you. In fact, you can no longer simply run a restore
-job. You must use the restore command.
-
-Since Bacula is a network backup program, you must be aware that when you
-restore files, it is up to you to ensure that you or Bacula have selected the
-correct Client and the correct hard disk location for restoring those files.
-{\bf Bacula} will quite willingly backup client A, and restore it by sending
-the files to a different directory on client B. Normally, you will want to
-avoid this, but assuming the operating systems are not too different in their
-file structures, this should work perfectly well, if so desired.
-By default, Bacula will restore data to the same Client that was backed
-up, and those data will be restored not to the original places but to
-{\bf /tmp/bacula-restores}. You may modify any of these defaults when the
-restore command prompts you to run the job by selecting the {\bf mod}
-option.
+\index[general]{Commande!restore de la console Bacula}
+\index[general]{La commande restore de la console Bacula}
+\addcontentsline{toc}{section}{La commande restore de la console Bacula}
+
+\subsection*{G\'en\'eralit\'es}
+\index[general]{G\'en\'eralit\'es}
+\addcontentsline{toc}{subsection}{G\'en\'eralit\'es}
+
+Nous allons maintenant d\'ecrire la restauration de fichiers avec la commande
+{\bf restore} de la Console, qui est le mode de restauration recommand\'e.
+Il existe cependant un programme ind\'ependant nomm\'e {\bf bextract}, qui permet
+lui aussi de restaurer des fichiers. Pour plus d'informations sur ce
+programme, consultez le chapitre \ilink{Programmes utilitaires Bacula}{bextract}
+de ce manuel. Vous y trouverez aussi des informations sur le programme {\bf bls}
+qui sert \`a produire une liste du contenu de vos volumes, et sur le programme
+{\bf bscan} qui vous sera utilie si vous voulez restaurer les enregistrements
+du catalogue relatifs \`a un ancien volume qui n'y figure plus.
+
+En g\'en\'eral, pour restaurer un fichier ou un ensemble de fichiers, vous devez
+ex\'ecuter un job de type {\bf restore}, par cons\'equent, vous devez pr\'ed\'efinir
+un tel job dans le fichier de configuration de votre Director. Les param\`etres
+(Client, FileSet,...) que vous d\'efinissez ici ne sont pas importants,
+Bacula les ajustera automatiquement lors de l'utilisation de {\bf restore}.
+
+Bacula \'etant un programme r\'eseau, il vous appartient de vous assurer que
+vous avez s\'electionn\'e le bon client et le bon disque dur pour recevoir la
+restauration. Bacula peut sauvegarder le client A et restaurer ses fichiers
+sur le client B, pourvu que leurs syst\`emes ne soient pas trop diff\'erents
+au niveau de leurs structures de fichiers. Par d\'efaut, Bacula restaure les
+donn\'ees sur leur client d'origine, mais pas \`a leur emplacement d'origine :
+dans le r\'epertoire {\bf /tmp/bacula-restores}. Vous pouvez modifier ces
+valeurs par d\'efaut lorsque la commande {\bf restore} vous demande confirmation
+d'ex\'ecution du job en choisissant l'option {\bf mod}.
\label{Example1}
-\subsection*{The Restore Command}
-\index[general]{Command!Restore }
-\index[general]{Restore Command }
-\addcontentsline{toc}{subsection}{Restore Command}
-
-Since Bacula maintains a catalog of your files and on which Volumes (disk or
-tape), they are stored, it can do most of the bookkeeping work, allowing you
-simply to specify what kind of restore you want (current, before a particular
-date), and what files to restore. Bacula will then do the rest.
-
-This is accomplished using the {\bf restore} command in the Console. First you
-select the kind of restore you want, then the JobIds are selected,
-the File records for those Jobs are placed in an internal Bacula directory
-tree, and the restore enters a file selection mode that allows you to
-interactively walk up and down the file tree selecting individual files to be
-restored. This mode is somewhat similar to the standard Unix {\bf restore}
-program's interactive file selection mode.
-
-If your Files have been pruned, the {\bf restore} command will be unable
-to find any files to restore. See below for more details on this.
-
-Within the Console program, after entering the {\bf restore} command, you are
-presented with the following selection prompt:
+\subsection*{La commande Restore}
+\index[general]{Commande!Restore }
+\index[general]{La commande Restore}
+\addcontentsline{toc}{subsection}{La commande Restore}
+Puisque Bacula maintient un catalogue des fichiers sauvegard\'es, et des volumes
+o\`u ils sont stock\'es, il peut se charger de la majeure partie du travail
+d'intendance. Ainsi, il vous suffit de sp\'ecifier le type de restauration que
+vous souhaitez (d'apr\`es la derni\`ere sauvegarde, d'apr\`es la derni\`ere sauvegarde
+ant\'erieure \`a une date sp\'ecifi\'ee...), et quels fichiers vous voulez restaurer.
+
+Ceci est r\'ealis\'e par la commande {\bf restore} de la Console. Vous s\'electionnez
+d'abord le type de restauration souhait\'ee ce qui entra\^ine la s\'election des
+JobIds requis et la construction d'une arborescence interne \`a Bacula contenant
+les enregistrements de fichiers des JobIds s\'electionn\'es. A ce stade, le
+processus de restauration entre dans un mode o\`u vous pouvez naviguer
+interactivement dans l'arborescence des fichiers disponibles pour restauration
+et s\'electionner ceux que vous voulez restaurer. Ce mode est similaire au
+programme de s\'election de fichier interactif standard d'Unix {\bf restore}.
+
+Si vos fichiers ont \'et\'e \'elagu\'es, la commande {\bf restore} sera dans
+l'incapacit\'e de les trouver. Voyez ci-dessous pour plus de d\'etails sur ce cas
+de figure.
+
+Dans la Console, apr\`es avoir saisi {\bf restore}, le menu suivant vous est
+pr\'esent\'e :
\footnotesize
\begin{verbatim}
\normalsize
\begin{itemize}
-\item Item 1 will list the last 20 jobs run. If you find the Job you want,
- you can then select item 3 and enter its JobId(s).
-
-\item Item 2 will list all the Jobs where a specified file is saved. If you
- find the Job you want, you can then select item 3 and enter the JobId.
-
-\item Item 3 allows you the enter a list of comma separated JobIds whose
- files will be put into the directory tree. You may then select which
- files from those JobIds to restore.
-
-\item Item 4 allows you to enter any arbitrary SQL command. This is probably
- the most primitive way of finding the desired JobIds, but at the same time,
- the most flexible. Once you have found the JobId(s), you can select item 3
- and enter them.
-
-\item Item 5 will automatically select the most recent Full backup and all
- subsequent incremental and differential backups for a specified Client.
- These are the Jobs and Files which, if reloaded, will restore your
- system to the most current saved state. It automatically enters the
- JobIds found into the directory tree. This is probably the most
- convenient of all the above options to use if you wish to restore a
- selected Client to its most recent state.
-
- There are two important things to note. First, this automatic selection
- will never select a job that failed (terminated with an error status).
- If you have such a job and want to recover one or more files from it,
- you will need to explicitly enter the JobId in item 3, then choose the
- files to restore.
-
- If some of the Jobs that are needed to do the restore have had their
- File records pruned, the restore will be incomplete. Bacula currently
- does not correctly detect this condition. You can however, check for
- this by looking carefully at the list of Jobs that Bacula selects and
- prints. If you find Jobs with the JobFiles column set to zero, when
- files should have been backed up, then you should expect problems.
-
- If all the File records have been pruned, Bacula will realize that there
- are no file records in any of the JobIds chosen and will inform you. It
- will then propose doing a full restore (non-selective) of those JobIds.
- This is possible because Bacula still knows where the beginning of the
- Job data is on the Volumes, even if it does not know where particular
- files are located.
-
-\item Item 6 allows you to specify a date and time, after which Bacula will
- automatically select the most recent Full backup and all subsequent
- incremental and differential backups that started before the specified date
- and time.
-
-\item Item 7 allows you to specify one or more filenames (complete path
- required) to be restored. Each filename is entered one at a time or if you
- prefix a filename with the less-than symbol (\lt{}) Bacula will read that
- file and assume it is a list of filenames to be restored. The filename entry
- mode is terminated by entering a blank line.
-
-\item Item 8 allows you to specify a date and time before entering the
- filenames. See Item 7 above for more details.
-
-\item Item 9 allows you find the JobIds of the most recent backup for
- a client. This is much like option 5 (it uses the same code), but
- those JobIds are retained internally as if you had entered them
- manually. You may then select item 11 (see below) to restore one
- or more directories.
-
-\item Item 10 is the same as item 9, except that it allows you to enter
- a before date (as with item 6). These JobIds will then be retained
- internally.
-
-\index[general]{Restore Directories}
-\item Item 11 allows you to enter a list of JobIds from which you can
- select directories to be restored. The list of JobIds can have been
- previously created by using either item 9 or 10 on the menu. You
- may then enter a full path to a directory name or a filename preceded
- by a less than sign (\lt{}). The filename should contain a list
- of directories to be restored. All files in those directories will
- be restored, but if the directory contains subdirectories, nothing
- will be restored in the subdirectory unless you explicitly enter its
- name.
-
-\item Item 12 allows you to cancel the restore command.
+\item Le choix 1 \'enum\`ere les 20 derniers jobs ex\'ecut\'es. Si vous trouvez
+ celui (ceux) que vous voulez, vous pouvez ensuite faire le choix 3 et entrer
+ son (leurs) JobId(s).
+
+\item Le choix 2 affiche tous les Jobs ayant sauvegard\'e un fichier
+ sp\'ecifi\'e. Si vous trouvez celui (ceux) que vous voulez, vous pouvez ensuite
+ faire le choix 3 et entrer son (leurs) JobId(s).
+
+\item Le choix 3 vous permet de saisir une liste de JobIds, s\'epar\'es par des
+ virgules. Les fichiers de ces jobs seront plac\'es dans l'arborescence afin
+ que vous puissiez s\'electionner ceux que vous voulez restaurer.
+
+\item Le choix 4 vous permet d'entrer une requ\^ete SQL arbitraire. C'est
+ certainement le moyen le plus primitif pour trouver les jobs d\'esir\'es,
+ mais aussi le plus flexible. Si vous trouvez celui (ceux) que vous voulez,
+ vous pouvez ensuite faire le choix 3 et entrer son (leurs) JobId(s).
+
+\item Le choix 5 s\'electionne automatiquement la full la plus r\'ecente, et toutes
+ les incr\'ementales et diff\'erentielles subs\'equentes \`a cette full pour un
+ client sp\'ecifi\'e. Il s'agit l\`a des jobs et fichiers qui, si vous les
+ restaurez, ram\`eneront votre syst\`eme \`a son dernier \'etat sauvegard\'e.
+ Les JobIds sont automatiquement charg\'es dans l'arborescence. C'est
+ probablement le plus pratique des choix propos\'es pour restaurer un
+ client \`a son \'etat le plus r\'ecent.
+
+ Notez que ce processus de s\'election automatique ne s\'electionnera jamais
+ un job qui a \'echou\'e (termin\'e avec un statut d'erreur). Si vous disposez
+ d'un tel job dont vous voulez extraire des fichiers, vous devez
+ eplicitement entrer son JobId au niveau du choix 3 et choisir les fichiers
+ \`a restaurer.
+
+ Si certains de jobs requis pour la restauration ont eu leurs enregistrements
+ de fichiers \'elagu\'es, la restauration sera incompl\`ete. Bacula ne d\'etecte
+ pas, pour l'instant, cette condition. Vous pouvez cependant la
+ contr\^oler en examinant attentivement la liste des jobs s\'electionn\'es
+ et affich\'es par Bacula. Si vous trouvez des jobs dont le champ JobFiles
+ est \`a z\'ero alors que ces fichiers auraient d\^u \^etre sauvegard\'es, alors
+ vous pouvez vous attendre \`a des probl\`emes.
+
+ Si tous les enregistrements de fichiers ont \'et\'e \'elagu\'es, Bacula constatera
+ qu'il n'y a aucune r\'ef\'erence \`a aucun fichier pour le JobIds s\'electionn\'es
+ et vous en informera, et vous proposera de faire une restauration compl\`ete
+ (non s\'elective) de ces JobIds. Ceci est possible car Bacula sait encore
+ o\`u commencent les donn\'ees sur les volumes, m\^eme s'il ne sait plus o\`u sont
+ les fichiers individuellement.
+
+\item Le choix 6 vous permet de sp\'ecifier une date et un heure. Bacula
+ s\'electionne alors automatiquement la plus r\'ecente full ant\'erieure \`a cette date
+ ainsi que les incr\'ementales et diff\'erentielles subs\'equentes \`a cette full et
+ ant\'erieures \`a cette date.
+
+\item Le choix 7 vous permet de sp\'ecifier un ou plusieurs noms de fichiers
+ (le chemin absolu est requis) \`a restaurer. Les noms de fichiers sont saisis
+ un par un, \`a moins que vous ne pr\'ef\'eriez cr\'eer un fichier pr\'efix\'e du
+ caract\`ere "moins" (\lt{}) que Bacula consid\`ere comme une liste de fichier
+ \`a restaurer. Pour quitter ce mode, entrez une ligne vide.
+
+\item Le choix 8 vous permet de sp\'ecifier une date et une heure avant
+ d'entrer les noms de fichiers. Voir le choix 7 pour plus de d\'etails.
+
+\item Le choix 9 vous permet de d\'eterminer les JobIds de la sauvegarde
+ la plus r\'ecente pour un client. C'est essentiellement la m\^eme chose
+ que le choix 5 (le m\^eme code est utilis\'e), mais ces JobIds sont
+ conserv\'es en interne comme si vous les aviez saisis manuellement.
+ Vous pouvez alors faire le choix 11 pour restaurer un ou plusieurs
+ r\'epertoires.
+
+\item Le choix 10 est le m\^eme que le 9, sauf qu'il vous permet d'entrer
+ une date butoir (comme pour le choix 6) pour la s\'election des JobIds.
+ Ces JobIds sont conserv\'es en interne comme si vous les aviez saisis manuellement.
+
+\index[general]{Restaurer des r\'epertoires}
+\item Le choix 11 vous permet d'entrer une liste de JobIds \`a partir de
+ laquelle vous pouvez s\'electionner les r\'epertoires \`a restaurer. La liste de
+ JobIds peut avoir \'et\'e \'etablie pr\'ec\'edemment \`a l'aide des choix 9 ou 10
+ du menu. Vous pouvez alors entrer le chemin absolu d'un r\'epertoire, ou
+ un nom de fichier pr\'efix\'e d'un signe "moins" (\lt{}) contenant la liste
+ des r\'epertoires \`a restaurer. Tous les fichiers des r\'epertoires s\'electionn\'es
+ seront restaur\'es, mais pas les sous-r\'epertoires, \`a moins que vous ne les
+ sp\'ecifiiez explicitement.
+
+\item Le choix 12 vous permet d'abandonner la restauration.
\end{itemize}
-As an example, suppose that we select item 5 (restore to most recent state).
-It will then ask for the desired Client, which on my system, will print all
-the Clients found in the database as follows:
+A titre d'exemple, supposons que nous s\'electionnions l'option 5 (restaurer \`a
+l'\'etat le plus r\'ecent). Bacula vous demande alors le client d\'esir\'e ce qui,
+sur mon syst\`eme, se manifeste ainsi :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-You will probably have far fewer Clients than this example, and if you have
-only one Client, it will be automatically selected. In this case, I enter
-{\bf Rufus} to select the Client. Then Bacula needs to know what FileSet is
-to be restored, so it prompts with:
+Si vous n'avez qu'un client, il est automatiquement s\'electionn\'e. Dans le cas
+pr\'esent, j'entre {\bf Rufus} pour s\'electionner ce client. Bacula a
+maintenant conna\^itre le FileSet \`a restaurer, aussi il affiche :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-I choose item 1, which is my full backup. Normally, you will only have a
-single FileSet for each Job, and if your machines are similar (all Linux) you
-may only have one FileSet for all your Clients.
+J'opte pour le choix 1, ma sauvegarde full. En principe, vous n'aurez qu'un
+FileSet pour chaque job, et si vos machines de ressemblent (m\^emes syst\`emes),
+vous pouvez n'avoir qu'un seul FileSet pour tous vos clients.
-At this point, {\bf Bacula} has all the information it needs to find the most
-recent set of backups. It will then query the database, which may take a bit
-of time, and it will come up with something like the following. Note, some of
-the columns are truncated here for presentation:
+A ce stade, Bacula d\'etient toutes les informations dont il a besoin pour
+trouver le jeu de sauvegardes le plus r\'ecent. Il va maintenant interroger le
+cataloguie, ce qui peut prendre un peu de temps, et afficher quelque chose
+comme :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-Depending on the number of {\bf JobFiles} for each JobId, the {\bf Building
-directory tree ..."} can take a bit of time. If you notice ath all the
-JobFiles are zero, your Files have probably been pruned and you will not be
-able to select any individual files -- it will be restore everything or
-nothing.
-
-In our example, Bacula found four Jobs that comprise the most recent backup of
-the specified Client and FileSet. Two of the Jobs have the same JobId because
-that Job wrote on two different Volumes. The third Job was an incremental
-backup to the previous Full backup, and it only saved 254 Files compared to
-128,374 for the Full backup. The fourth Job was also an incremental backup
-that saved 15 files.
-
-Next Bacula entered those Jobs into the directory tree, with no files marked
-to be restored as a default, tells you how many files are in the tree, and
-tells you that the current working directory ({\bf cwd}) is /. Finally, Bacula
-prompts with the dollar sign (\$) to indicate that you may enter commands to
-move around the directory tree and to select files.
+(Certaines colonnes sont tromqu\'ees pour des n\'ecessit\'es de mise en page).
+
+Selon le nombre de {\bf JobFiles} pour chaque JobId, la construction de
+l'arborescence peut prendre un certain temps. Si vous constatez que tous les
+JobFiles sont \`a z\'ero, vos fichiers ont probalement \'et\'e \'elagu\'es et vous ne
+pourrez pas s\'electionner les fichiers individuellement : vous devrez
+restaurer tout ou rien.
+
+Dans notre exemple, Bacula a trouv\'e quatre jobs qui comprennent la
+sauvegarde la plus r\'ecente du client et du FileSet sp\'ecifi\'es. Deux des jobs
+ont le m\^eme JobId car le job a \'ecrit sur deux volumes diff\'erents. Le
+troisi\`eme est une incr\'ementale qui n'a sauvegard\'e que 254 fichier sur les
+128 374 de la full. Le quatri\`eme est aussi une incr\'ementale, et n'a sauvegard\'e
+que 15 fichiers.
+
+Maintenant Bacula ins\`ere ces jobs dans l'arborescence, sans en marquer aucun
+pour restauration par d\'efaut. Il vous indique le nombre de fichiers dans
+l'arbre, et vous informe que le r\'epertoire de travail courant ({\bf cwd}) est
+/. Finalement, Bacula vous invite avec le signe (\$) \`a saisir des commandes
+pour vous d\'eplacer dans l'arborescence, et s\'electionner des fichiers.
+
+Si vous voulez que tous les fichiers de l'arbre soient marqu\'es pour
+restauration \`a sa construction, tapez {\bf restore all}.
+
+Plut\^ot que de choisir l'option 5 du premier menu (s\'electionner la
+sauvegarde la plus r\'ecente pour un client), si nous avions choisi l'option 3
+(Entrer une liste de JobIds \`a s\'electionner), et si nous avions saisi
+{\bf 1792,1797,1798}, nous serions arriv\'es au m\^eme point.
-If you want all the files to automatically be marked when the directory
-tree is built, enter the command {\bf restore all}.
-
-Instead of choosing item 5 on the first menu (Select the most recent backup
-for a client), if we had chosen item 3 (Enter list of JobIds to select) and we
-had entered the JobIds {\bf 1792,1797,1798} we would have arrived at the same
-point.
-
-One point to note, if you are manually entering JobIds, is that you must enter
-them in the order they were run (generally in increasing JobId order). If you
-enter them out of order and the same file was saved in two or more of the
-Jobs, you may end up with an old version of that file (i.e. not the most
-recent).
+Il faut noter un point si vous saisissez manuellement les JobIds : vous devez
+les entrer dans l'ordre o\`u ils ont \'et\'e ex\'ecut\'es (en g\'en\'eral, l'ordre croissant.
+Si vous les sasissez dans un ordre diff\'erent, vous courrez le risque de ne pas
+version la plus r\'ecente d'un fichier sauvegard\'e plusieurs fois si celui-ci a \'et\'e
+sauvegard\'e dans plusieurs jobs.
-Directly entering the JobIds can also permit you to recover data from
-a Job that wrote files to tape but that terminated with an error status.
+Entre vos JobIds directement peut aussi vous permettre de restaurer depuis
+un job qui a \'ecrit des donn\'ees sur les volumes mais qui s'est termin\'e en erreur.
-While in file selection mode, you can enter {\bf help} or a question mark (?)
-to produce a summary of the available commands:
+Dans le mode s\'election de fichiers, vous pouvez utiliser {\bf help} ou une
+question (?) pour produire un r\'esum\'e des commandes disponibles :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-As a default no files have been selected for restore (unless you
-added {\bf all} to the command line. If you want to restore
-everything, at this point, you should enter {\bf mark *}, and then {\bf done}
-and {\bf Bacula} will write the bootstrap records to a file and request your
-approval to start a restore job.
+Par d\'efaut, aucun fichier n'est s\'electionn\'e pour restauration (sauf si vous
+avez ajout\'e {\bf all} \`a la ligne de commande). Si, \`a ce stade, vous voulez
+tout restaurer, vous devriez saisir {\bf mark *}, puis {\bf done}, Bacula
+\'ecrira alors les donn\'ees bootstrap dans un fichier et sollicitera votre
+approbation pour d\'emarrer la restauration.
-If you do not enter the above mentioned {\bf mark *} command, you will start
-with an empty slate. Now you can simply start looking at the tree and {\bf
-mark} particular files or directories you want restored. It is easy to make
-a mistake in specifying a file to mark or unmark, and Bacula's error handling
-is not perfect, so please check your work by using the {\bf ls} or {\bf dir}
-commands to see what files are actually selected. Any selected file has its
-name preceded by an asterisk.
+Si vous n'utilisez pas {\bf mark *}, vous commencez avec une s\'election vide.
+Vous pouvez simplement regarder et marquer ({\bf mark}) les fichiers et/ou
+r\'epertoires qui vous int\'eressent. Il est ais\'e de commettre une erreur dans ces
+op\'erations, et la gestion des erreurs dans Bacula n'est pas parfaite, aussi
+contr\^olez votre travail avec la commande {\bf ls} ou {\bf dir} pour voir
+quels fichiers ont \'et\'e s\'electionn\'es. Les fichiers s\'electionn\'es sont pr\'ec\'ed\'es
+d'une ast\'erisque.
-To check what is marked or not marked, enter the {\bf count} command, which
-displays:
+Pour contr\^oler ce qui est marqu\'e et ce qui ne l'est pas utilisez la commande
+{\bf count} qui affiche :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-Each of the above commands will be described in more detail in the next
-section. We continue with the above example, having accepted to restore all
-files as Bacula set by default. On entering the {\bf done} command, Bacula
-prints:
+Chacune des commandes ci-dessus sera expliqu\'e plus en d\'etail dans la
+prochaine section. Poursuivons avec notre exemple, en validant la restauration de
+tous les fichiers. En saisissant {\bf done}, Bacula affiche :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-Please examine each of the items very carefully to make sure that they are
-correct. In particular, look at {\bf Where}, which tells you where in the
-directory structure the files will be restored, and {\bf Client}, which
-tells you which client will receive the files. Note that by default the
-Client which will receive the files is the Client that was backed up.
-These items will not always be completed with the correct values depending
-on which of the restore options you chose. You can change any of these
-default items by entering {\bf mod} and responding to the prompts.
-
-The above assumes that you have defined a {\bf Restore} Job resource in your
-Director's configuration file. Normally, you will only need one Restore Job
-resource definition because by its nature, restoring is a manual operation,
-and using the Console interface, you will be able to modify the Restore Job to
-do what you want.
-
-An example Restore Job resource definition is given below.
-
-Returning to the above example, you should verify that the Client name is
-correct before running the Job. However, you may want to modify some of the
-parameters of the restore job. For example, in addition to checking the Client
-it is wise to check that the Storage device chosen by Bacula is indeed
-correct. Although the {\bf FileSet} is shown, it will be ignored in restore.
-The restore will choose the files to be restored either by reading the {\bf
-Bootstrap} file, or if not specified, it will restore all files associated
-with the specified backup {\bf JobId} (i.e. the JobId of the Job that
-originally backed up the files).
-
-Finally before running the job, please note that the default location for
-restoring files is {\bf not} their original locations, but rather the directory
-{\bf /tmp/bacula-restores}. You can change this default by modifying your {\bf
-bacula-dir.conf} file, or you can modify it using the {\bf mod} option. If you
-want to restore the files to their original location, you must have {\bf
-Where} set to nothing or to the root, i.e. {\bf /}.
-
-If you now enter {\bf yes}, Bacula will run the restore Job. The Storage
-daemon will first request Volume {\bf DLT-19Jul02} and after the appropriate
-files have been restored from that volume, it will request Volume {\bf
-DLT-04Aug02}.
-
-\subsection*{Selecting Files by Filename}
-\index[general]{Selecting Files by Filename }
-\index[general]{Filename!Selecting Files by }
-\addcontentsline{toc}{subsection}{Selecting Files by Filename}
-
-If you have a small number of files to restore, and you know the filenames,
-you can either put the list of filenames in a file to be read by Bacula, or
-you can enter the names one at a time. The filenames must include the full
-path and filename. No wild cards are used.
-
-To enter the files, after the {\bf restore}, you select item number 7 from the
-prompt list:
+Examinez chaque \'el\'ement attentivement pour vous assurer que tout est
+conforme \`a ce que vous souhaitez. En particulier, v\'erifiez la ligne {\bf where},
+qui vous indique dans quelle partie du syst\`eme de fichiers vos donn\'ees
+seront restaur\'ees, et quel client va les recevoir (par d\'efaut, les
+restaurations ont lieu sur le client d'origine). Ces param\`etres n'auront pas
+forc\'ement les bonnes valeurs, mais vous pouvez les modifier \`a l'aide
+de la commande {\bf mod} et en vous laissant guider par l'invite de la
+console.
+
+L'affichage ci-dessus suppose que vous ayez d\'efini une ressource Job de type
+{\bf restore} dans le fichier de configuration de votre Director. en
+principe, vous n'en n'aurez besoin que d'une, car, par nature, une
+restauration est une op\'eration essentiellement manuelle. A l'aide de la
+Console, vous pourrez modifier le job Restore pour faire ce que vous voulez
+qu'il fasse.
+
+Un exemple de ressource Job de type restore est donn\'e plus bas.
+
+Pour en revenir \`a notre exemple, en plus de v\'erifier le client, il est sage
+de v\'erifier que le p\'eriph\'erique de stockage choisi par Bacula est le bon.
+Bien que le FileSet soit pr\'esent\'e, il est en fait ignor\'e dans la restauration.
+Le processus de restauration choisit ses fichiers en lisant le fichier
+{\bf bootstrap}, et restaure tous les fichiers associ\'es au JobId consid\'er\'e
+si ce fichier n'est pas sp\'ecifi\'e.
+
+Enfin, avant de lancer la restauration, notez que le lieu par d\'efaut pour les
+fichiers restaur\'es n'est pas leur emplacement d'origine mais le r\'epertoire
+{\bf /tmp/bacula-restores}. Vous pouvez modifier cette valeur par d\'efaut dans
+le fichier de configuration du Director, ou avec l'option {\bf mod}. Si vous
+voulez restaurer les fichiers \`a leurs emplacements d'origine, modifiez l'option
+{\bf where} : sp\'ecifiez la racine (\bf /}Â ou rien du tout.
+
+Si vous entrez maintenant {\bf yes}, Bacula lance la restauration. le Storage
+Daemon va d'abord requ\'erir le volume {\bf DLT-19Jul02}, puis le {\bf DLT-04Aug02}
+une fois qu'il aura extrait les fichiers requis du premier.
+
+\subsection*{S\'electionner des fichiers par leurs noms}
+\index[general]{S\'electionner des fichiers par leurs noms}
+\index[general]{Noms de fichiers!S\'electionner des fichiers par leurs}
+\addcontentsline{toc}{subsection}{S\'electionner des fichiers par leurs noms}
+
+Si vous n'avez qu'un petit nombre de fichiers \`a restaurer dont vous connaissez
+les noms, vous pouvez, aux choix, placer ces noms dans un fichier qui sera
+lu par Bacula, ou saisir les noms un par un. Les noms de fichier doivent inclure
+le chemin absolu. Les caract\`eres jokers ne peuvent \^etre utilis\'es.
+
+Pour saisir la liste, choisissez l'option 7 dans le menu de la commande {\bf restore} :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-which then prompts you for the client name:
+Vous \^etes alors invit\'e \`a pr\'eciser le client :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-Of course, your client list will be different, and if you have only one
-client, it will be automatically selected. And finally, Bacula requests you to
-enter a filename:
+Si vous n'avez qu'un client, il est s\'electionn\'e automatiquement.
+Finalement, Bacula vous demande d'entrer un nom de fichier :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-At this point, you can enter the full path and filename
+Vous pouvez, \`a ce stade, saisir le chemin absolu et le nom du fichier :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-as you can see, it took the filename. If Bacula cannot find a copy of the
-file, it prints the following:
+Si Bacula ne peut en trouver aucune copie, il affiche ce qui suit :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-If you want Bacula to read the filenames from a file, you simply precede the
-filename with a less-than symbol (\lt{}). When you have entered all the
-filenames, you enter a blank line, and Bacula will write the bootstrap file,
-tells you what tapes will be used, and proposes a Restore job to be run:
+Si vous souhaitez que Bacula r\'ecup\`ere la liste des fichiers \`a restaurer depuis
+un fichier, r\'edigez ce fichier et donnez lui un nom commen{\c c}ant par le signe
+moins (\lt{}) et saisissez-le ici. Lorsque vous avez entr\'e tous les noms de
+fichiers, validez une ligne vide. Bacula \'ecrit maintenant le fichier
+bootstrap, vous indique les cartouches qui seront utilis\'ees, et vous propose
+de valider la restauration :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-It is possible to automate the selection by file by putting your list of files
-in say {\bf /tmp/file-list}, then using the following command:
+Il est possible d'automatiser la s\'election des fichiers en pla{\c c}ant votre liste
+de fichiers dans, part exemple, {\bf /tmp/file-list}, puis en utilisant la
+commande suivante :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-If in modifying the parameters for the Run Restore job, you find that Bacula
-asks you to enter a Job number, this is because you have not yet specified
-either a Job number or a Bootstrap file. Simply entering zero will allow you
-to continue and to select another option to be modified.
+Si, en modifiant les param\`etres du job restauration, vous constatez que Bacula
+vous demande d'entrer un num\'ero de job, c'est vous n'avez pour l'instant sp\'ecifi\'e
+ni num\'ero de job, ni fichier bootstrap. Entrez simplement z\'ero pour pouvoir
+continuer et s\'electionner une autre option \`a modifier.
+
\label{CommandArguments}
-\subsection*{Command Line Arguments}
-\index[general]{Arguments!Command Line }
-\index[general]{Command Line Arguments }
-\addcontentsline{toc}{subsection}{Command Line Arguments}
+\subsection*{Arguments de la ligne de commande}
+\index[general]{Arguments!ligne de commande}
+\index[general]{Arguments de la ligne de commande}
+\addcontentsline{toc}{subsection}{Arguments de la ligne de commande}
-If all the above sounds complicated, you will probably agree that it really
-isn't after trying it a few times. It is possible to do everything that was
-shown above, with the exception of selecting the FileSet, by using command
-line arguments with a single command by entering:
+Si tout ce qui pr\'ec\`ede vous a sembl\'e compliqu\'e, vous admettrez certainement
+que ce n'est vraiment pas le cas apr\`es quelques essais. Il est possible de
+faire tout ce qui vient d'\^etre vu en utilisant la ligne de commande, \`a
+l'exception de la s\'election du FileSet. Voici une telle ligne de commande :
\footnotesize
\begin{verbatim}
\end{verbatim}
\normalsize
-The {\bf client=Rufus} specification will automatically select Rufus as the
-client, the {\bf current} tells Bacula that you want to restore the system to
-the most current state possible, and the {\bf yes} suppresses the final {\bf
-yes/mod/no} prompt and simply runs the restore.
+Le sp\'ecification {\bf client=Rufus} s\'electionne automatiquement le client Rufus,
+l'option {\bf current} pr\'ecise que vous voulez une restauration \`a l'\'etat le plus
+r\'ecent possible, et le {\bf yes} \'elude l'invite finale {\bf yes/mod/no} et
+ex\'ecute directement la restauration.
-The full list of possible command line arguments are:
+Voici la liste des arguments de la ligne de commandes :
\begin{itemize}
-\item {\bf all} -- select all Files to be restored.
-\item {\bf select} -- use the tree selection method.
-\item {\bf done} -- do not prompt the user in tree mode.
-\item {\bf current} -- automatically select the most current set of backups
- for the specified client.
-\item {\bf client=xxxx} -- select the specified client.
-\item {\bf jobid=nnn} -- specify a JobId or comma separated list of JobIds to
- be restored.
-\item {\bf before=YYYY-MM-DD HH:MM:SS} -- specify a date and time to which
- the system should be restored. Only Jobs started before the specified
- date/time will be selected, and as is the case for {\bf current} Bacula will
-automatically find the most recent prior Full save and all Differential and
-Incremental saves run before the date you specify. Note, this command is not
-too user friendly in that you must specify the date/time exactly as shown.
-\item {\bf file=filename} -- specify a filename to be restored. You must
- specify the full path and filename. Prefixing the entry with a less-than
-sign
- (\lt{}) will cause Bacula to assume that the filename is on your system and
-contains a list of files to be restored. Bacula will thus read the list from
-that file. Multiple file=xxx specifications may be specified on the command
-line.
-\item {\bf jobid=nnn} -- specify a JobId to be restored.
-\item {\bf pool=pool-name} -- specify a Pool name to be used for selection of
- Volumes when specifying options 5 and 6 (restore current system, and restore
- current system before given date). This permits you to have several Pools,
-possibly one offsite, and to select the Pool to be used for restoring.
-\item {\bf yes} -- automatically run the restore without prompting for
- modifications (most useful in batch scripts).
+\item {\bf all} -- s\'electionne tous les fichiers pour la restauration.
+\item {\bf select} -- utilise la s\'election via l'arborescence.
+\item {\bf done} -- permet de quitter le mode de s\'election dans l'arborescence.
+\item {\bf current} -- s\'electionne automatiquement le jeu de sauvegardes le plus
+ r\'ecent pour le client sp\'ecifi\'e.
+\item {\bf client=xxxx} -- S\'electionne le client sp\'ecifi\'e.
+\item {\bf jobid=nnn} -- Sp\'ecifie un JobId ou une liste de JobIds s\'epar\'es par des
+ virgules pour la restauration.
+\item {\bf before=YYYY-MM-DD HH:MM:SS} -- Sp\'ecifie une date et un horaire. Bacula
+ s\'electionne le plus r\'ecent des jeux de sauvegardes ant\'erieurs \`a la date sp\'ecifi\'ee.
+ Cette commande n'est pas tr\`es conviviale, en effet, vous devez sp\'ecifier la date
+ et l'heure en respectant exactement le mod\`ele.
+\item {\bf file=filename} -- Sp\'ecifie un nom de fichier \`a restaurer. Vous devez
+ sp\'ecifier le chemin absolu vers le fichier. Si vous pr\'efixez l'entr\'ee d'un signe moins
+ (\lt{}), Bacula consid\`ere que ce fichier existe et qu'il contient la liste des
+ fichiers \`a restaurer. Les sp\'ecifications multiples {\bf file=xxx} peuvent \^etre
+ utilis\'ees en ligne de commandes.
+\item {\bf jobid=nnn} -- Sp\'ecifie un JobId \`a restaurer.
+\item {\bf pool=pool-name} -- Sp\'ecifie un nom de pool \`a utiliser pour la s\'election des
+ volumes au niveau des options 5 et 6 (restauration \`a l'\'etat le plus r\'ecent et
+ restauration \`a l'\'etat le plus r\'ecent avant une date donn\'ee). Ceci vous permet d'avoir
+ plusieurs pools, dont un \'eventuellement hors site et l'autre sur place disponible pour
+ les restaurations.
+\item {\bf yes} -- Ex\'ecute automatiquement la restauration sans passer par l'invite finale
+ de validation/modification surtout utile pour l'utilisation dans des scripts).
\end{itemize}
-\subsection*{Restoring Directory Attributes}
-\index[general]{Attributes!Restoring Directory }
-\index[general]{Restoring Directory Attributes }
-\addcontentsline{toc}{subsection}{Restoring Directory Attributes}
+\subsection*{Restaurer les attributs de fichiers}
+\index[general]{Attributs de fichiers!Restaurer}
+\index[general]{Restaurer les attributs de fichiers}
+\addcontentsline{toc}{subsection}{Restaurer les attributs de fichiers}
-Depending how you do the restore, you may or may not get the directory entries
-back to their original state. Here are a few of the problems you can
-encounter, and for same machine restores, how to avoid them.
+Selon la fa{\c c}on dont vous restaurez, vous pouvez ou non restaurer les
+attributs de fichiers \`a leur \'etat initial. Voici quelques uns des
+probl\`emes auxquels vous pouvez \^etre confront\'es, et, pour les
+restaurations sur la machine d'origine, comment les \'eviter.
\begin{itemize}
-\item You backed up on one machine and are restoring to another that is
- either a different OS or doesn't have the same users/groups defined. Bacula
- does the best it can in these situations.
-\item You are restoring into a directory that is already created and has file
- creation restrictions. Bacula tries to reset everything but without walking
- up the full chain of directories and modifying them all during the restore,
- which Bacula does and will not do, getting permissions back correctly in
-this
- situation depends to a large extent on your OS.
-\item You selected one or more files in a directory, but did not select the
- directory entry to be restored. In that case, if the directory is not on
-disk
- Bacula simply creates the directory with some default attributes which may
- not be the same as the original. If you do not select a directory and all
-its
- contents to be restored, you can still select items within the directory to
- be restored by individually marking those files, but in that case, you
-should
- individually use the "markdir" command to select all higher level
- directory entries (one at a time) to be restored if you want the directory
- entries properly restored.
+\item Vous avez sauvegard\'e des fichiers sur une machine, et les restaurez
+ sur une autre qui a peut-\^etre un autre syst\`eme d'exploitation ou des
+ utilisateurs/groupes diff\'erents. Bacula fait du mieux qu'il peut dans ces
+ situations. Notez qu'utilisateurs et groupes sont sauvegard\'es au format
+ num\'erique, et qu'ils peuvent donc se r\'ef\'erer \`a d'autres utilisateurs et
+ groupes sur un autre syst\`eme.
+\item Vous restaurez dans un r\'epertoire existant sur lequel portent des
+ restrictions du droit de cr\'eation. Bacula tente alors de tout r\'etablir,
+ mais sans parcourir la cha\^ine compl\`ete des r\'epertoires ni les modifier
+ durant la restauration. En fait, ce que pourra faire Bacula pour r\'etablir
+ les permissions correctement d\'epend pour beaucoup de votre syst\`eme
+ d'exploitation.
+\item Vous faites une restauration recursive d'une arborescence. Dans ce cas,
+ de figure, Bacula restaure un fichier avant de restaurer l'entr\'ee de son
+ r\'epertoire parent. Dans le processus de restauration du fichier, Bacula
+ cr\'ee le r\'epertoire parent avec des permissions ouvertes et le m\^eme
+ propri\'etaire que le fichier restaur\'e. Alors, lorsque Bacula tente de restaurer
+ le r\'epertoire en lui m\^eme, il se rend compte qu'il existe d\'ej\`a (situation
+ similaire \`a la pr\'ec\'edente). Si vous avez fix\'e l'option "Replace" \`a "never"
+ lors du lancement du job, alors Bacula ne modifie pas les permissions et
+ propri\'et\'es du r\'epertoire pour s'accorder \`a ce qu'elles \'etaient lors de la
+ sauvegarde. Vous devriez aussi noter une divergence entre le nombre de fichiers
+ effectivement restaur\'es et le nombre de fichiers attendus. Si vous voulez
+ \'eviter ces inconv\'enients, fixez l'option "Replace" \`a "always", ainsi
+ Bacula sera en mesure de modifier les propri\'etaire et permissions des
+ r\'epertoires pour les ramener \`a leurs \'etats d'origine. Le nombre de
+ fichiers restaur\'es devrait cette fois \^etre identique \`a celui attendu.
+
+\item Vous avez s\'electionn\'e un ou plusieurs fichiers d'un r\'epertoire sans
+ s\'electionner le r\'epertoire lui-m\^eme. Dans ce cas, si le r\'epertoire
+ n'existe pas d\'ej\`a, Bacula le cr\'ee avec des attributs par d\'efaut qui ne
+ seront peut-\^etre pas ceux d'origine. Si vous ne voulez pas s\'electionner
+ un r\'epertoire et tout son contenu, mais seulement quelques objets dans
+ ce r\'epertoire en les marquant individuellement, vous devriez utiliser
+ la commande {\bf markdir} pour s\'electionner un r\'epertoire de plus haut
+ niveau (un \`a la fois) si vous voulez que les entr\'ees de r\'epertoires
+ soient restaur\'ees correctement.
\end{itemize}
\label{Windows}
-\subsection*{Restoring on Windows}
-\index[general]{Restoring on Windows }
-\index[general]{Windows!Restoring on }
-\addcontentsline{toc}{subsection}{Restoring on Windows}
-
-If you are restoring on WinNT/2K/XP systems, Bacula will restore the files
-with the original ownerships and permissions as would be expected. This is
-also true if you are restoring those files to an alternate directory (using
-the Where option in restore). However, if the alternate directory does not
-already exist, the Bacula File daemon (Client) will try to create it. In
-some cases, it may not create the directories, and if it does since the
-File daemon runs under the SYSTEM account, the directory will be created
-with SYSTEM ownership and permissions. In this case, you may have problems
-accessing the newly restored files.
-
-To avoid this problem, you should create any alternate directory before doing
-the
-restore. Bacula will not change the ownership and permissions of the directory
-if it is already created as long as it is not one of the directories being
-restored (i.e. written to tape).
-
-The default restore location is {\bf /tmp/bacula-restores/} and if you are
-restoring from drive {\bf E:}, the default will be
-{\bf /tmp/bacula-restores/e/}, so you should ensure that this directory
-exists before doing the restore, or use the {\bf mod} option to
-select a different {\bf where} directory that does exist.
-
-Some users have experienced problems restoring files that participate in
-the Active Directory. They also report that changing the userid under which
-Bacula (bacula-fd.exe) runs, from SYSTEM to a Domain Admin userid, resolves
-the problem.
-
-
-\subsection*{Restoring Files Can Be Slow}
-\index[general]{Slow!Restoring Files Can Be }
-\index[general]{Restoring Files Can Be Slow }
-\addcontentsline{toc}{subsection}{Restoring Files Can Be Slow}
-
-Restoring files is generally {\bf much} slower than backing them up for several
-reasons. The first is that during a backup the tape is normally already
-positioned and Bacula only needs to write. On the other hand, because restoring
-files is done so rarely, Bacula keeps only the start file and block on the
-tape for the whole job rather than on a file by file basis which would use
-quite a lot of space in the catalog.
-
-Bacula will forward space to the correct file mark on the tape for the Job,
-then forward space to the correct block, and finally sequentially read each
-record until it gets to the correct one(s) for the file or files you want to
-restore. Once the desired files are restored, Bacula will stop reading the
-tape.
-
-Finally, instead of just reading a file for backup, during the restore, Bacula
-must create the file, and the operating system must allocate disk space for
-the file as Bacula is restoring it.
-
-For all the above reasons the restore process is generally much slower than
-backing up (sometimes it takes three times as long).
+\subsection*{Restaurer sur Windows}
+\index[general]{Restaurer sur Windows}
+\index[general]{Windows!Restaurer sur}
+\addcontentsline{toc}{subsection}{Restaurer sur Windows}
+Sur les syst\`emes WinNT/2K/XP, Bacula restaure les fichiers avec les droits
+et permissions d'origine comme on s'y attend. Ceci est aussi v\'erifi\'e si vous
+restaurez ces fichiers vers un autre r\'epertoire (avec l'option "where") que celui
+d'origine. Cependant, si le nouveau r\'epertoire n'existe pas, le File Daemon
+tente de le cr\'eer. Dans certains cas, il n'y parvient pas. S'il y parvient, le
+r\'epertoire cr\'e\'e appartient \`a l'utilisateur qui ex\'ecute le File Daemon, c'est-\`a-dire
+SYSTEM. Dans ce cas, il se peut que vous ayez des difficult\'es pour acc\'eder aux
+fichiers fraichement restaur\'es.
+
+Pour \'eviter ce probl\`eme, vous devriez cr\'eer le r\'epertoire alternatif avant
+de lancer la restauration. Bacula ne changera pas les attributs de ce r\'epertoire,
+du moment que ce n'est pas l'un des r\'epertoires \`a restaurer.
+
+Le r\'epertoire de restauration par d\'efaut est {\bf /tmp/bacula-restores/}, qui devient
+{\bf /tmp/bacula-restores/e/} si vous restaurez depuis le disque {\bf E}.
+Aussi, assurez-vous que ce r\'epertoire existe avant de lancer la restauration, ou
+utilisez l'option {\bf mod} pour s\'electionner un r\'epertoire destination existant.
+
+Certains utilisateurs ont signal\'e des probl\`emes en restaurant des fichiers
+qui participent \`a Active Directory. Ils ont aussi rapport\'e que le changement de
+l'Id utilisateur sous lequel est ex\'ecut\'e Bacula de SYSTEM en un Id d'administrateur
+du domaine r\'esout le probl\`eme.
+
+\subsection*{Une restauration peut prendre du temps}
+\index[general]{temps!Restauration}
+\index[general]{Une restauration peut prendre du temps}
+\addcontentsline{toc}{subsection}{Une restauration peut prendre du temps}
+
+Restaurer des fichiers est g\'en\'eralement {\bf beaucoup} plus lent que de les
+sauvegarder, ce pour plusieurs raisons. La premi\`ere est que lors d'une sauvegarde,
+la cartouche est normalement d\'ej\`a positionn\'ee, Bacula n'a qu'\`a \'ecrire dessus.
+D'autre part, les restaurations \'etant si rares (par rapport aux sauvegardes),
+Bacula ne garde dans le catalogue que l'emplacement sur la cartouche du premier
+fichier et du premier bloc pour chaque job, et non l'emplacement de chaque fichier,
+ce qui occuperait trop de place dans le catalogue.
+
+Bacula se place d'abord sur la bonne marque de fichier sur la cartouche, puis
+sur le bloc correct, puis lit s\'equentiellement chaque enregistrement jusqu'\`a
+trouver ceux correspondant aux fichier que vous voulez restaurer. Une fois ces
+fichiers restaur\'es, Bacula cesse de lire la cartouche.
+
+Enfin, au lieu de simplement lire un fichier comme pour une sauvegarde, Bacula
+doit, lors d'une restauration, cr\'eer les fichiers, tandis que le syst\`eme
+d'exploitation doit, de son cot\'e, allouer de l'espace disque pour ces fichiers
+restaur\'es.
+
+Pour toutes ces raisons, le processus de restauration est g\'en\'eralement beaucoup
+plus lent que celui de sauvegarde (une restauration peut prendre trois fois
+plus de temps que la sauvegarde).
\subsection*{Problems Restoring Files}
\index[general]{Files!Problems Restoring }
\item Set "Block Positioning = no" in your Device resource and try the
restore. This is a new directive and untested.
\item Set "Minimum Block Size = 512" and "Maximum Block Size = 512" and
- try the restore. Again send me the full job report output. If you are able
- to
- determine the block size your drive was previously using, you should try
- that size if 512 does not work.
+ try the restore. If you are able to determine the block size your drive
+ was previously using, you should try that size if 512 does not work.
\item Try editing the restore.bsr file at the Run xxx yes/mod/no prompt
- before starting the restore job and remove all the VolBlock statements.
- These
- are what causes Bacula to reposition the tape, and where problems occur if
- you have a fixed block size set for your drive. The VolFile commands also
- cause repositioning, but this will work regardless of the block size.
+ before starting the restore job and remove all the VolBlock statements.
+ These are what causes Bacula to reposition the tape, and where problems
+ occur if you have a fixed block size set for your drive. The VolFile
+ commands also cause repositioning, but this will work regardless of the
+ block size.
\item Use bextract to extract the files you want -- it reads the Volume
- sequentially if you use the include list feature, or if you use a .bsr file,
- but remove all the VolBlock statements after the .bsr file is created (at
- the
- Run yes/mod/no) prompt but before you start the restore.
+ sequentially if you use the include list feature, or if you use a .bsr
+ file, but remove all the VolBlock statements after the .bsr file is
+ created (at the Run yes/mod/no) prompt but before you start the restore.
\end{enumerate}
+\subsection*{Restore Errors}
+\index[general]{Errors!Restore}
+\index[general]{Restore Errors}
+\addcontentsline{toc}{subsection}{Restore Errors}
+
+There are a number of reasons why there may be restore errors or
+warning messages. Some of the more common ones are:
+
+\begin{description}
+
+\item [file count mismatch]
+ This can occur for the following reasons:
+ \begin{itemize}
+ \item You requested Bacula not to overwrite existing or newer
+ files.
+ \item A Bacula miscount of files/directories. This is an
+ on-going problem due to the complications of directories,
+ soft/hard link, and such. Simply check that all the files you
+ wanted were actually restored.
+ \end{itemize}
+\item [file size error]
+ When Bacula restores files, it checks that the size of the
+ restored file is the same as the file status data it saved
+ when starting the backup of the file. If the sizes do not
+ agree, Bacula will print an error message. This size mismatch
+ most often occurs because the file was being written as Bacula
+ backed up the file. In this case, the size that Bacula
+ restored will be greater than the status size. This often
+ happens with log files.
+
+ If the restored size is smaller, then you should be concerned
+ about a possible tape error and check the Bacula output as
+ well as your system logs.
+\end{description}
+
+
+
\subsection*{Example Restore Job Resource}
\index[general]{Example Restore Job Resource }
\index[general]{Resource!Example Restore Job }
This command is the same as the {\bf help} command.
\end{description}
+\label{database_restore}
\subsection*{Restoring When Things Go Wrong}
\index[general]{Restoring When Things Go Wrong }
+\index[general]{Restoring Your Database}
+\index[general]{Database!Restoring}
\addcontentsline{toc}{subsection}{Restoring When Things Go Wrong}
This and the following sections will try to present a few of the kinds of
problems that can come up making restoring more difficult. I'll try to
provide a few ideas how to get out of these problem situations.
+In addition to what is presented here, there is more specific information
+on restoring a \ilink{Client}{restore_client} and your
+\ilink{Server}{restore_server} in the \ilink{Disaster Recovery Using
+Bacula}{_ChapterRescue} chapter of this manual.
\begin{description}
-\item [Problem]
- Your catalog has been damaged and Bacula either doesn't work or prints
- errors.
+\item[Problem]
+ My database is broken.
\item[Solution]
For SQLite, use the vacuum command to try to fix the database. For either
MySQL or PostgreSQL, see the vendor's documentation. They have specific tools
OK to run? (yes/mod/no):
\end{verbatim}
\normalsize
- A number of the items will be different in your case. What you want
- to do is: to use the mod option to change the Bootstrap to point to
- your saved bootstrap file; and to make sure all the other items
- such as Client, Storage, Catalog, and Where are correct. The
- FileSet is not used when you specify a bootstrap file.
- Once you have set all the correct values, run the Job and
- it will restore the backup of your database. You will then
- need to follow the instructions for your database type to
- recreate the database from the ASCII backup file.
+ A number of the items will be different in your case. What you want to
+ do is: to use the mod option to change the Bootstrap to point to your
+ saved bootstrap file; and to make sure all the other items such as
+ Client, Storage, Catalog, and Where are correct. The FileSet is not
+ used when you specify a bootstrap file. Once you have set all the
+ correct values, run the Job and it will restore the backup of your
+ database. You will then need to follow the instructions for your
+ database type to recreate the database from the ASCII backup file.
\item[Solution]
- If you did save your database but did not make a bootstrap file, then
- recovering the database
- is more difficult. You will probably need to use bextract to extract the
- backup copy.
- First you should locate the listing of the job report from the last catalog
- backup. It has important information that will allow you to quickly find
- your database file. For example, in the job report for the CatalogBackup
- shown below, the critical items are the Volume name(s), the Volume Session Id
- and the Volume Session Time. If you know those, you can easily restore your
+ If you did save your database but did not make a bootstrap file, then
+ recovering the database is more difficult. You will probably need to
+ use bextract to extract the backup copy. First you should locate the
+ listing of the job report from the last catalog backup. It has
+ important information that will allow you to quickly find your database
+ file. For example, in the job report for the CatalogBackup shown below,
+ the critical items are the Volume name(s), the Volume Session Id and the
+ Volume Session Time. If you know those, you can easily restore your
Catalog.
\footnotesize
\begin{verbatim}
FileIndex=1-1
\end{verbatim}
\normalsize
- Where we have inserted the Volume name, Volume Session Id, and Volume Session
-Time that
- correspond to the values in the job report. We've also used a FileIndex of
-one,
- which will always be the case providing that there was only one file
- backed up in the job.
+ Where we have inserted the Volume name, Volume Session Id, and Volume
+ Session Time that correspond to the values in the job report. We've also
+ used a FileIndex of one, which will always be the case providing that
+ there was only one file backed up in the job.
- The disadvantage of this bootstrap file compared to what is created when you
- ask for one to be written, is that there is no File and Block specified, so
- the restore code must search all data in the Volume to find the requested
- file. A fully specified bootstrap file would have the File and Blocks
-specified
- as follows:
+ The disadvantage of this bootstrap file compared to what is created when
+ you ask for one to be written, is that there is no File and Block
+ specified, so the restore code must search all data in the Volume to find
+ the requested file. A fully specified bootstrap file would have the File
+ and Blocks specified as follows:
\footnotesize
\begin{verbatim}
Volume="DLT-22Apr05"
FileIndex=1-1
\end{verbatim}
\normalsize
+
+\item [Problem]
+ I try to restore the last known good full backup by specifying
+ item 3 on the restore menu then the JobId to restore. Bacula
+ then reports:
+
+\footnotesize
+\begin{verbatim}
+ 1 Job 0 Files
+\end{verbatim}
+\normalsize
+ and restores nothing.
+\item[Solution]
+ Most likely the File records were pruned from the database either due
+ to the File Retention period expiring or by explicitly purging the
+ Job. By using the "llist jobid=nn" command, you can obtain all the
+ important information about the job:
+\footnotesize
+\begin{verbatim}
+llist jobid=120
+ JobId: 120
+ Job: save.2005-12-05_18.27.33
+ Job.Name: save
+ PurgedFiles: 0
+ Type: B
+ Level: F
+ Job.ClientId: 1
+ Client.Name: Rufus
+ JobStatus: T
+ SchedTime: 2005-12-05 18:27:32
+ StartTime: 2005-12-05 18:27:35
+ EndTime: 2005-12-05 18:27:37
+ JobTDate: 1133803657
+ VolSessionId: 1
+ VolSessionTime: 1133803624
+ JobFiles: 236
+ JobErrors: 0
+ JobMissingFiles: 0
+ Job.PoolId: 4
+ Pool.Name: Full
+ Job.FileSetId: 1
+ FileSet.FileSet: BackupSet
+\end{verbatim}
+\normalsize
+
+ Then you can find the Volume(s) used by doing:
+\footnotesize
+\begin{verbatim}
+sql
+select VolumeName from JobMedia,Media where JobId=1 and JobMedia.MediaId=Media.MediaId;
+\end{verbatim}
+\normalsize
+ Finally, you can create a bootstrap file as described in the previous
+ problem above using this information.
+
+ If you are using Bacula version 1.38.0 or greater, when you select
+ item 3 from the menu and enter the JobId, it will ask you if
+ you would like to restore all the files in the job, and it will
+ collect the above information and write the bootstrap file for
+ you.
+
\item [Problem]
You don't have a bootstrap file, and you don't have the Job report for
the backup of your database, but you did backup the database, and you
How can I find where a file is stored.
\item[Solution]
Normally, it is not necessary, you just use the {\bf restore} command to
-restore the
- most recently saved version (menu option 5), or a version saved before a given
-date (menu
- option 8). If you know the JobId of the job in which it was saved, you can
-use menu
- option 3 to enter that JobId.
+ restore the most recently saved version (menu option 5), or a version
+ saved before a given date (menu option 8). If you know the JobId of the
+ job in which it was saved, you can use menu option 3 to enter that JobId.
- If you would like to know the JobId where a file was saved, select restore
-menu option
- 2.
+ If you would like to know the JobId where a file was saved, select
+ restore menu option 2.
You can also use the {\bf query} command to find information such as:
\footnotesize
\end{verbatim}
\normalsize
+
\end{description}