diff --git a/manuals/en/main/howto.tex b/manuals/en/main/howto.tex index 46e3620..be8f30e 100644 --- a/manuals/en/main/howto.tex +++ b/manuals/en/main/howto.tex @@ -756,3 +756,26 @@ \subsubsection{Backup of a MySQL Databases by using the bpipe plugin} } } \end{bconfig} + +If you do not want a direct restore of your data in your plugin directive, as shown in the examples above, +there is the possibility to restore the dump to the filesystem first, which offers you more control over the restore process, e.g.: +\begin{bconfig}{bpipe directive to backup a MySQL database and restore the dump to the filesystem first} +FileSet{ + Name = "mysql-all" + Include { + Plugin = "bpipe:/MYSQL/dump.sql:mysqldump --host= --user= --password= --opt --all-databases:/usr/lib/bareos/scripts/bpipe-restore.sh" + Options { + signature = MD5 + compression = gzip + } + } +} +\end{bconfig} + +A very simple corresponding shell script (bpipe-restore.sh) to the method above might look like the following one: +\begin{bconfig}{bpipe shell script for a restore to filesystem} +#!/bin/bash +cat - > /tmp/dump.sql +exit 0 +\end{bconfig} + diff --git a/manuals/en/main/plugins.tex b/manuals/en/main/plugins.tex index 2d8fb31..bf09f1c 100644 --- a/manuals/en/main/plugins.tex +++ b/manuals/en/main/plugins.tex @@ -68,3 +68,5 @@ \subsection{MSSQL Plugin} See chapter \ilink{Backup Of MSSQL Databases}{MSSQL}. +Even keep in mind that currently the plugin command is being stored as part of the backup. The restore command in your directive +should be flexible enough if things might change in future, otherwise you could run into trouble.