Re: [bareos-devel] Re: Creating tables in MySQL database

2021-07-25 Thread Andreas Rogge
Am 12.06.21 um 14:36 schrieb khvalera:
> on my system uses: mariadb
> 10.5.10
> To bypass the MySQL installation limitation, you need to add the
> variable "BAREOS_TEST_RUNNING=1" to the files:
>    /usr/lib/bareos/scripts/create_bareos_database
>    /usr/lib/bareos/scripts/make_bareos_tables
That's the intended effect of that variable, but as the name might give
away this is for (our automated) testing.
You will not be able to upgrade to Bareos 21 with a MySQL or MariaDB
catalog, as support for that is going away.

Best Regards,
Andreas

-- 
Andreas Rogge andreas.ro...@bareos.com
  Bareos GmbH & Co. KG  Phone: +49 221-630693-86
  http://www.bareos.com

  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
  Komplementär: Bareos Verwaltungs-GmbH
  Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-devel/c6f8b432-398b-973d-d6ba-af3aeed436f2%40bareos.com.


Re: [bareos-devel] Re: Creating tables in MySQL database

2021-06-12 Thread khvalera
on my system uses: mariadb 
10.5.10
To bypass the MySQL installation limitation, you need to add the variable "
BAREOS_TEST_RUNNING=1" to the files: 
   /usr/lib/bareos/scripts/create_bareos_database
   /usr/lib/bareos/scripts/make_bareos_tables


суббота, 12 июня 2021 г. в 14:34:31 UTC+3, philipp.storz: 

> Hello,
>
> thank you very much for your patch.
>
> What mysql version are you using?
>
> Also, I would like to point out that MySQL is deprecated as catalog 
> backend since Bareos 19.
>
> Please do not use mysql in new installations, use postgresql instead.
>
> See
>
>
> https://docs.bareos.org/IntroductionAndTutorial/InstallingBareos.html?highlight=mysql#decide-about-the-database-backend
>
>
> Am 10.06.21 um 15:44 schrieb khvalera:
> > Fix: backup-dir JobId 0: Fatal error: cats/sql_create.cc:96 Create DB 
> Job record INSERT INTO Job
> > (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) 
> VALUES ( ...
> > четверг, 10 июня 2021 г. в 14:23:47 UTC+3, khvalera:
> > 
> > 
> > четверг, 10 июня 2021 г. в 14:23:47 UTC+3, khvalera:
> > 
> > Made a patch for the mysql.sql file:
> > 
> > четверг, 10 июня 2021 г. в 12:05:16 UTC+3, khvalera:
> > 
> > bareos 20.0.1
> > 
> > четверг, 10 июня 2021 г. в 12:04:27 UTC+3, khvalera:
> > 
> > When executing */usr/lib/bareos/scripts/make_bareos_tables --user root 
> --password*, I
> > get the following error:
> > 
> > 
> > ERROR 1005 (HY000) at line 31: Can't create table `bareos`.`File` 
> (errno: 150 "Foreign
> > key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 55: Can't create table 
> `bareos`.`RestoreObject` (errno: 150
> > "Foreign key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 104: Can't create table `bareos`.`Job` 
> (errno: 150 "Foreign
> > key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 178: Can't create table 
> `bareos`.`LocationLog` (errno: 150
> > "Foreign key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 199: Can't create table `bareos`.`JobMedia` 
> (errno: 150
> > "Foreign key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 215: Can't create table `bareos`.`Media` 
> (errno: 150 "Foreign
> > key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 267: Can't create table `bareos`.`Pool` 
> (errno: 150 "Foreign
> > key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 310: Can't create table `bareos`.`Log` 
> (errno: 150 "Foreign
> > key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 319: Can't create table `bareos`.`BaseFiles` 
> (errno: 150
> > "Foreign key constraint is incorrectly formed")
> > ERROR 1146 (42S02) at line 328: Table 'bareos.BaseFiles' doesn't exist
> > ERROR 1005 (HY000) at line 378: Can't create table `bareos`.`Quota` 
> (errno: 150 "Foreign
> > key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 385: Can't create table 
> `bareos`.`NDMPLevelMap` (errno: 150
> > "Foreign key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 393: Can't create table 
> `bareos`.`NDMPJobEnvironment` (errno:
> > 150 "Foreign key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 401: Can't create table 
> `bareos`.`DeviceStats` (errno: 150
> > "Foreign key constraint is incorrectly formed")
> > ERROR 1005 (HY000) at line 417: Can't create table `bareos`.`JobStats` 
> (errno: 150
> > "Foreign key constraint is incorrectly formed")
> > Creation of Bareos MySQL tables succeeded.
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "bareos-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to
> > bareos-devel...@googlegroups.com  bareos-devel...@googlegroups.com>.
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/bareos-devel/63bfae92-60d4-4af1-a52d-c81b3eda9d1fn%40googlegroups.com
> > <
> https://groups.google.com/d/msgid/bareos-devel/63bfae92-60d4-4af1-a52d-c81b3eda9d1fn%40googlegroups.com?utm_medium=email_source=footer
> >.
>
>
> -- 
> Mit freundlichen Grüßen
>
> Philipp Storz philip...@bareos.com
> Bareos GmbH & Co. KG Phone: +49 221 63 06 93-92 <+49%20221%2063069392>
> http://www.bareos.com Fax: +49 221 63 06 93-10 <+49%20221%2063069310>
>
> Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
> Geschäftsführer: Stephan Dühr, M. Außendorf,
> J. Steffens, P. Storz
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-devel/32d78a4b-b05c-4757-b519-3baeb093d228n%40googlegroups.com.


Re: [bareos-devel] Re: Creating tables in MySQL database

2021-06-12 Thread Philipp Storz
Hello,

thank you very much for your patch.

What mysql version are you using?

Also, I would like to point out that MySQL is deprecated as catalog backend 
since Bareos 19.

Please do not use mysql in new installations, use postgresql instead.

See

https://docs.bareos.org/IntroductionAndTutorial/InstallingBareos.html?highlight=mysql#decide-about-the-database-backend


Am 10.06.21 um 15:44 schrieb khvalera:
> Fix: backup-dir JobId 0: Fatal error: cats/sql_create.cc:96 Create DB Job 
> record INSERT INTO Job
> (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ( 
> ...
> четверг, 10 июня 2021 г. в 14:23:47 UTC+3, khvalera:
> 
> 
> четверг, 10 июня 2021 г. в 14:23:47 UTC+3, khvalera:
> 
> Made a patch for the mysql.sql file:
> 
> четверг, 10 июня 2021 г. в 12:05:16 UTC+3, khvalera:
> 
> bareos 20.0.1
> 
> четверг, 10 июня 2021 г. в 12:04:27 UTC+3, khvalera:
> 
> When executing */usr/lib/bareos/scripts/make_bareos_tables --user 
> root --password*, I
> get the following error:
> 
> 
> ERROR 1005 (HY000) at line 31: Can't create table `bareos`.`File` 
> (errno: 150 "Foreign
> key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 55: Can't create table 
> `bareos`.`RestoreObject` (errno: 150
> "Foreign key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 104: Can't create table `bareos`.`Job` 
> (errno: 150 "Foreign
> key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 178: Can't create table 
> `bareos`.`LocationLog` (errno: 150
> "Foreign key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 199: Can't create table 
> `bareos`.`JobMedia` (errno: 150
> "Foreign key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 215: Can't create table 
> `bareos`.`Media` (errno: 150 "Foreign
> key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 267: Can't create table 
> `bareos`.`Pool` (errno: 150 "Foreign
> key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 310: Can't create table `bareos`.`Log` 
> (errno: 150 "Foreign
> key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 319: Can't create table 
> `bareos`.`BaseFiles` (errno: 150
> "Foreign key constraint is incorrectly formed")
> ERROR 1146 (42S02) at line 328: Table 'bareos.BaseFiles' doesn't 
> exist
> ERROR 1005 (HY000) at line 378: Can't create table 
> `bareos`.`Quota` (errno: 150 "Foreign
> key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 385: Can't create table 
> `bareos`.`NDMPLevelMap` (errno: 150
> "Foreign key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 393: Can't create table 
> `bareos`.`NDMPJobEnvironment` (errno:
> 150 "Foreign key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 401: Can't create table 
> `bareos`.`DeviceStats` (errno: 150
> "Foreign key constraint is incorrectly formed")
> ERROR 1005 (HY000) at line 417: Can't create table 
> `bareos`.`JobStats` (errno: 150
> "Foreign key constraint is incorrectly formed")
> Creation of Bareos MySQL tables succeeded.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "bareos-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to
> bareos-devel+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bareos-devel/63bfae92-60d4-4af1-a52d-c81b3eda9d1fn%40googlegroups.com
> .


-- 
Mit freundlichen Grüßen

 Philipp Storz philipp.st...@bareos.com
 Bareos GmbH & Co. KG  Phone: +49 221 63 06 93-92
 http://www.bareos.com Fax:   +49 221 63 06 93-10

 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
 Geschäftsführer: Stephan Dühr, M. Außendorf,
 J. Steffens, P. Storz

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-devel/3f112de1-5888-2daa-e708-e031782be3c0%40bareos.com.


[bareos-devel] Re: Creating tables in MySQL database

2021-06-10 Thread khvalera
Fix: backup-dir JobId 0: Fatal error: cats/sql_create.cc:96 Create DB Job 
record INSERT INTO Job 
(Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ( 
...
четверг, 10 июня 2021 г. в 14:23:47 UTC+3, khvalera: 


четверг, 10 июня 2021 г. в 14:23:47 UTC+3, khvalera: 

> Made a patch for the mysql.sql file: 
>
> четверг, 10 июня 2021 г. в 12:05:16 UTC+3, khvalera: 
>
>> bareos 20.0.1
>>
>> четверг, 10 июня 2021 г. в 12:04:27 UTC+3, khvalera: 
>>
>>> When executing */usr/lib/bareos/scripts/make_bareos_tables --user root 
>>> --password*, I get the following error:
>>>
>>>
>>> ERROR 1005 (HY000) at line 31: Can't create table `bareos`.`File` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 55: Can't create table 
>>> `bareos`.`RestoreObject` (errno: 150 "Foreign key constraint is incorrectly 
>>> formed") 
>>> ERROR 1005 (HY000) at line 104: Can't create table `bareos`.`Job` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 178: Can't create table 
>>> `bareos`.`LocationLog` (errno: 150 "Foreign key constraint is incorrectly 
>>> formed") 
>>> ERROR 1005 (HY000) at line 199: Can't create table `bareos`.`JobMedia` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 215: Can't create table `bareos`.`Media` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 267: Can't create table `bareos`.`Pool` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 310: Can't create table `bareos`.`Log` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 319: Can't create table `bareos`.`BaseFiles` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1146 (42S02) at line 328: Table 'bareos.BaseFiles' doesn't exist 
>>> ERROR 1005 (HY000) at line 378: Can't create table `bareos`.`Quota` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 385: Can't create table 
>>> `bareos`.`NDMPLevelMap` (errno: 150 "Foreign key constraint is incorrectly 
>>> formed") 
>>> ERROR 1005 (HY000) at line 393: Can't create table 
>>> `bareos`.`NDMPJobEnvironment` (errno: 150 "Foreign key constraint is 
>>> incorrectly formed") 
>>> ERROR 1005 (HY000) at line 401: Can't create table 
>>> `bareos`.`DeviceStats` (errno: 150 "Foreign key constraint is incorrectly 
>>> formed") 
>>> ERROR 1005 (HY000) at line 417: Can't create table `bareos`.`JobStats` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> Creation of Bareos MySQL tables succeeded.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-devel/63bfae92-60d4-4af1-a52d-c81b3eda9d1fn%40googlegroups.com.
--- a/core/src/cats/ddl/creates/mysql.sql	2021-06-10 16:14:05.373605979 +0300
+++ b/core/src/cats/ddl/creates/mysql.sql	2021-06-10 16:33:09.592630760 +0300
@@ -11,63 +11,6 @@
INDEX (Path(255))
 );
 
--- We strongly recommend to avoid the temptation to add new indexes.
--- In general, these will cause very significant performance
--- problems in other areas.  A better approach is to carefully check
--- that all your memory configuration parameters are
--- suitable for the size of your installation. If you backup
--- millions of files, you need to adapt the database memory
--- configuration parameters concerning sorting, joining and global
--- memory.  By default, sort and join parameters are very small
--- (sometimes 8Kb), and having sufficient memory specified by those
--- parameters is extremely important to run fast.
-
--- In File table
--- FileIndex is 0 for FT_DELETED files
--- Name is '' for directories
--- The index INDEX (PathId, JobId, FileIndex) is
--- important for bvfs performance, especially
--- for .bvfs_lsdirs which is used by bareos-webui.
-CREATE TABLE File (
-   FileId   BIGINTUNSIGNED  NOT NULL  AUTO_INCREMENT,
-   FileIndexINTEGER   UNSIGNEDDEFAULT 0,
-   JobIdINTEGER   UNSIGNED  NOT NULL  REFERENCES Job,
-   PathId   INTEGER   UNSIGNED  NOT NULL  REFERENCES Path,
-   DeltaSeq SMALLINT  UNSIGNEDDEFAULT 0,
-   MarkId   INTEGER   UNSIGNEDDEFAULT 0,
-   Fhinfo   NUMERIC(20)   DEFAULT 0,
-   Fhnode   NUMERIC(20)   DEFAULT 0,
-   LStatTINYBLOBNOT NULL,
-   MD5  TINYBLOBNOT NULL,
-   Name BLOBNOT NULL,
-   PRIMARY KEY (FileId),
-   INDEX (JobId, PathId, Name(255)),
-   INDEX (PathId, JobId, FileIndex)
-);
-
---
--- Possibly add one 

[bareos-devel] Re: Creating tables in MySQL database

2021-06-10 Thread khvalera
Fix: backup-dir JobId 0: Fatal error: cats/sql_create.cc:96 Create DB Job 
record INSERT INTO Job 
(Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES ( 
...
четверг, 10 июня 2021 г. в 14:23:47 UTC+3, khvalera: 

> Made a patch for the mysql.sql file: 
>
> четверг, 10 июня 2021 г. в 12:05:16 UTC+3, khvalera: 
>
>> bareos 20.0.1
>>
>> четверг, 10 июня 2021 г. в 12:04:27 UTC+3, khvalera: 
>>
>>> When executing */usr/lib/bareos/scripts/make_bareos_tables --user root 
>>> --password*, I get the following error:
>>>
>>>
>>> ERROR 1005 (HY000) at line 31: Can't create table `bareos`.`File` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 55: Can't create table 
>>> `bareos`.`RestoreObject` (errno: 150 "Foreign key constraint is incorrectly 
>>> formed") 
>>> ERROR 1005 (HY000) at line 104: Can't create table `bareos`.`Job` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 178: Can't create table 
>>> `bareos`.`LocationLog` (errno: 150 "Foreign key constraint is incorrectly 
>>> formed") 
>>> ERROR 1005 (HY000) at line 199: Can't create table `bareos`.`JobMedia` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 215: Can't create table `bareos`.`Media` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 267: Can't create table `bareos`.`Pool` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 310: Can't create table `bareos`.`Log` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 319: Can't create table `bareos`.`BaseFiles` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1146 (42S02) at line 328: Table 'bareos.BaseFiles' doesn't exist 
>>> ERROR 1005 (HY000) at line 378: Can't create table `bareos`.`Quota` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> ERROR 1005 (HY000) at line 385: Can't create table 
>>> `bareos`.`NDMPLevelMap` (errno: 150 "Foreign key constraint is incorrectly 
>>> formed") 
>>> ERROR 1005 (HY000) at line 393: Can't create table 
>>> `bareos`.`NDMPJobEnvironment` (errno: 150 "Foreign key constraint is 
>>> incorrectly formed") 
>>> ERROR 1005 (HY000) at line 401: Can't create table 
>>> `bareos`.`DeviceStats` (errno: 150 "Foreign key constraint is incorrectly 
>>> formed") 
>>> ERROR 1005 (HY000) at line 417: Can't create table `bareos`.`JobStats` 
>>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>>> Creation of Bareos MySQL tables succeeded.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-devel/03a7c885-3d72-4555-8541-aac97543d028n%40googlegroups.com.
--- a/core/src/cats/ddl/creates/mysql.sql	2021-06-10 16:14:05.373605979 +0300
+++ b/core/src/cats/ddl/creates/mysql.sql	2021-06-10 16:10:03.295855606 +0300
@@ -11,63 +11,6 @@
INDEX (Path(255))
 );
 
--- We strongly recommend to avoid the temptation to add new indexes.
--- In general, these will cause very significant performance
--- problems in other areas.  A better approach is to carefully check
--- that all your memory configuration parameters are
--- suitable for the size of your installation. If you backup
--- millions of files, you need to adapt the database memory
--- configuration parameters concerning sorting, joining and global
--- memory.  By default, sort and join parameters are very small
--- (sometimes 8Kb), and having sufficient memory specified by those
--- parameters is extremely important to run fast.
-
--- In File table
--- FileIndex is 0 for FT_DELETED files
--- Name is '' for directories
--- The index INDEX (PathId, JobId, FileIndex) is
--- important for bvfs performance, especially
--- for .bvfs_lsdirs which is used by bareos-webui.
-CREATE TABLE File (
-   FileId   BIGINTUNSIGNED  NOT NULL  AUTO_INCREMENT,
-   FileIndexINTEGER   UNSIGNEDDEFAULT 0,
-   JobIdINTEGER   UNSIGNED  NOT NULL  REFERENCES Job,
-   PathId   INTEGER   UNSIGNED  NOT NULL  REFERENCES Path,
-   DeltaSeq SMALLINT  UNSIGNEDDEFAULT 0,
-   MarkId   INTEGER   UNSIGNEDDEFAULT 0,
-   Fhinfo   NUMERIC(20)   DEFAULT 0,
-   Fhnode   NUMERIC(20)   DEFAULT 0,
-   LStatTINYBLOBNOT NULL,
-   MD5  TINYBLOBNOT NULL,
-   Name BLOBNOT NULL,
-   PRIMARY KEY (FileId),
-   INDEX (JobId, PathId, Name(255)),
-   INDEX (PathId, JobId, FileIndex)
-);
-
---
--- Possibly add one or more of the following indexes
---  to the above File 

[bareos-devel] Re: Creating tables in MySQL database

2021-06-10 Thread khvalera
Made a patch for the mysql.sql file: 

четверг, 10 июня 2021 г. в 12:05:16 UTC+3, khvalera: 

> bareos 20.0.1
>
> четверг, 10 июня 2021 г. в 12:04:27 UTC+3, khvalera: 
>
>> When executing */usr/lib/bareos/scripts/make_bareos_tables --user root 
>> --password*, I get the following error:
>>
>>
>> ERROR 1005 (HY000) at line 31: Can't create table `bareos`.`File` (errno: 
>> 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 55: Can't create table 
>> `bareos`.`RestoreObject` (errno: 150 "Foreign key constraint is incorrectly 
>> formed") 
>> ERROR 1005 (HY000) at line 104: Can't create table `bareos`.`Job` (errno: 
>> 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 178: Can't create table `bareos`.`LocationLog` 
>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 199: Can't create table `bareos`.`JobMedia` 
>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 215: Can't create table `bareos`.`Media` 
>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 267: Can't create table `bareos`.`Pool` 
>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 310: Can't create table `bareos`.`Log` (errno: 
>> 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 319: Can't create table `bareos`.`BaseFiles` 
>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1146 (42S02) at line 328: Table 'bareos.BaseFiles' doesn't exist 
>> ERROR 1005 (HY000) at line 378: Can't create table `bareos`.`Quota` 
>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 385: Can't create table 
>> `bareos`.`NDMPLevelMap` (errno: 150 "Foreign key constraint is incorrectly 
>> formed") 
>> ERROR 1005 (HY000) at line 393: Can't create table 
>> `bareos`.`NDMPJobEnvironment` (errno: 150 "Foreign key constraint is 
>> incorrectly formed") 
>> ERROR 1005 (HY000) at line 401: Can't create table `bareos`.`DeviceStats` 
>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>> ERROR 1005 (HY000) at line 417: Can't create table `bareos`.`JobStats` 
>> (errno: 150 "Foreign key constraint is incorrectly formed") 
>> Creation of Bareos MySQL tables succeeded.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-devel/8af9e1b1-759e-4815-8d93-11ec552c5f3dn%40googlegroups.com.
--- a/mysql.sql	2021-04-18 23:36:17.0 +0300
+++ b/mysql.sql	2021-06-10 13:57:00.0 +0300
@@ -11,63 +11,6 @@
INDEX (Path(255))
 );
 
--- We strongly recommend to avoid the temptation to add new indexes.
--- In general, these will cause very significant performance
--- problems in other areas.  A better approach is to carefully check
--- that all your memory configuration parameters are
--- suitable for the size of your installation. If you backup
--- millions of files, you need to adapt the database memory
--- configuration parameters concerning sorting, joining and global
--- memory.  By default, sort and join parameters are very small
--- (sometimes 8Kb), and having sufficient memory specified by those
--- parameters is extremely important to run fast.
-
--- In File table
--- FileIndex is 0 for FT_DELETED files
--- Name is '' for directories
--- The index INDEX (PathId, JobId, FileIndex) is
--- important for bvfs performance, especially
--- for .bvfs_lsdirs which is used by bareos-webui.
-CREATE TABLE File (
-   FileId   BIGINTUNSIGNED  NOT NULL  AUTO_INCREMENT,
-   FileIndexINTEGER   UNSIGNEDDEFAULT 0,
-   JobIdINTEGER   UNSIGNED  NOT NULL  REFERENCES Job,
-   PathId   INTEGER   UNSIGNED  NOT NULL  REFERENCES Path,
-   DeltaSeq SMALLINT  UNSIGNEDDEFAULT 0,
-   MarkId   INTEGER   UNSIGNEDDEFAULT 0,
-   Fhinfo   NUMERIC(20)   DEFAULT 0,
-   Fhnode   NUMERIC(20)   DEFAULT 0,
-   LStatTINYBLOBNOT NULL,
-   MD5  TINYBLOBNOT NULL,
-   Name BLOBNOT NULL,
-   PRIMARY KEY (FileId),
-   INDEX (JobId, PathId, Name(255)),
-   INDEX (PathId, JobId, FileIndex)
-);
-
---
--- Possibly add one or more of the following indexes
---  to the above File table if your Verifies are
---  too slow, but they can slow down backups.
---
---  INDEX (PathId),
-
-CREATE TABLE RestoreObject (
-   RestoreObjectId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
-   ObjectName BLOB NOT NULL,
-   RestoreObject LONGBLOB NOT NULL,
-   PluginName TINYBLOB NOT NULL,
-   ObjectLength INTEGER DEFAULT 0,
-   

[bareos-devel] Re: Creating tables in MySQL database

2021-06-10 Thread khvalera
bareos 20.0.1

четверг, 10 июня 2021 г. в 12:04:27 UTC+3, khvalera: 

> When executing */usr/lib/bareos/scripts/make_bareos_tables --user root 
> --password*, I get the following error:
>
>
> ERROR 1005 (HY000) at line 31: Can't create table `bareos`.`File` (errno: 
> 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 55: Can't create table `bareos`.`RestoreObject` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 104: Can't create table `bareos`.`Job` (errno: 
> 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 178: Can't create table `bareos`.`LocationLog` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 199: Can't create table `bareos`.`JobMedia` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 215: Can't create table `bareos`.`Media` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 267: Can't create table `bareos`.`Pool` (errno: 
> 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 310: Can't create table `bareos`.`Log` (errno: 
> 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 319: Can't create table `bareos`.`BaseFiles` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1146 (42S02) at line 328: Table 'bareos.BaseFiles' doesn't exist 
> ERROR 1005 (HY000) at line 378: Can't create table `bareos`.`Quota` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 385: Can't create table `bareos`.`NDMPLevelMap` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 393: Can't create table 
> `bareos`.`NDMPJobEnvironment` (errno: 150 "Foreign key constraint is 
> incorrectly formed") 
> ERROR 1005 (HY000) at line 401: Can't create table `bareos`.`DeviceStats` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> ERROR 1005 (HY000) at line 417: Can't create table `bareos`.`JobStats` 
> (errno: 150 "Foreign key constraint is incorrectly formed") 
> Creation of Bareos MySQL tables succeeded.
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-devel/b354e418-3ed4-4553-921c-41f435b40904n%40googlegroups.com.