On Monday, June 2, 2014 7:48:20 PM UTC+2, Marco van Wieringen wrote:
> Xinity <rzarouali <at> gmail.com> writes:
>
>
>
> >
>
> > hi all,
>
> >
>
> > we are trying to use the bpipe plugin to dump our mysql databases backup.
>
> > as our mysqldump are per database (one dump per database) is there any
>
> > option that we can use with bpipe to get all mysql databases dumps at
>
> > once , but in seperated files , not in a> single .sql file ?
>
> Nope as the bpipe plugin just captures the output of the program it will
>
> only write one "virtual filename" to the backup. The only real thing you
>
> can do is use multiple bpipe lines one per database. As you can generate
>
> the fileset on the fly you should be able to even script this. For
>
> postgresql I once wrote something like this:
>
>
>
> ${SU} ${RUN_AS} -c "${PG_PSQL} -d template1 -q -t -A -c \
>
> "select datname from pg_database where not datname in ('template0') order by
>
> datname;" | \
>
> while read dbname
>
> do
>
> if [ ! -z "${dbname}" ]; then
>
> echo "bpipe:/PGSQL/$dbname.dump:/etc/opt/ELMbareos/bareos_backup_pgsql
>
> $dbname:/etc/opt/ELMbareos/bareos_restore_pgsql $dbname"
>
> fi
>
> done
>
>
>
> You use is like this in a fileset (the above is in a separate shellscript):
>
>
>
> Fileset {
>
> Name = PostgresqlDataDump
>
> Include {
>
> Plugin = "\\|/etc/opt/ELMbareos/bareos_pgsql_manager"
>
> }
>
> }
>
>
>
> The bareos_backup_pgsql is just a shell wrapper around pg_dump and
>
> bareos_restore_pgsql is a wrapper around pg_restore so things exit with
>
> the right exit value (0). The bareos_pgsql_manager script has some more
>
> option parsing etc.
>
>
>
> Based on this you should be able to create something similar for MySQL.
>
> I would first try to create something that outputs the right bpipe plugin
>
> lines before trying to run it as part of a Fileset.
>
>
>
> I never finished this particular one but I do run a script auto
>
> autogenerate my Solaris backups by parsing the currently mounted
>
> filesystems and allow things to be auto snapshot by using ZFS snapshots
>
> and so generate the fileset. That has been working fine for about 5 years
>
> now. So the whole concept of auto generating your fileset is proven to
>
> work well.
>
>
>
> --
>
> Marco van Wieringen [email protected]
>
> Bareos GmbH & Co. KG Phone: +49-221-63069389
>
> http://www.bareos.com
>
>
>
> Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
>
> Komplementär: Bareos Verwaltungs-GmbH
>
> Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens,
>
> P. Storz, M. v. Wieringen
i see the idea,
but i'm not sure to understand what you mean by generating fileset on the fly ?
can you please explain a little more, with you previous example for background ?
thanks a lot,
Regards
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.