Hello Chris, Many thanks for your checking and for providing your configuration. Yes, these comma characters ",," break the JSON structure.
I did a couple more tests with your config. The problem is in the following directives: Append = /var/log/bacula/bacula.log = !Debug, !Saved, !Skipped Console = !Debug, !Saved, !Skipped To use negation with message types keywords like !Debug or !Saved, there is needed to use 'All' keyword before them. It looks that Bacula doesn't check it and bdirjson in this situation produces invalid JSON string. In my opinion Bacula could do this kind of validation to warn users about incorrect setting. I opened a ticket for that in the Bacula Bug Tracker: https://bugs.bacula.org/view.php?id=2579 Best regards, Marcin Haba (gani) On Sat, 31 Oct 2020 at 18:27, Chris Wilkinson <winstonia...@gmail.com> wrote: > > Hello Marcin > > Many thanks for that suggestion. The results of that test follow. > > Debugging was first enabled in api.conf. The JSON output between the [..] > extracted from baculum-api.log is below is saved in file baculum-api-log.txt. > Piping this output through json_pp gives a parse error at position 20605. In > the JSON output this corresponds to the sequence ',,’. This is highlighted in > the dump below. This sequence comes from the “Standard” message section of > bacula-dir.conf, copied below. I can’t see anything wrong with it but others > might do better! > > ==> > ... > ####################################################### > Messages { > Name = "Daemon" > MailCommand = "/usr/sbin/bsmtp -h localhost -f \"(Bacula) <%r>\" -s > \"Bacula daemon message\" %r" > Mail = root@localhost = Fatal, Error, Warning, Mount > Append = /var/log/bacula/bacula.log = !Debug, !Saved, !Skipped > Console = !Debug, !Saved, !Skipped > } > Messages { > Name = "Standard" > MailCommand = "/usr/sbin/bsmtp -h localhost -f \"(Bacula) > no-reply@homeserver \" -s \"Bacula: %t %e of %c %l\" %r" > OperatorCommand = "/usr/sbin/bsmtp -h localhost -f \"(Bacula) > no-reply@homeserver \" -s \"Bacula: Intervention needed for %j\" %r" > Mail = root@localhost = Fatal, Error, Warning, Mount > Append = /var/log/bacula/bacula.log = !Debug, !Saved, !Skipped > Console = !Debug, !Saved, !Skipped > Operator = root@localhost = Fatal, Error, Warning, Mount > Catalog = All, !Debug, !Skipped, !Saved > } > Console { > … > ==> > > $ cat baculum-api-log.txt | json_pp > malformed JSON string, neither array, object, number, string or atom, at > character offset 20605 (before ", ] }},{ "Messa...") at /usr/bin/json_pp > line 43. > > “baculum-api-log.txt" > [{ "Director": { "Name": "homeserver-dir", "Messages": "Standard", > "DirAddress": "192.168.1.126", "QueryFile": > "/etc/bacula/scripts/query.sql", "WorkingDirectory": "/var/lib/bacula", > "PidDirectory": "/var/run", "MaximumConcurrentJobs": 5, "Password": > "sQQWWvZ_FJLUEndP7iwhPdP919dacJLAa" }},{ "Client": { "Name": > "archive-fd", "Address": "192.168.1.126", "FdPort": 9102, > "Password": "Lm-xTHnS68QS-B21MFiqEhYCvCnJQkMUf2", "Catalog": "MyCatalog", > "FileRetention": 94608000, "JobRetention": 94608000, "AutoPrune": > true }},{ "Client": { "Name": "catalog-fd", "Address": > "192.168.1.126", "FdPort": 9102, "Password": > "Lm-xTHnS68QS-B21MFiqEhYCvCnJQkMUf2", "Catalog": "MyCatalog", > "FileRetention": 5184000, "JobRetention": 5184000, "AutoPrune": true > }},{ "Client": { "Name": "home-fd", "Address": "192.168.1.126", > "FdPort": 9102, "Password": "Lm-xTHnS68QS-B21MFiqEhYCvCnJQkMUf2", > "Catalog": "MyCatalog", "FileRetention": 31536000, "JobRetention": > 31536000, "AutoPrune": true }},{ "Client": { "Name": "media-fd", > "Address": "192.168.1.126", "FdPort": 9102, "Password": > "Lm-xTHnS68QS-B21MFiqEhYCvCnJQkMUf2", "Catalog": "MyCatalog", > "FileRetention": 31536000, "JobRetention": 31536000, "AutoPrune": true > }},{ "Job": { "Name": "BackupCatalog", "Type": "Backup", "Level": > "Full", "Messages": "Standard", "Storage": ["catalog-sd"], "Pool": > "file_catalog", "Client": "catalog-fd", "Fileset": "Catalog", > "Schedule": "catalogDaily", "WriteBootstrap": "/var/lib/bacula/%n.bsr", > "SpoolAttributes": true, "Runscript": [ { "RunsWhen": > "Before", "RunsOnClient": false, "Command": > "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog" }, { > "RunsWhen": "Before", "RunsOnClient": false, "Console": "prune > expired volume yes" }, { "RunsWhen": "After", > "RunsOnClient": false, "Command": > "/etc/bacula/scripts/delete_catalog_backup" }, { "RunsWhen": > "After", "RunsOnClient": false, "Console": "purge volume > action=truncate pool=file_catalog storage=catalog-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": "purge > volume action=truncate pool=pool_full storage=home-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": "purge > volume action=truncate pool=pool_incr storage=home-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": "purge > volume action=truncate pool=pool_diff storage=home-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": "purge > volume action=truncate pool=media-full storage=media-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": "purge > volume action=truncate pool=media-incr storage=media-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": "purge > volume action=truncate pool=media-diff storage=media-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": "purge > volume action=truncate pool=archived-full storage=archive-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": > "purge volume action=truncate pool=archived-incr storage=archive-sd" }, > { "RunsWhen": "After", "RunsOnClient": false, > "Console": "purge volume action=truncate pool=archived-diff > storage=archive-sd" }, { "RunsWhen": "After", > "RunsOnClient": false, "Console": "purge volume action=truncate > pool=media2-full storage=media-sata3tb-sd" }, { "RunsWhen": > "After", "RunsOnClient": false, "Console": "purge volume > action=truncate pool=media2-incr storage=media-sata3tb-sd" }, { > "RunsWhen": "After", "RunsOnClient": false, "Console": > "purge volume action=truncate pool=media2-diff storage=media-sata3tb-sd" > } ], "Priority": 11 }},{ "Job": { "Name": "RestoreHome", > "Type": "Restore", "Level": "Full", "Messages": "Standard", > "Storage": ["home-sd"], "Pool": "pool_full", "Client": "home-fd", > "Fileset": "home", "Schedule": "sched_none", "Where": "/" }},{ "Job": > { "Name": "archived", "Type": "Backup", "Level": "Full", > "Messages": "Standard", "Storage": ["archive-sd"], "Pool": > "archived-full", "FullBackupPool": "archived-full", > "IncrementalBackupPool": "archived-incr", "DifferentialBackupPool": > "archived-diff", "Client": "archive-fd", "Fileset": "archived", > "Schedule": "archived", "SpoolAttributes": true }},{ "Job": { "Name": > "home", "Type": "Backup", "Level": "Full", "Messages": "Standard", > "Storage": ["home-sd"], "Pool": "pool_full", "FullBackupPool": > "pool_full", "IncrementalBackupPool": "pool_incr", > "DifferentialBackupPool": "pool_diff", "Client": "home-fd", "Fileset": > "home", "Schedule": "home", "SpoolAttributes": true }},{ "Job": { > "Name": "media", "Type": "Backup", "Level": "Full", "Messages": > "Standard", "Storage": ["media-sd"], "Pool": "media-full", > "FullBackupPool": "media-full", "IncrementalBackupPool": "media-incr", > "DifferentialBackupPool": "media-diff", "Client": "media-fd", > "Fileset": "media", "Schedule": "media", "SpoolAttributes": true }},{ > "Job": { "Name": "media2", "Type": "Backup", "Level": "Full", > "Messages": "Standard", "Storage": ["media-sata3tb-sd"], "Pool": > "media2-full", "Client": "media-fd", "Fileset": "media", "Schedule": > "media2" }},{ "Storage": { "Name": "archive-sd", "SdPort": 9103, > "Address": "192.168.1.126", "Password": > "lFPsaaIQDpOHdwRmXe66xt4jiyQUjNXHI", "Device": ["raid0"], "MediaType": > "file", "MaximumConcurrentJobs": 20 }},{ "Storage": { "Name": > "catalog-sd", "SdPort": 9103, "Address": "192.168.1.126", > "Password": "lFPsaaIQDpOHdwRmXe66xt4jiyQUjNXHI", "Device": > ["catalog-dev"], "MediaType": "file_catalog", "MaximumConcurrentJobs": > 5 }},{ "Storage": { "Name": "home-sd", "SdPort": 9103, "Address": > "192.168.1.126", "Password": "lFPsaaIQDpOHdwRmXe66xt4jiyQUjNXHI", > "Device": ["readynas"], "MediaType": "file", "MaximumConcurrentJobs": > 20 }},{ "Storage": { "Name": "media-sata3tb-sd", "SdPort": 9103, > "Address": "192.168.1.126", "Password": > "lFPsaaIQDpOHdwRmXe66xt4jiyQUjNXHI", "Device": ["sata3tb"], > "MediaType": "file", "MaximumConcurrentJobs": 20 }},{ "Storage": { > "Name": "media-sd", "SdPort": 9103, "Address": "192.168.1.126", > "Password": "lFPsaaIQDpOHdwRmXe66xt4jiyQUjNXHI", "Device": ["raid0"], > "MediaType": "file", "MaximumConcurrentJobs": 20 }},{ "Catalog": { > "Name": "MyCatalog", "Address": "127.0.0.1", "Password": "haT673", > "User": "bacula", "DbName": "bacula" }},{ "Schedule": { "Name": > "archived", "Run": [ { "Pool": "archived-full", "Level": > "Full", "Hour": [0], "Minute": 0, "Day": [0], "Month": > [0], "DayOfWeek": [0, 1, 2, 3, 4, 5, 6], "WeekOfMonth": [0, 1, 2, > 3, 4, 5], "WeekOfYear": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, > 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, > 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, > 52, 53] }, { "Pool": "archived-diff", "Level": > "Differential", "Hour": [0], "Minute": 0, "Day": [0, 1, 2, 3, > 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, > 25, 26, 27, 28, 29, 30], "Month": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, > 11], "DayOfWeek": [1], "WeekOfMonth": [0], "WeekOfYear": [0, > 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, > 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, > 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53] }, { "Pool": > "archived-incr", "Level": "Incremental", "Hour": [3], > "Minute": 25, "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, > 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], > "Month": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "DayOfWeek": [0, 1, 2, > 3, 4, 5, 6], "WeekOfMonth": [0, 1, 2, 3, 4, 5], "WeekOfYear": [0, > 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, > 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, > 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53] } ] }},{ > "Schedule": { "Name": "catalogDaily", "Run": [ { "Pool": > "file_catalog", "Level": "Full", "Hour": [7], "Minute": 15, > "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, > 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "Month": [0, 1, 2, 3, > 4, 5, 6, 7, 8, 9, 10, 11], "DayOfWeek": [0, 1, 2, 3, 4, 5, 6], > "WeekOfMonth": [0, 1, 2, 3, 4, 5], "WeekOfYear": [0, 1, 2, 3, 4, 5, 6, > 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, > 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, > 46, 47, 48, 49, 50, 51, 52, 53] } ] }},{ "Schedule": { "Name": > "home", "Run": [ { "Pool": "pool_full", "Level": "Full", > "Hour": [3], "Minute": 15, "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, > 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, > 29, 30], "Month": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], > "DayOfWeek": [0], "WeekOfMonth": [0], "WeekOfYear": [0, 1, 2, 3, 4, > 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, > 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, > 44, 45, 46, 47, 48, 49, 50, 51, 52, 53] }, { "Pool": > "pool_diff", "Level": "Differential", "Hour": [3], "Minute": > 20, "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "Month": [0, 1, > 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "DayOfWeek": [0], "WeekOfMonth": > [1, 2, 3, 4], "WeekOfYear": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, > 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, > 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, > 51, 52, 53] }, { "Pool": "pool_incr", "Level": > "Incremental", "Hour": [3], "Minute": 25, "Day": [0, 1, 2, 3, > 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, > 25, 26, 27, 28, 29, 30], "Month": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, > 11], "DayOfWeek": [1, 2, 3, 4, 5, 6], "WeekOfMonth": [0, 1, 2, 3, > 4, 5], "WeekOfYear": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, > 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, > 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, > 53] } ] }},{ "Schedule": { "Name": "media", "Run": [ { > "Pool": "media-full", "Level": "Full", "Hour": [2], "Minute": > 15, "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "Month": [0, 1, > 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "DayOfWeek": [0], "WeekOfMonth": > [0], "WeekOfYear": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, > 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, > 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, > 53] }, { "Pool": "media-diff", "Level": "Differential", > "Hour": [2], "Minute": 16, "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, > 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, > 29, 30], "Month": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], > "DayOfWeek": [0], "WeekOfMonth": [1, 2, 3, 4], "WeekOfYear": [0, 1, > 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, > 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, > 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53] }, { "Pool": > "media-incr", "Level": "Incremental", "Hour": [2], "Minute": > 20, "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "Month": [0, 1, > 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "DayOfWeek": [1, 2, 3, 4, 5, 6], > "WeekOfMonth": [0, 1, 2, 3, 4, 5], "WeekOfYear": [0, 1, 2, 3, 4, 5, 6, > 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, > 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, > 46, 47, 48, 49, 50, 51, 52, 53] } ] }},{ "Schedule": { "Name": > "media2", "Run": [ { "Pool": "media2-full", "Level": "Full", > "Hour": [6], "Minute": 30, "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, > 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, > 28, 29, 30], "Month": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], > "DayOfWeek": [1], "WeekOfMonth": [0], "WeekOfYear": [0, 1, 2, 3, 4, > 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, > 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, > 44, 45, 46, 47, 48, 49, 50, 51, 52, 53] }, { "Pool": > "media2-diff", "Level": "Differential", "Hour": [6], "Minute": > 0, "Day": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, > 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "Month": [0, 1, 2, > 3, 4, 5, 6, 7, 8, 9, 10, 11], "DayOfWeek": [2], "WeekOfMonth": [0, > 1, 2, 3, 4, 5], "WeekOfYear": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, > 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, > 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, > 51, 52, 53] }, { "Pool": "media2-incr", "Level": > "Incremental", "Hour": [6], "Minute": 0, "Day": [0, 1, 2, 3, > 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, > 25, 26, 27, 28, 29, 30], "Month": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, > 11], "DayOfWeek": [0, 1, 2, 3, 4, 5, 6], "WeekOfMonth": [0, 1, 2, > 3, 4, 5], "WeekOfYear": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, > 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, > 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, > 52, 53] } ] }},{ "Schedule": { "Name": "sched_none" }},{ > "Fileset": { "Name": "Catalog", "Include": [{ "File": > ["/var/lib/bacula/bacula.sql"], "Options": [ { > "Signature": "Md5" } ] }] }},{ "Fileset": { "Name": > "archived", "Include": [{ "File": ["/mnt/wd1000/mycds", > "/mnt/wd1000/photoscan"], "Options": [ { "Compression": > "Lzo", "Signature": "Md5" } ] }] }},{ "Fileset": { > "Name": "home", "Include": [{ "File": ["/mnt/raid5/Documents", > "/mnt/raid5/programs", "/home/chrisw"], "Options": [ { > "Compression": "Lzo", "Signature": "Md5", "Accurate": "mc", > "Verify": "pins5" } ] }], "Exclude": { "File": > ["/home/chrisw/.*", "/home/chrisw/tmp", "/home/chrisw/Downloads"] } }},{ > "Fileset": { "Name": "media", "Include": [{ "File": > ["/mnt/raid5/Media", "/mnt/sata3tb/itunes/iTunes"], "Options": [ { > "Compression": "Lzo", "Signature": "Md5", "Accurate": > "mc", "Verify": "pins5" } ] }] }},{ "Pool": { > "Name": "Default", "PoolType": "Backup", "ActionOnPurge":"Truncate", > "MaximumVolumes": 1, "MaximumVolumeBytes": 10737418240, > "VolumeRetention": 5184000, "VolumeUseDuration": 1209600, "AutoPrune": > true, "Recycle": true }},{ "Pool": { "Name": "Scratch", > "PoolType": "Backup" }},{ "Pool": { "Name": "archived-diff", > "PoolType": "Backup", "LabelFormat": "archived-diff", > "MaximumVolumeBytes": 53687091200, "VolumeRetention": 5184000, > "AutoPrune": true, "Recycle": true }},{ "Pool": { "Name": > "archived-full", "PoolType": "Backup", "LabelFormat": "archived-full", > "MaximumVolumeBytes": 53687091200, "VolumeRetention": 94608000, > "AutoPrune": true, "Recycle": true }},{ "Pool": { "Name": > "archived-incr", "PoolType": "Backup", "LabelFormat": "archived-incr", > "MaximumVolumeBytes": 53687091200, "VolumeRetention": 172800, > "AutoPrune": true, "Recycle": true }},{ "Pool": { "Name": > "file_catalog", "PoolType": "Backup", "LabelFormat": "catalog", > "ActionOnPurge":"Truncate", "MaximumVolumeBytes": 524288000, > "VolumeRetention": 172800, "VolumeUseDuration": 1296000, "AutoPrune": > true, "Recycle": true }},{ "Pool": { "Name": "media-diff", > "PoolType": "Backup", "LabelFormat": "media-diff", "PurgeOldestVolume": > true, "ActionOnPurge":"Truncate", "RecycleOldestVolume": true, > "MaximumVolumeBytes": 53687091200, "VolumeRetention": 5184000, > "VolumeUseDuration": 345600, "Storage": ["media-sd"], "AutoPrune": > true, "Recycle": true, "FileRetention": 5184000, "JobRetention": > 5184000 }},{ "Pool": { "Name": "media-full", "PoolType": "Backup", > "LabelFormat": "media-full", "PurgeOldestVolume": true, > "ActionOnPurge":"Truncate", "RecycleOldestVolume": true, > "MaximumVolumeBytes": 53687091200, "VolumeRetention": 7776000, > "VolumeUseDuration": 1296000, "Storage": ["media-sd"], "AutoPrune": > true, "Recycle": true, "FileRetention": 15552000, "JobRetention": > 15552000 }},{ "Pool": { "Name": "media-incr", "PoolType": "Backup", > "LabelFormat": "media-incr", "PurgeOldestVolume": true, > "ActionOnPurge":"Truncate", "RecycleOldestVolume": true, > "MaximumVolumeBytes": 53687091200, "VolumeRetention": 172800, > "VolumeUseDuration": 172800, "Storage": ["media-sd"], "AutoPrune": > true, "Recycle": true, "FileRetention": 604800, "JobRetention": > 604800 }},{ "Pool": { "Name": "media2-diff", "PoolType": "Backup", > "LabelFormat": "media2-diff", "MaximumVolumeBytes": 53687091200, > "VolumeRetention": 5184000, "AutoPrune": true, "Recycle": true }},{ > "Pool": { "Name": "media2-full", "PoolType": "Backup", > "LabelFormat": "media2-full", "MaximumVolumeBytes": 53687091200, > "VolumeRetention": 31536000, "AutoPrune": true, "Recycle": true }},{ > "Pool": { "Name": "media2-incr", "PoolType": "Backup", > "LabelFormat": "media2-incr", "MaximumVolumeBytes": 53687091200, > "VolumeRetention": 172800, "AutoPrune": true, "Recycle": true }},{ > "Pool": { "Name": "pool_diff", "PoolType": "Backup", "LabelFormat": > "diff", "PurgeOldestVolume": true, "ActionOnPurge":"Truncate", > "RecycleOldestVolume": true, "MaximumVolumeBytes": 53687091200, > "VolumeRetention": 5184000, "VolumeUseDuration": 1296000, "Storage": > ["home-sd"], "AutoPrune": true, "Recycle": true, "FileRetention": > 5184000, "JobRetention": 5184000 }},{ "Pool": { "Name": "pool_full", > "PoolType": "Backup", "LabelFormat": "full", "PurgeOldestVolume": > true, "ActionOnPurge":"Truncate", "RecycleOldestVolume": true, > "MaximumVolumeBytes": 53687091200, "VolumeRetention": 7776000, > "VolumeUseDuration": 1296000, "Storage": ["home-sd"], "AutoPrune": > true, "Recycle": true, "FileRetention": 15552000, "JobRetention": > 15552000 }},{ "Pool": { "Name": "pool_incr", "PoolType": "Backup", > "LabelFormat": "incr", "PurgeOldestVolume": true, > "ActionOnPurge":"Truncate", "RecycleOldestVolume": true, > "MaximumVolumeBytes": 53687091200, "VolumeRetention": 172800, > "VolumeUseDuration": 172800, "Storage": ["home-sd"], "AutoPrune": true, > "Recycle": true, "FileRetention": 172800, "JobRetention": 172800 > }},{ "Messages": { "Name": "Daemon", "MailCommand": "/usr/sbin/bsmtp > -h localhost -f \"(Bacula) <%r>\" -s \"Bacula daemon message\" %r", > "Destinations": [ { "Type": "Mail", "MsgTypes": > ["Fatal","Error","Warning","Mount"], "Where": ["root@localhost"], > "Command": "/usr/sbin/bsmtp -h localhost -f \"(Bacula) <%r>\" -s \”Bacula > > >>daemon message\" %r" },, ] }},{ "Messages": { "Name": > >>"Standard", "MailCommand": "/usr/sbin/bsmtp -h localhost -f \"(Bacula) > >>no- > > reply@homeserver \" -s \"Bacula: %t %e of %c %l\" %r", "OperatorCommand": > "/usr/sbin/bsmtp -h localhost -f \"(Bacula) no-reply@homeserver \" -s > \"Bacula: Intervention needed for %j\" %r", "Destinations": [ { > "Type": "Mail", "MsgTypes": ["Fatal","Error","Warning","Mount"], > "Where": ["root@localhost"], "Command": "/usr/sbin/bsmtp -h > localhost -f \"(Bacula) no-reply@homeserver \" -s \"Bacula: %t %e of %c %l\" > %r" },,, { "Type": "Operator", "MsgTypes": > ["Fatal","Error","Warning","Mount"], "Where": ["root@localhost"], > "Command": "/usr/sbin/bsmtp -h localhost -f \"(Bacula) no-reply@homeserver > \" -s \"Bacula: Intervention needed for %j\" %r" }, { > "Type": "Catalog", "MsgTypes": ["All","!Debug","!Saved","!Skipped"] > } ] }},{ "Console": { "Name": "fd-cons", "Password": "pwd2", > "CommandAcl": ["status", ".status"] }},{ "JobDefs": { "Name": > "DefaultJob", "Type": "Backup", "Messages": "Standard", > "WriteBootstrap": "/var/lib/bacula/%c.bsr", "SpoolAttributes": true, > "Priority": 10 }}] > > Best > -Chris- > > > > > On 30 Oct 2020, at 18:28, Marcin Haba <ganius...@gmail.com> wrote: > > Hello Chris, > > Thanks for providing this debug output. > > This error means that bdirjson responded with output, which isn't a > valid JSON string. To check what exactly is wrong there, you can > enable debug for Baculum API in the api.conf file by changing in [api] > section the 'debug' option to "1". After that you can go on the > Baculum Web interface to the page with empty drop down lists. In the > baculum-api.log file you should see a line starting with: > > Oct 30 18:38:12 [Debug] [External] Command=Parse output, Output=[ > HERE_YOU_WILL_HAVE_BROKEN_JSON ] > > The output in place HERE_YOU_WILL_HAVE_BROKEN_JSON you can write > together with the [ ] square brackets to a separate text file to > validate the output by a command line tool, for example: > > cat your_file | json_pp > > or if you don't have json_pp, then you can try: > > cat your_file | python -m json.tool > > Above commands will show in which line and which column is something > wrong, what breaks the JSON structure. > > Best regards, > Marcin Haba (gani) > > On Fri, 30 Oct 2020 at 13:37, Chris Wilkinson <winstonia...@gmail.com> wrote: > > > Hello Marcin > > In the Baculum error log (debug enabled, '/var/log/baculum/baculum-web.log') > I see the following just after opening the resource form. I’m not seeing > anything suspicious in the api or web logs in the Apache2 log directory. > > Can i do another test to try and get closer to the problem? > > ==> > Oct 30 12:24:58 [Debug] [Application] Command=getURIResource, Output= > > EXECUTE URI ==> > http://localhost:9096/api/v1/config/dir?director=homeserver-dir <== > > , File=/usr/share/baculum/htdocs/protected/Web/Class/BaculumAPIClient.php, > Line=180 (line 74, > /usr/share/baculum/htdocs/protected/Common/Class/Logging.php) > Oct 30 12:24:59 [Debug] [Application] Command=preParseOutput, > Output={"output":"JSON tool output was unable to parse.","error":83}, > File=/usr/share/baculum/htdocs/protected/Web/Class/BaculumAPIClient.php, > Line=441 (line 74, > /usr/share/baculum/htdocs/protected/Common/Class/Logging.php) > Oct 30 12:24:59 [Debug] [Application] Command=preParseOutput, Output=stdClass > Object > ( > [output] => JSON tool output was unable to parse. > [error] => 83 > ) > , File=/usr/share/baculum/htdocs/protected/Web/Class/BaculumAPIClient.php, > Line=470 (line 74, > /usr/share/baculum/htdocs/protected/Common/Class/Logging.php) > <== > > Best > -Chris- > > > > > On 30 Oct 2020, at 05:29, Marcin Haba <ganius...@gmail.com> wrote: > > Hello Chris, > > Thanks for providing all these details. > > I think in this case I would propose to check web server error logs > for Baculum API and Baculum Web. If you installed Baculum using binary > packages from bacula.org, they are files: baculum-api-error.log and > baculum-web-error.log located in the web server log directory. Are you > seeing any error there when you load the page with empty drop down > list elements? > > Also it might be useful to enable debug for Baculum Web (gear wheel > icon on the top left on the Baculum Web interface and there: 'Enable > debug' option). Debug files you can find in /var/lib/baculum/ if you > installed using bacula.org packages. Is there anything wrong? > > Best regards, > Marcin Haba (gani) > > On Thu, 29 Oct 2020 at 10:40, Chris Wilkinson <winstonia...@gmail.com> wrote: > > > Hello Marcin. > > Thanks for your fast reply. The output of the command is: > > $ sudo /usr/sbin/bdirjson -c /etc/bacula/bacula-dir.conf -r Job -n home > { > > "Name": "home", > "Type": "Backup", > "Level": "Full", > "Messages": "Standard", > "Storage": ["home-sd"], > "Pool": "pool_full", > "FullBackupPool": "pool_full", > "IncrementalBackupPool": "pool_incr", > "DifferentialBackupPool": "pool_diff", > "Client": "home-fd", > "Fileset": "home", > "Schedule": "home", > "SpoolAttributes": true > } > > And also the version number of bdirjson: > > $ sudo /usr/sbin/bdirjson -? > Copyright (C) 2012-2018 Kern Sibbald. > > Version: 9.2.2 (06 November 2018) > > Usage: bdirjson [<options>] [config_file] > ... > > You are correct that the Job resource has never been edited by Baculum, it > was created manually. I do not generally use quotes for configuration items > though perhaps I should. > > Looking at this resource in Baculum, it exhibits the empty drop downs that I > mentioned. By empty I mean that there are no items in the list at all. > > I wondered if this might be browser related but found that the same effect > occurs in Firefox, Opera and Chrome so it seems not. > > Best > -Chris- > > > > > On 29 Oct 2020, at 02:52, Marcin Haba <ganius...@gmail.com> wrote: > > Hello Chris, > > At the beginning I propose to check the bdirjson output. Could you > tell me if you can see all configured job directives with values when > you execute command as below: > > /bacula/bin/path/bdirjson -c /director/config/path/bacula-dir.conf -r > Job -n home > > You need to adjust paths in this command to the paths in your > environment used by Baculum. > > From the Job resource that you sent, I can see the config isn't > managed by Baculum or the config hasn't been saved any time by > Baculum. It is because Baculum saves string type values with quotes, > for example: > > Storage = "home-sd" > > instead: > > Storage = home-sd > > At the end I have a question if the drop down boxes are empty in > meaning that they have no items, or they have items but none of them > is selected? > > Thanks in advance for all these checking. > > Best regards, > Marcin Haba (gani) > > On Wed, 28 Oct 2020 at 13:37, Chris Wilkinson <winstonia...@gmail.com> wrote: > > > I have noticed that the drop down boxes for various config items in the > Baculum forms are empty. For example, the form for configuring Jobs has drop > downs for Client/FileSet/Pools/Storage/Messages but these are all empty. I do > have all these configured and jobs are running normally. One of my job > configs is below but behaviour is the same for all jobs. > > Job { > Name = "home" > Type = Backup > Level = Full > Messages = Standard > Storage = home-sd > Pool = pool_full > FullBackupPool = "pool_full" > IncrementalBackupPool = "pool_incr" > DifferentialBackupPool = "pool_diff" > Client = home-fd > FileSet = home > Schedule = home > SpoolAttributes = "yes" > } > > This doesn’t seem to be an issue but am curious why this is occurring. > > Best > -Chris- > > > > > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > > > > > -- > "Greater love hath no man than this, that a man lay down his life for > his friends." Jesus Christ > > "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie > za przyjaciół swoich." Jezus Chrystus > > > > > -- > "Greater love hath no man than this, that a man lay down his life for > his friends." Jesus Christ > > "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie > za przyjaciół swoich." Jezus Chrystus > > > > > -- > "Greater love hath no man than this, that a man lay down his life for > his friends." Jesus Christ > > "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie > za przyjaciół swoich." Jezus Chrystus > > -- "Greater love hath no man than this, that a man lay down his life for his friends." Jesus Christ "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie za przyjaciół swoich." Jezus Chrystus _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users