18-Jul-2022 15:33:14.354059 dbcheck (100): cats/cats_backends.cc:71-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename dbi, partly_compare = true 18-Jul-2022 15:33:14.354398 dbcheck (100): cats/cats_backends.cc:71-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename mysql, partly_compare = false 18-Jul-2022 15:33:14.354756 dbcheck (100): cats/cats_backends.cc:71-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename postgresql, partly_compare = false 18-Jul-2022 15:33:14.355055 dbcheck (100): cats/cats_backends.cc:219-0 db_init_database: checking backend /usr/lib/bareos/backends/libbareoscats-postgresql.so 18-Jul-2022 15:33:14.360496 dbcheck (100): cats/cats_backends.cc:245-0 db_init_database: loaded backend /usr/lib/bareos/backends/libbareoscats-postgresql.so 18-Jul-2022 15:33:14.360820 dbcheck (100): cats/postgresql.cc:969-0 db_init_database first time 18-Jul-2022 15:33:14.364977 dbcheck (50): cats/postgresql.cc:226-0 pg_real_connect ok 18-Jul-2022 15:33:14.364993 dbcheck (50): cats/postgresql.cc:228-0 db_user=bareos db_name=bareos db_password= 18-Jul-2022 15:33:14.365001 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT VersionId FROM Version' 18-Jul-2022 15:33:14.365017 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT VersionId FROM Version' 18-Jul-2022 15:33:14.365630 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:14.365643 dbcheck (500): cats/postgresql.cc:627-0 we have 1 fields 18-Jul-2022 15:33:14.365649 dbcheck (500): cats/postgresql.cc:630-0 we have 1 rows 18-Jul-2022 15:33:14.365654 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:14.365660 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:14.365666 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:14.365671 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:14.365677 dbcheck (500): cats/postgresql.cc:720-0 we need space for 8 bytes 18-Jul-2022 15:33:14.365682 dbcheck (500): cats/postgresql.cc:730-0 SqlFetchRow row number '0' is acceptable (0..1) 18-Jul-2022 15:33:14.365688 dbcheck (500): cats/postgresql.cc:734-0 SqlFetchRow field '0' has value '2210' 18-Jul-2022 15:33:14.365694 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 561f40cba760 18-Jul-2022 15:33:14.365700 dbcheck (500): cats/postgresql.cc:574-0 SqlQueryWithHandler SqlFetchRow worked 18-Jul-2022 15:33:14.365707 dbcheck (800): cats/sql.cc:69-0 int_handler starts with row pointing at 40cba760 18-Jul-2022 15:33:14.365714 dbcheck (800): cats/sql.cc:72-0 int_handler finds '2210' 18-Jul-2022 15:33:14.365723 dbcheck (800): cats/sql.cc:78-0 int_handler finishes 18-Jul-2022 15:33:14.365729 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:14.365735 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '1' is NOT acceptable (0..1) 18-Jul-2022 15:33:14.365740 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:14.365748 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished 18-Jul-2022 15:33:14.365755 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SET datestyle TO 'ISO, YMD'' 18-Jul-2022 15:33:14.365944 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:14.365955 dbcheck (500): cats/postgresql.cc:627-0 we have 0 fields 18-Jul-2022 15:33:14.365961 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:14.365967 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:14.365972 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SET cursor_tuple_fraction=1' 18-Jul-2022 15:33:14.366194 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:14.366206 dbcheck (500): cats/postgresql.cc:627-0 we have 0 fields 18-Jul-2022 15:33:14.366211 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:14.366217 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:14.366223 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SET standard_conforming_strings=on' 18-Jul-2022 15:33:14.366407 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:14.366418 dbcheck (500): cats/postgresql.cc:627-0 we have 0 fields 18-Jul-2022 15:33:14.366424 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:14.366430 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:14.366436 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT getdatabaseencoding()' 18-Jul-2022 15:33:14.366761 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:14.366773 dbcheck (500): cats/postgresql.cc:627-0 we have 1 fields 18-Jul-2022 15:33:14.366779 dbcheck (500): cats/postgresql.cc:630-0 we have 1 rows 18-Jul-2022 15:33:14.366784 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:14.366790 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:14.366796 dbcheck (500): cats/postgresql.cc:720-0 we need space for 8 bytes 18-Jul-2022 15:33:14.366802 dbcheck (500): cats/postgresql.cc:730-0 SqlFetchRow row number '0' is acceptable (0..1) 18-Jul-2022 15:33:14.366807 dbcheck (500): cats/postgresql.cc:734-0 SqlFetchRow field '0' has value 'SQL_ASCII' 18-Jul-2022 15:33:14.366813 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 561f40cba760 18-Jul-2022 15:33:14.366821 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SET client_encoding TO 'SQL_ASCII'' 18-Jul-2022 15:33:14.366966 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:14.366977 dbcheck (500): cats/postgresql.cc:627-0 we have 0 fields 18-Jul-2022 15:33:14.366983 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:14.366989 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing Hello, this is the Bareos database check/correct program. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for Filenames with a trailing slash 18-Jul-2022 15:33:21.290429 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT FileId,Name from File WHERE Name LIKE '%/' 18-Jul-2022 15:33:21.290464 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT FileId,Name from File WHERE Name LIKE '%/'' 18-Jul-2022 15:33:21.290477 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT FileId,Name from File WHERE Name LIKE '%/'' 18-Jul-2022 15:33:29.337355 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:29.337401 dbcheck (500): cats/postgresql.cc:627-0 we have 2 fields 18-Jul-2022 15:33:29.337410 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:29.337418 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:29.337425 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:29.337433 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:29.337441 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:29.337448 dbcheck (500): cats/postgresql.cc:717-0 SqlFetchRow freeing space 18-Jul-2022 15:33:29.337456 dbcheck (500): cats/postgresql.cc:720-0 we need space for 16 bytes 18-Jul-2022 15:33:29.337463 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:29.337471 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:29.337488 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Found 0 bad Filename records. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for Paths without a trailing slash 18-Jul-2022 15:33:30.579008 dbcheck (100): cats/sql_query.cc:104-0 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) with query name get_bad_paths_0 (72) 18-Jul-2022 15:33:30.579052 dbcheck (100): cats/sql_query.cc:109-0 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) query is now SELECT PathId, Path FROM Path WHERE Path != '' AND Path NOT LIKE '%/' 18-Jul-2022 15:33:30.579066 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT PathId, Path FROM Path WHERE Path != '' AND Path NOT LIKE '%/' 18-Jul-2022 15:33:30.579080 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT PathId, Path FROM Path WHERE Path != '' AND Path NOT LIKE '%/' ' 18-Jul-2022 15:33:30.579092 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT PathId, Path FROM Path WHERE Path != '' AND Path NOT LIKE '%/' ' 18-Jul-2022 15:33:30.868905 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:30.868933 dbcheck (500): cats/postgresql.cc:627-0 we have 2 fields 18-Jul-2022 15:33:30.868939 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:30.868945 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:30.868950 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:30.868956 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:30.868961 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:30.868967 dbcheck (500): cats/postgresql.cc:720-0 we need space for 16 bytes 18-Jul-2022 15:33:30.868972 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:30.868978 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:30.868986 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Found 0 bad Path records. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for duplicate Path entries. 18-Jul-2022 15:33:32.266818 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT Path, count(Path) as Count FROM Path GROUP BY Path HAVING count(Path) > 1 18-Jul-2022 15:33:32.266851 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT Path, count(Path) as Count FROM Path GROUP BY Path HAVING count(Path) > 1' 18-Jul-2022 15:33:32.266864 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT Path, count(Path) as Count FROM Path GROUP BY Path HAVING count(Path) > 1' 18-Jul-2022 15:33:33.495330 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:33.495375 dbcheck (500): cats/postgresql.cc:627-0 we have 2 fields 18-Jul-2022 15:33:33.495388 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:33.495401 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:33.495413 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:33.495424 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:33.495436 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:33.495448 dbcheck (500): cats/postgresql.cc:720-0 we need space for 16 bytes 18-Jul-2022 15:33:33.495459 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:33.495471 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:33.495487 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Found 0 duplicate Path records. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for orphaned JobMedia entries. 18-Jul-2022 15:33:34.938853 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT JobMedia.JobMediaId,Job.JobId FROM JobMedia LEFT OUTER JOIN Job USING(JobId) WHERE Job.JobId IS NULL LIMIT 300000 18-Jul-2022 15:33:34.938885 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT JobMedia.JobMediaId,Job.JobId FROM JobMedia LEFT OUTER JOIN Job USING(JobId) WHERE Job.JobId IS NULL LIMIT 300000' 18-Jul-2022 15:33:34.938898 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT JobMedia.JobMediaId,Job.JobId FROM JobMedia LEFT OUTER JOIN Job USING(JobId) WHERE Job.JobId IS NULL LIMIT 300000' 18-Jul-2022 15:33:35.003199 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:35.003239 dbcheck (500): cats/postgresql.cc:627-0 we have 2 fields 18-Jul-2022 15:33:35.003251 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:35.003261 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:35.003272 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:35.003282 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:35.003292 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:35.003303 dbcheck (500): cats/postgresql.cc:720-0 we need space for 16 bytes 18-Jul-2022 15:33:35.003313 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:35.003324 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:35.003338 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for orphaned File entries. This may take some time! 18-Jul-2022 15:33:36.298954 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT File.FileId,Job.JobId FROM File LEFT OUTER JOIN Job USING (JobId) WHERE Job.JobId IS NULL LIMIT 300000 18-Jul-2022 15:33:36.298974 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT File.FileId,Job.JobId FROM File LEFT OUTER JOIN Job USING (JobId) WHERE Job.JobId IS NULL LIMIT 300000' 18-Jul-2022 15:33:36.298981 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT File.FileId,Job.JobId FROM File LEFT OUTER JOIN Job USING (JobId) WHERE Job.JobId IS NULL LIMIT 300000' 18-Jul-2022 15:33:37.419171 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:37.419196 dbcheck (500): cats/postgresql.cc:627-0 we have 2 fields 18-Jul-2022 15:33:37.419201 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:37.419207 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:37.419212 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:37.419217 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:37.419222 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:37.419227 dbcheck (500): cats/postgresql.cc:720-0 we need space for 16 bytes 18-Jul-2022 15:33:37.419232 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:37.419237 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:37.419245 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: 18-Jul-2022 15:33:38.379012 dbcheck (100): cats/sql_query.cc:104-0 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) with query name get_orphaned_paths_0 (71) 18-Jul-2022 15:33:38.379056 dbcheck (100): cats/sql_query.cc:109-0 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) query is now SELECT DISTINCT Path.PathId, File.PathId, Path.Path FROM Path LEFT JOIN File USING (PathId) LEFT JOIN PathHierarchy ON (Path.Pathid = PathHierarchy.PPathId) WHERE File.PathId IS NULL AND PathHierarchy.PPathId IS NULL LIMIT 300000 Checking for orphaned Path entries. This may take some time! 18-Jul-2022 15:33:38.379096 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT DISTINCT Path.PathId, File.PathId, Path.Path FROM Path LEFT JOIN File USING (PathId) LEFT JOIN PathHierarchy ON (Path.Pathid = PathHierarchy.PPathId) WHERE File.PathId IS NULL AND PathHierarchy.PPathId IS NULL LIMIT 300000 18-Jul-2022 15:33:38.379112 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT DISTINCT Path.PathId, File.PathId, Path.Path FROM Path LEFT JOIN File USING (PathId) LEFT JOIN PathHierarchy ON (Path.Pathid = PathHierarchy.PPathId) WHERE File.PathId IS NULL AND PathHierarchy.PPathId IS NULL LIMIT 300000 ' 18-Jul-2022 15:33:38.379125 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT DISTINCT Path.PathId, File.PathId, Path.Path FROM Path LEFT JOIN File USING (PathId) LEFT JOIN PathHierarchy ON (Path.Pathid = PathHierarchy.PPathId) WHERE File.PathId IS NULL AND PathHierarchy.PPathId IS NULL LIMIT 300000 ' 18-Jul-2022 15:33:43.328604 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:43.328631 dbcheck (500): cats/postgresql.cc:627-0 we have 3 fields 18-Jul-2022 15:33:43.328638 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:43.328644 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:43.328650 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:43.328656 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:43.328662 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:43.328668 dbcheck (500): cats/postgresql.cc:720-0 we need space for 24 bytes 18-Jul-2022 15:33:43.328674 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:43.328680 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:43.328690 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for orphaned FileSet entries. This takes some time! 18-Jul-2022 15:33:44.331015 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT FileSet.FileSetId,Job.FileSetId FROM FileSet LEFT OUTER JOIN Job USING(FileSetId) WHERE Job.FileSetId IS NULL 18-Jul-2022 15:33:44.331047 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT FileSet.FileSetId,Job.FileSetId FROM FileSet LEFT OUTER JOIN Job USING(FileSetId) WHERE Job.FileSetId IS NULL' 18-Jul-2022 15:33:44.331060 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT FileSet.FileSetId,Job.FileSetId FROM FileSet LEFT OUTER JOIN Job USING(FileSetId) WHERE Job.FileSetId IS NULL' 18-Jul-2022 15:33:44.537203 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:44.537242 dbcheck (500): cats/postgresql.cc:627-0 we have 2 fields 18-Jul-2022 15:33:44.537253 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:44.537263 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:44.537273 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:44.537283 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:44.537293 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:44.537302 dbcheck (500): cats/postgresql.cc:720-0 we need space for 16 bytes 18-Jul-2022 15:33:44.537312 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:44.537322 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:44.537336 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Found 0 orphaned FileSet records. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for orphaned Client entries. 18-Jul-2022 15:33:48.779024 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT Client.ClientId,Client.Name FROM Client LEFT OUTER JOIN Job USING(ClientId) WHERE Job.ClientId IS NULL 18-Jul-2022 15:33:48.779057 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT Client.ClientId,Client.Name FROM Client LEFT OUTER JOIN Job USING(ClientId) WHERE Job.ClientId IS NULL' 18-Jul-2022 15:33:48.779071 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT Client.ClientId,Client.Name FROM Client LEFT OUTER JOIN Job USING(ClientId) WHERE Job.ClientId IS NULL' 18-Jul-2022 15:33:48.781517 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:48.781548 dbcheck (500): cats/postgresql.cc:627-0 we have 2 fields 18-Jul-2022 15:33:48.781559 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:48.781569 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:48.781579 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:48.781589 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:48.781599 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:48.781609 dbcheck (500): cats/postgresql.cc:720-0 we need space for 16 bytes 18-Jul-2022 15:33:48.781619 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:48.781629 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:48.781643 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Found 0 orphaned Client records. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for orphaned Job entries. 18-Jul-2022 15:33:53.851204 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT Job.JobId,Job.Name FROM Job LEFT OUTER JOIN Client USING(ClientId) WHERE Client.Name IS NULL 18-Jul-2022 15:33:53.851236 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT Job.JobId,Job.Name FROM Job LEFT OUTER JOIN Client USING(ClientId) WHERE Client.Name IS NULL' 18-Jul-2022 15:33:53.851250 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT Job.JobId,Job.Name FROM Job LEFT OUTER JOIN Client USING(ClientId) WHERE Client.Name IS NULL' 18-Jul-2022 15:33:53.852600 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:53.852654 dbcheck (500): cats/postgresql.cc:627-0 we have 2 fields 18-Jul-2022 15:33:53.852698 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:53.852708 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:53.852719 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:53.852729 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:53.852739 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:53.852749 dbcheck (500): cats/postgresql.cc:720-0 we need space for 16 bytes 18-Jul-2022 15:33:53.852759 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:53.852769 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:53.852782 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Found 0 orphaned Job records. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for Admin Job entries. 18-Jul-2022 15:33:56.131014 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT Job.JobId FROM Job WHERE Job.Type='D' 18-Jul-2022 15:33:56.131034 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT Job.JobId FROM Job WHERE Job.Type='D'' 18-Jul-2022 15:33:56.131049 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT Job.JobId FROM Job WHERE Job.Type='D'' 18-Jul-2022 15:33:56.131735 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:56.131764 dbcheck (500): cats/postgresql.cc:627-0 we have 1 fields 18-Jul-2022 15:33:56.131778 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:56.131783 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:56.131788 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:56.131792 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:56.131797 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:56.131802 dbcheck (500): cats/postgresql.cc:720-0 we need space for 8 bytes 18-Jul-2022 15:33:56.131807 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:56.131812 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:56.131819 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Found 0 Admin Job records. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for Restore Job entries. 18-Jul-2022 15:33:59.939075 dbcheck (100): cats/sql_query.cc:149-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT Job.JobId FROM Job WHERE Job.Type='R' 18-Jul-2022 15:33:59.939108 dbcheck (500): cats/postgresql.cc:559-0 SqlQueryWithHandler starts with 'SELECT Job.JobId FROM Job WHERE Job.Type='R'' 18-Jul-2022 15:33:59.939122 dbcheck (500): cats/postgresql.cc:601-0 SqlQueryWithoutHandler starts with 'SELECT Job.JobId FROM Job WHERE Job.Type='R'' 18-Jul-2022 15:33:59.939961 dbcheck (500): cats/postgresql.cc:624-0 we have a result 18-Jul-2022 15:33:59.939987 dbcheck (500): cats/postgresql.cc:627-0 we have 1 fields 18-Jul-2022 15:33:59.939998 dbcheck (500): cats/postgresql.cc:630-0 we have 0 rows 18-Jul-2022 15:33:59.940008 dbcheck (500): cats/postgresql.cc:671-0 SqlQueryWithoutHandler finishing 18-Jul-2022 15:33:59.940018 dbcheck (500): cats/postgresql.cc:569-0 SqlQueryWithHandler succeeded. checking handler 18-Jul-2022 15:33:59.940028 dbcheck (500): cats/postgresql.cc:572-0 SqlQueryWithHandler invoking handler 18-Jul-2022 15:33:59.940038 dbcheck (500): cats/postgresql.cc:708-0 SqlFetchRow start 18-Jul-2022 15:33:59.940048 dbcheck (500): cats/postgresql.cc:720-0 we need space for 8 bytes 18-Jul-2022 15:33:59.940058 dbcheck (500): cats/postgresql.cc:740-0 SqlFetchRow row number '0' is NOT acceptable (0..0) 18-Jul-2022 15:33:59.940068 dbcheck (500): cats/postgresql.cc:744-0 SqlFetchRow finishes returning 0 18-Jul-2022 15:33:59.940081 dbcheck (500): cats/postgresql.cc:580-0 SqlQueryWithHandler finished Found 0 Restore Job records. Modify database is off. Verbose is on. Please select the function you want to perform. 0) Quit 1) Toggle modify database flag 2) Toggle verbose flag 3) Check for bad Filename records 4) Check for bad Path records 5) Check for duplicate Path records 6) Check for orphaned Jobmedia records 7) Check for orphaned File records 8) Check for orphaned Path records 9) Check for orphaned FileSet records 10) Check for orphaned Client records 11) Check for orphaned Job records 12) Check for orphaned storage records 13) Check for all Admin records 14) Check for all Restore records 15) Run ALL checks Select function number: Checking for orphaned Storage entries. Speicherzugriffsfehler