View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001429 | bareos-core | documentation | public | 2022-02-14 16:29 | 2022-11-10 16:52 |
Reporter | abaguinski | Assigned To | bruno-at-bareos | ||
Priority | high | Severity | major | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | 20.0.5 | ||||
Summary | 0001429: Mysql to Postgres migration howto doesn't explain how to initialise the postgres database | ||||
Description | I'm trying to figure out how to migrate the catalog from mysql to postgres but I think I'm missing something. The howto (https://docs.bareos.org/Appendix/Howtos.html#prepare-the-new-database) suggests: "Firstly, create a new PostgreSQL database as described in Prepare Bareos database" and links to this document: "https://docs.bareos.org/IntroductionAndTutorial/InstallingBareos.html#prepare-bareos-database", which in turn instructs to run a series of commands that would initialize the database (https://docs.bareos.org/IntroductionAndTutorial/InstallingBareos.html#id9): su postgres -c /usr/lib/bareos/scripts/create_bareos_database su postgres -c /usr/lib/bareos/scripts/make_bareos_tables su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges However these commands assume that I mean the currently configured Mysql catalog and fail because Mysql catalog is deprecated: su postgres -c /usr/lib/bareos/scripts/create_bareos_database Creating mysql database The MySQL database backend is deprecated. Please use PostgreSQL instead. Creating of bareos database failed. Does that mean I first have to "Add the new PostgreSQL database to the current Bareos Director configuration" (second sentence of the Howto section) and only then go back to the first sentence? Shouldn't the sentences be swapped then (except for "Firstly, ")? And will the create_bareos_database understand which catalog I mean when I configure two catalogs at the same time? | ||||
Steps To Reproduce | 1. Install bareos 19 with mysql catalog 2. upgrade to bareos 20 3. try to follow the how exactly how it is written | ||||
Tags | No tags attached. | ||||
I've been able to reproduce the problem, which is due to missing keywords into the documentation. (Passing the dbdriver to scripts) at the postgresql create database stage could you retry by using this commands su - postgres /usr/lib/bareos/scripts/create_bareos_database postgresql su - postgres /usr/lib/bareos/scripts/make_bareos_tables postgresql su - postgres /usr/lib/bareos/scripts/grant_bareos_privileges postgresql After that you should be able to use bareos-dbcopy as documented. Thanks to confirm this works for you, I will then propose and update to the documentation. |
|
Hi Thanks for your reaction! In the mean time we were able to migrate to postgres with a slight difference in the order of steps: 1 added the new catalog resource to the director configuration, 2 created and initialized the postgres database using these scripts. Indeed we've found that the 'postgresql' argument was necessary. Since we have done it already in this order I unfortunately cannot confirm if only adding the argument was enough (i.e. would the scripts with extra argument work without the catalog resource) Greetings, Artem |
|
Thanks for your feedback, Yes the script would have worked without the second catalog resource, when you give them the dbtype. I will update the documentation to be more precise in that sense. |
|
PR#1093 and PR#1094 in review actually | |
PR1094 for updating documentation has been merged. | |
bareos: master e3575c96 2022-03-01 15:20 Ported: N/A Details Diff |
docs: Improve Howto Migrate Mysql to Postgresql. - Document PostgreSQL creation scripts with dbtype. BUG 0001429 - Clarify execution command sequence by reordering blocks. Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com> |
Affected Issues 0001429 |
|
mod - docs/manuals/source/Appendix/Howtos/MigrateABareosCatalogFromMySqlToPostgresql.rst.inc | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-02-14 16:29 | abaguinski | New Issue | |
2022-02-24 15:53 | bruno-at-bareos | Assigned To | => bruno-at-bareos |
2022-02-24 15:53 | bruno-at-bareos | Status | new => assigned |
2022-02-24 15:56 | bruno-at-bareos | Note Added: 0004527 | |
2022-02-25 08:51 | abaguinski | Note Added: 0004528 | |
2022-02-28 09:29 | bruno-at-bareos | Note Added: 0004529 | |
2022-03-01 15:33 | bruno-at-bareos | Note Added: 0004530 | |
2022-03-17 14:11 | bruno-at-bareos | Changeset attached | => bareos master e3575c96 |
2022-03-21 10:56 | bruno-at-bareos | Status | assigned => resolved |
2022-03-21 10:56 | bruno-at-bareos | Resolution | open => fixed |
2022-03-21 10:56 | bruno-at-bareos | Note Added: 0004543 | |
2022-11-10 16:52 | arogge_adm | Relationship added | related to 0001433 |