use postgresql not mysql

53 views
Skip to first unread message

Chad W Seys

unread,
Jan 10, 2020, 11:27:42 AM1/10/20
to bareos-users
Hi all,
Public service announcement: If you're setting up bareos for the
first time, just use postgresql.

Awhile back we started trying Bareos as a replacement for a
commercial backup solution. I used mysql (mariadb actually) as a
backend b/c it was listed as supported on the setup page. Debian Stretch.
It showed promise until it got into the millions of files. At some
point mysql start showing 100% CPU usage and backups stalled.
Eventually remembering that postgresql was the recommended database I
tried that. The problem has not reoccurred!

I'm sure with enough know-how or a newer version mariadb, etc., mariadb
could be gotten to work. But I don't want to become a DB expert or
fanboy, I just want to get backups done.

Also, I wonder how many people trying out bareos for the first time use
mariadb and then give up bareos when backups stall out? IMHO it would
be wise to list mariadb/mysql as for testing purposes only to avoid
losing potential users/customers who get a bad impression of bareos b/c
the kind of prefer mariadb but don't really care.

Hope that helps someone!
Chad.

Andy Bird

unread,
Jan 10, 2020, 11:49:17 AM1/10/20
to bareos-users
is it possible to swith?
I installed mysql out of familiarity but the db is already MASSIVE ie 17gb with only around a dozen test clients

Chad W Seys

unread,
Jan 10, 2020, 1:05:36 PM1/10/20
to Andy Bird, bareos-users
> is it possible to swith?
> I installed mysql out of familiarity but the db is already MASSIVE ie
> 17gb with only around a dozen test clients

I bscan-ed the volumes once the server was set up using postgresql as
disaster recovery practice.

But if the problem isn't biting you, maybe don't switch?

The bareos documentation also mentions mysql compaction. Maybe that
would reduce the size of your DB?
https://docs.bareos.org/TasksAndConcepts/CatalogMaintenance.html#section-mysqlsupport

Chad.

Chad W Seys

unread,
Jan 10, 2020, 1:13:35 PM1/10/20
to bareos...@googlegroups.com
Actually, just read that the size of the file won't shrink after
compaction "Please note that the database files are never shrunk by MySQL."

Brock Palen

unread,
Jan 10, 2020, 1:49:53 PM1/10/20
to Chad W Seys, bareos...@googlegroups.com
I agree start with psql, I started with MySQL/MariaDB because it’s what I knew best and had used for years with Bacula before. Now I have remote clients that there is no way for me to start over and stuck with it.

I have several million files in MySQL and pruning/accurate some of the lager clients takes several minutes.

I run a mysql optimize and rebuild the tables (I use file per-table as in the docs) and my growth has been limited to about 40GB, It’s manageable.

But yes start with PSQL, and yes I wish there was a way to migrate without doing a big bscan.
> --
> 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 bareos-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/155b97c1-04cc-12ab-8f54-529ace85ad6f%40physics.wisc.edu.

Wolfgang Denk

unread,
Jan 11, 2020, 6:01:12 AM1/11/20
to Brock Palen, Chad W Seys, bareos...@googlegroups.com
Dear Brock,

In message <1E820011-2CAA-48FB...@mlds-networks.com> you wrote:
>
> But yes start with PSQL, and yes I wish there was a way to
> migrate without doing a big bscan.

It should be possible, but I have to admit that I don't have
experience with bareos. I did this once (years ago) with bacula:
dump the DB in MySQL, fix some incompatibilities (using sed), and
import in PostgreSQL. I would expect the procedure would not be
much different in bareos. Yes, it takes some efforts, but
definitely much less than rescanning a large number of tapes.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
GUIs are virtually useless. Learn tools. They're configurable,
scriptable, automatable, cron-able, interoperable, etc. We don't need
no brain-dead winslurping monolithic claptrap.
-- Tom Christiansen in 371140df@csnews

Kai Zimmer

unread,
Jan 13, 2020, 3:37:41 AM1/13/20
to Andy Bird, bareos-users
On 10.01.2020 17:49, Andy Bird wrote:
> is it possible to swith?
The easiest way is probably to add a second Catalog with the postgresql
driver. After that you will be asked to choose the Catalog in bconsole.

Kai

Chad W Seys

unread,
Feb 1, 2020, 4:50:15 PM2/1/20
to bareos...@googlegroups.com
Hi all,
Looks like the bareos developers have created a tool to migrate from
mysql to postgresql:

"bareos-dbcopy command line tool: The new bareos-dbcopy command line
tool can copy the bareos database from MySQL to PostgreSQL. As
bareos-dbcopy is still in an early stage of development, we currently
see it as technical preview and are interested in feedback and ask for
special care when using it. Do not delete your old catalog database
before you are really sure that everything works on the new catalog!"
https://docs.bareos.org/Appendix/ReleaseNotes.html

Chad.
Reply all
Reply to author
Forward
0 new messages