Wanderlei Huttel
2017-07-14 12:14:42 UTC
Hello
I was testing the new bacula tools (bdirjson) and it looks have something
wrong:
The program is repeating the Level in schedules
Schedule {
Name = "Agenda_GFS_Noite"
Run = Level=Differential Pool=Diaria Accurate=yes on Monday-Thursday
at 21:30
Run = Level=Full Pool=Semanal on 2nd-6th Friday at 19:30
Run = Level=Full Pool=Mensal on 1st Friday at 19:30
}
bdirjson -n Agenda_GFS_Noite
[
{
"Schedule": {
"Name": "Agenda_GFS_Noite",
"Run": [
{
"Pool": "Diaria",
"Level": "Differential",
"Level": "Differential",
"Level": "Differential",
"Accurate": true,
"Minute": 30,
"Hour": [21],
"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],
"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": "Semanal",
"Level": "Full",
"Level": "Full",
"Level": "Full",
"Minute": 30,
"Hour": [19],
"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": [5],
"WeekOfMonth": [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": "Mensal",
"Level": "Full",
"Level": "Full",
"Level": "Full",
"Minute": 30,
"Hour": [19],
"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": [5],
"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]
}
]
}
}
In Message resources it look is including some level not included by
default.
########################################################################################
# Configuração das mensagens de Jobs
Messages {
Name = Standard
MailCommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r"
Mail = ***@domain.com.br = all, !skipped
MailCommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r"
MailOnError = ***@gmail.com = all, !skipped
OperatorCommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: Intervention needed for %j\" %r"
Operator = ***@domain.com.br = mount
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
catalog = all, !skipped, !saved
}
{
"Name": "Standard",
"MailCommand": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r",
"OperatorCommand": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: Intervention needed for %j\" %r",
"Destinations": [
{
"Type": "Mail",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["***@domain.com.br"],
"Command": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r"
},
{
"Type": "MailOnError",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["***@gmail.com"],
"Command": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r"
},
{
"Type": "Append",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["/var/log/bacula/bacula.log"]
},
{
"Type": "Console",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"]
},
{
"Type": "Operator",
"MsgTypes": ["Mount"],
"Where": ["***@domain.com.br"],
"Command": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: Intervention needed for %j\" %r"
},
{
"Type": "Catalog",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"]
}
]
}
########################################################################################
# Configuração das mensagens do daemon
Messages {
Name = Daemon
MailCommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula daemon message\" %r"
Mail = ***@domain.com.br = all, !skipped
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
}
{
"Name": "Daemon",
"MailCommand": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula daemon message\" %r",
"Destinations": [
{
"Type": "Mail",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["***@domain.com.br"],
"Command": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula daemon message\" %r"
},
{
"Type": "Append",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["/var/log/bacula/bacula.log"]
},
{
"Type": "Console",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"]
}
]
}
In the bdirjon, bsdjson and bfdjson they're not printing (DIRport, SDPort
and FDPort)
About bdirson -s (output in show text format)
Why not generate the original text like the files .conf?
This would be easyer to recreate conf files.
Best Regards
*Wanderlei HÃŒttel*
http://www.huttel.com.br
I was testing the new bacula tools (bdirjson) and it looks have something
wrong:
The program is repeating the Level in schedules
Schedule {
Name = "Agenda_GFS_Noite"
Run = Level=Differential Pool=Diaria Accurate=yes on Monday-Thursday
at 21:30
Run = Level=Full Pool=Semanal on 2nd-6th Friday at 19:30
Run = Level=Full Pool=Mensal on 1st Friday at 19:30
}
bdirjson -n Agenda_GFS_Noite
[
{
"Schedule": {
"Name": "Agenda_GFS_Noite",
"Run": [
{
"Pool": "Diaria",
"Level": "Differential",
"Level": "Differential",
"Level": "Differential",
"Accurate": true,
"Minute": 30,
"Hour": [21],
"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],
"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": "Semanal",
"Level": "Full",
"Level": "Full",
"Level": "Full",
"Minute": 30,
"Hour": [19],
"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": [5],
"WeekOfMonth": [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": "Mensal",
"Level": "Full",
"Level": "Full",
"Level": "Full",
"Minute": 30,
"Hour": [19],
"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": [5],
"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]
}
]
}
}
In Message resources it look is including some level not included by
default.
########################################################################################
# Configuração das mensagens de Jobs
Messages {
Name = Standard
MailCommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r"
Mail = ***@domain.com.br = all, !skipped
MailCommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r"
MailOnError = ***@gmail.com = all, !skipped
OperatorCommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: Intervention needed for %j\" %r"
Operator = ***@domain.com.br = mount
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
catalog = all, !skipped, !saved
}
{
"Name": "Standard",
"MailCommand": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r",
"OperatorCommand": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: Intervention needed for %j\" %r",
"Destinations": [
{
"Type": "Mail",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["***@domain.com.br"],
"Command": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r"
},
{
"Type": "MailOnError",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["***@gmail.com"],
"Command": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: %t %e of %c %l\" %r"
},
{
"Type": "Append",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["/var/log/bacula/bacula.log"]
},
{
"Type": "Console",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"]
},
{
"Type": "Operator",
"MsgTypes": ["Mount"],
"Where": ["***@domain.com.br"],
"Command": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula: Intervention needed for %j\" %r"
},
{
"Type": "Catalog",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"]
}
]
}
########################################################################################
# Configuração das mensagens do daemon
Messages {
Name = Daemon
MailCommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula daemon message\" %r"
Mail = ***@domain.com.br = all, !skipped
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
}
{
"Name": "Daemon",
"MailCommand": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula daemon message\" %r",
"Destinations": [
{
"Type": "Mail",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["***@domain.com.br"],
"Command": "/usr/sbin/bsmtp -h localhost -f \"Bacula <
***@domain.com.br>\" -s \"Bacula daemon message\" %r"
},
{
"Type": "Append",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"],
"Where": ["/var/log/bacula/bacula.log"]
},
{
"Type": "Console",
"MsgTypes": ["All","!Debug","!Saved","!Skipped"]
}
]
}
In the bdirjon, bsdjson and bfdjson they're not printing (DIRport, SDPort
and FDPort)
About bdirson -s (output in show text format)
Why not generate the original text like the files .conf?
This would be easyer to recreate conf files.
Best Regards
*Wanderlei HÃŒttel*
http://www.huttel.com.br