#!/usr/bin/perl # Show the Bacula main menu require './bacula-backup-lib.pl'; $hsl = &help_search_link("bacula", "man", "doc", "google"); # Make sure it is installed $err = &check_bacula(); if ($err) { &ui_print_header(undef, $module_info{'desc'}, "", "intro", 1, 1, 0, $hsl); print &ui_config_link('index_echeck', [ $err, undef ]),"<p>\n"; &ui_print_footer("/", $text{'index'}); exit; } if (&has_bacula_dir()) { # Test DB connection eval { $dbh = &connect_to_database(); }; if ($@) { $err = $@; &ui_print_header(undef, $module_info{'desc'}, "", "intro", 1, 1, 0, $hsl); print &ui_config_link('index_edb', [ $err, undef ]),"<p>\n"; &ui_print_footer("/", $text{'index'}); exit; } $dbh->disconnect(); } # Test node group DB if (&has_bacula_dir() && &has_node_groups()) { $err = &check_node_groups(); if ($err) { &ui_print_header(undef, $module_info{'desc'}, "", "intro", 1, 1, 0, $hsl); print &ui_config_link('index_eng', [ $err, undef ]),"<p>\n"; &ui_print_footer("/", $text{'index'}); exit; } } # Get the Bacula version, and check it $ver = &get_bacula_version(); &ui_print_header( undef, $module_info{'desc'}, "", "intro", 1, 1, 0, $hsl, undef, undef, ($ver ? &text('index_version'.$cmd_prefix, $ver)."<br>" : undef). &text('index_ocmin', 'images/ocmin.gif', 'http://www.linmin.com/')); if ($ver && $ver < 1.36) { print &text('index_eversion', 1.36, $ver),"<p>\n"; &ui_print_footer("/", $text{'index'}); exit; } # Make sure bconsole works if (&is_bacula_running($cmd_prefix."-dir")) { # Check hostname in console config $conconf = &get_bconsole_config(); $condir = &find("Director", $conconf); $conaddr = &find_value("Address", $condir->{'members'}); if (!&to_ipaddress($conaddr) && !&to_ip6address($conaddr)) { # Offer to fix hostname print &text('index_econsole2', "<tt>$console_cmd</tt>", "<tt>$conaddr</tt>"),"<p>\n"; print &ui_form_start("fixaddr.cgi"); print &ui_form_end([ [ "fix", $text{'index_fixaddr'} ] ]); &ui_print_footer("/", $text{'index'}); exit; } # Test run bconsole local $status; eval { local $h = &open_console(); $status = &console_cmd($h, "version"); &close_console($h); }; if ($status !~ /Version/i) { # Nope .. check if there is a password mismatch we can fix print &text('index_econsole', "<tt>$console_cmd</tt>", "<tt>$config{'bacula_dir'}/bconsole.conf</tt>"),"<p>\n"; $dirconf = &get_director_config(); $dirdir = &find("Director", $dirconf); $dirpass = &find_value("Password", $dirdir->{'members'}); $conpass = &find_value("Password", $condir->{'members'}); if ($dirpass && $conpass && $dirpass ne $conpass) { # Can fix! print &ui_form_start("fixpass.cgi"); print &ui_form_end([ [ "fix", $text{'index_fixpass'} ] ]); } &ui_print_footer("/", $text{'index'}); exit; } } # Show director, storage and file daemon icons if (&has_bacula_dir()) { print &ui_subheading($text{'index_dir'}); @pages = ( "director", "clients", "filesets", "schedules", "jobs", "pools", "storages" ); &show_icons_from_pages(\@pages); } if (&has_bacula_sd()) { print &ui_subheading($text{'index_sd'}); @pages = ( "storagec", "devices" ); if (!&has_bacula_dir() || $config{'showdirs'}) { push(@pages, "sdirectors"); } &show_icons_from_pages(\@pages); } if (&has_bacula_fd()) { print &ui_subheading($text{'index_fd'}); @pages = ( "file" ); if (!&has_bacula_dir() || $config{'showdirs'}) { push(@pages, "fdirectors"); } &show_icons_from_pages(\@pages); } # Show icons for node group operations if (&has_bacula_dir() && &has_node_groups()) { print &ui_subheading($text{'index_groups'}); @pages = ( "groups", "gjobs", "gbackup", "sync" ); @links = map { "list_${_}.cgi" } @pages; @titles = map { $text{"${_}_title"} } @pages; @icons = map { "images/${_}.gif" } @pages; &icons_table(\@links, \@titles, \@icons); } if (&has_bacula_dir()) { # Show icons for actions print &ui_hr(); print &ui_subheading($text{'index_actions'}); if (&is_bacula_running($cmd_prefix."-dir")) { @actions = ( "backup", "dirstatus", "clientstatus", "storagestatus", "label", "poolstatus", "mount", "restore" ); @links = map { "${_}_form.cgi" } @actions; @titles = map { $text{"${_}_title"} } @actions; @icons = map { "images/${_}.gif" } @actions; &icons_table(\@links, \@titles, \@icons); } else { print "<b>$text{'index_notrun'}</b><p>\n"; } } print &ui_hr(); # See what processes are running print "<b>$text{'index_status'}</b>\n"; foreach $p (@bacula_processes) { print " | \n" if ($p ne $bacula_processes[0]); print $text{'proc_'.$p}," - "; if (&is_bacula_running($p)) { print "<font color=#00aa00><b>",$text{'index_up'}, "</b></font>\n"; $pcount++; } else { print "<font color=#ff0000><b>",$text{'index_down'}, "</b></font>\n"; } } print "<p>\n"; print &ui_buttons_start(); if ($pcount > 0) { if (!$config{'apply'}) { print &ui_buttons_row("apply.cgi", $text{'index_apply'}, $text{'index_applydesc'}); } if (&has_bacula_dir()) { # Only show restart button if we are running the director, as # for others the apply does a restart print &ui_buttons_row("restart.cgi", $text{'index_restart'}, $text{'index_restartdesc'}); } print &ui_buttons_row("stop.cgi", $text{'index_stop'}, $text{'index_stopdesc'}); } if ($pcount < scalar(@bacula_processes)) { print &ui_buttons_row("start.cgi", $text{'index_start'}, $text{'index_startdesc'}); } # See what is started at boot if (&foreign_installed("init")) { &foreign_require("init", "init-lib.pl"); $status = &init::action_status($bacula_inits[0]); if ($status) { print &ui_buttons_row("bootup.cgi", $text{'index_boot'}, $text{'index_bootdesc'}, undef, &ui_yesno_radio("boot", $status == 2 ? 1 : 0)); } } print &ui_buttons_end(); &ui_print_footer("/", $text{'index'}); sub show_icons_from_pages { local ($pages) = @_; local @links = map { $_ eq "director" || $_ eq "file" || $_ eq "storagec" ? "edit_${_}.cgi" : "list_${_}.cgi" } @$pages; local @titles = map { $text{"${_}_title"} } @$pages; local @icons = map { "images/${_}.gif" } @$pages; &icons_table(\@links, \@titles, \@icons); }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
help | Folder | 0755 |
|
|
images | Folder | 0755 |
|
|
jstree | Folder | 0755 |
|
|
lang | Folder | 0755 |
|
|
CHANGELOG | File | 1.06 KB | 0644 |
|
Makefile | File | 130 B | 0644 |
|
apply.cgi | File | 214 B | 0755 |
|
backup.cgi | File | 1.76 KB | 0755 |
|
backup_config.pl | File | 600 B | 0644 |
|
backup_form.cgi | File | 806 B | 0755 |
|
bacula-backup-lib.pl | File | 43.51 KB | 0755 |
|
bootup.cgi | File | 363 B | 0755 |
|
cancel_jobs.cgi | File | 674 B | 0755 |
|
clientstatus_form.cgi | File | 2.51 KB | 0755 |
|
config | File | 138 B | 0644 |
|
config-syno-linux | File | 136 B | 0644 |
|
config-windows | File | 151 B | 0644 |
|
config.info | File | 871 B | 0644 |
|
config.info.ca | File | 1.02 KB | 0644 |
|
config.info.de | File | 947 B | 0644 |
|
config.info.fr | File | 0 B | 0644 |
|
config.info.ms | File | 1019 B | 0644 |
|
config.info.nl | File | 872 B | 0644 |
|
config.info.no | File | 951 B | 0644 |
|
config.info.pl | File | 998 B | 0644 |
|
config.info.pt_BR | File | 0 B | 0644 |
|
config.info.ru | File | 1.17 KB | 0644 |
|
delete_clients.cgi | File | 749 B | 0755 |
|
delete_devices.cgi | File | 650 B | 0755 |
|
delete_fdirectors.cgi | File | 653 B | 0755 |
|
delete_filesets.cgi | File | 761 B | 0755 |
|
delete_gjobs.cgi | File | 830 B | 0755 |
|
delete_groups.cgi | File | 917 B | 0755 |
|
delete_jobs.cgi | File | 735 B | 0755 |
|
delete_pools.cgi | File | 732 B | 0755 |
|
delete_schedules.cgi | File | 773 B | 0755 |
|
delete_sdirectors.cgi | File | 666 B | 0755 |
|
delete_storages.cgi | File | 768 B | 0755 |
|
delete_volumes.cgi | File | 566 B | 0755 |
|
dirstatus_form.cgi | File | 2.3 KB | 0755 |
|
edit_client.cgi | File | 2.51 KB | 0755 |
|
edit_device.cgi | File | 2.2 KB | 0755 |
|
edit_director.cgi | File | 1.46 KB | 0755 |
|
edit_fdirector.cgi | File | 1.4 KB | 0755 |
|
edit_file.cgi | File | 1.11 KB | 0755 |
|
edit_fileset.cgi | File | 2.31 KB | 0755 |
|
edit_gjob.cgi | File | 4.41 KB | 0755 |
|
edit_group.cgi | File | 2.56 KB | 0755 |
|
edit_job.cgi | File | 5.34 KB | 0755 |
|
edit_pool.cgi | File | 2.62 KB | 0755 |
|
edit_schedule.cgi | File | 2.08 KB | 0755 |
|
edit_sdirector.cgi | File | 1.4 KB | 0755 |
|
edit_storage.cgi | File | 2.86 KB | 0755 |
|
edit_storagec.cgi | File | 1.25 KB | 0755 |
|
fixaddr.cgi | File | 481 B | 0755 |
|
fixpass.cgi | File | 513 B | 0755 |
|
gbackup.cgi | File | 1.59 KB | 0755 |
|
index.cgi | File | 6.13 KB | 0755 |
|
install_check.pl | File | 450 B | 0755 |
|
label.cgi | File | 1.49 KB | 0755 |
|
label_form.cgi | File | 974 B | 0755 |
|
list.cgi | File | 3.21 KB | 0755 |
|
list_clients.cgi | File | 1.29 KB | 0755 |
|
list_devices.cgi | File | 1.27 KB | 0755 |
|
list_fdirectors.cgi | File | 1.34 KB | 0755 |
|
list_filesets.cgi | File | 1.31 KB | 0755 |
|
list_gbackup.cgi | File | 814 B | 0755 |
|
list_gjobs.cgi | File | 1.52 KB | 0755 |
|
list_grestore.cgi | File | 1.62 KB | 0755 |
|
list_groups.cgi | File | 1.78 KB | 0755 |
|
list_jobs.cgi | File | 1.68 KB | 0755 |
|
list_pools.cgi | File | 1.23 KB | 0755 |
|
list_schedules.cgi | File | 1.26 KB | 0755 |
|
list_sdirectors.cgi | File | 1.34 KB | 0755 |
|
list_storages.cgi | File | 1.39 KB | 0755 |
|
list_sync.cgi | File | 795 B | 0755 |
|
log_parser.pl | File | 1000 B | 0755 |
|
manual.sxw | File | 24.8 KB | 0644 |
|
module.info | File | 194 B | 0644 |
|
module.info.af | File | 0 B | 0644 |
|
module.info.af.auto | File | 146 B | 0644 |
|
module.info.ar | File | 0 B | 0644 |
|
module.info.ar.auto | File | 279 B | 0644 |
|
module.info.be | File | 0 B | 0644 |
|
module.info.be.auto | File | 291 B | 0644 |
|
module.info.bg | File | 0 B | 0644 |
|
module.info.bg.auto | File | 236 B | 0644 |
|
module.info.ca | File | 193 B | 0644 |
|
module.info.cs | File | 0 B | 0644 |
|
module.info.cs.auto | File | 173 B | 0644 |
|
module.info.da | File | 0 B | 0644 |
|
module.info.da.auto | File | 171 B | 0644 |
|
module.info.de | File | 167 B | 0644 |
|
module.info.el | File | 0 B | 0644 |
|
module.info.el.auto | File | 338 B | 0644 |
|
module.info.es | File | 0 B | 0644 |
|
module.info.es.auto | File | 173 B | 0644 |
|
module.info.eu | File | 0 B | 0644 |
|
module.info.eu.auto | File | 161 B | 0644 |
|
module.info.fa | File | 0 B | 0644 |
|
module.info.fa.auto | File | 271 B | 0644 |
|
module.info.fi | File | 0 B | 0644 |
|
module.info.fi.auto | File | 196 B | 0644 |
|
module.info.fr | File | 0 B | 0644 |
|
module.info.fr.auto | File | 186 B | 0644 |
|
module.info.he | File | 0 B | 0644 |
|
module.info.he.auto | File | 205 B | 0644 |
|
module.info.hr | File | 0 B | 0644 |
|
module.info.hr.auto | File | 164 B | 0644 |
|
module.info.hu | File | 0 B | 0644 |
|
module.info.hu.auto | File | 202 B | 0644 |
|
module.info.it | File | 0 B | 0644 |
|
module.info.it.auto | File | 155 B | 0644 |
|
module.info.ja | File | 0 B | 0644 |
|
module.info.ja.auto | File | 230 B | 0644 |
|
module.info.ko | File | 0 B | 0644 |
|
module.info.ko.auto | File | 182 B | 0644 |
|
module.info.lt | File | 0 B | 0644 |
|
module.info.lt.auto | File | 194 B | 0644 |
|
module.info.lv | File | 0 B | 0644 |
|
module.info.lv.auto | File | 161 B | 0644 |
|
module.info.ms | File | 172 B | 0644 |
|
module.info.mt | File | 0 B | 0644 |
|
module.info.mt.auto | File | 156 B | 0644 |
|
module.info.nl | File | 30 B | 0644 |
|
module.info.nl.auto | File | 127 B | 0644 |
|
module.info.no | File | 28 B | 0644 |
|
module.info.no.auto | File | 136 B | 0644 |
|
module.info.pl | File | 186 B | 0644 |
|
module.info.pt | File | 0 B | 0644 |
|
module.info.pt.auto | File | 165 B | 0644 |
|
module.info.pt_BR | File | 0 B | 0644 |
|
module.info.pt_BR.auto | File | 171 B | 0644 |
|
module.info.ro | File | 0 B | 0644 |
|
module.info.ro.auto | File | 175 B | 0644 |
|
module.info.ru | File | 0 B | 0644 |
|
module.info.ru.auto | File | 336 B | 0644 |
|
module.info.sk | File | 0 B | 0644 |
|
module.info.sk.auto | File | 183 B | 0644 |
|
module.info.sl | File | 0 B | 0644 |
|
module.info.sl.auto | File | 154 B | 0644 |
|
module.info.sv | File | 0 B | 0644 |
|
module.info.sv.auto | File | 171 B | 0644 |
|
module.info.th | File | 0 B | 0644 |
|
module.info.th.auto | File | 361 B | 0644 |
|
module.info.tr | File | 0 B | 0644 |
|
module.info.tr.auto | File | 201 B | 0644 |
|
module.info.uk | File | 0 B | 0644 |
|
module.info.uk.auto | File | 289 B | 0644 |
|
module.info.ur | File | 0 B | 0644 |
|
module.info.ur.auto | File | 269 B | 0644 |
|
module.info.vi | File | 0 B | 0644 |
|
module.info.vi.auto | File | 200 B | 0644 |
|
module.info.zh | File | 0 B | 0644 |
|
module.info.zh.auto | File | 127 B | 0644 |
|
module.info.zh_TW | File | 0 B | 0644 |
|
module.info.zh_TW.auto | File | 133 B | 0644 |
|
mount.cgi | File | 916 B | 0755 |
|
mount_form.cgi | File | 885 B | 0755 |
|
poolstatus_form.cgi | File | 1.96 KB | 0755 |
|
restart.cgi | File | 196 B | 0755 |
|
restore.cgi | File | 4.99 KB | 0755 |
|
restore_form.cgi | File | 3.53 KB | 0755 |
|
save_client.cgi | File | 2.42 KB | 0755 |
|
save_device.cgi | File | 2.04 KB | 0755 |
|
save_director.cgi | File | 1.15 KB | 0755 |
|
save_fdirector.cgi | File | 1.57 KB | 0755 |
|
save_file.cgi | File | 1.01 KB | 0755 |
|
save_fileset.cgi | File | 2.7 KB | 0755 |
|
save_gjob.cgi | File | 2.93 KB | 0755 |
|
save_group.cgi | File | 2.33 KB | 0755 |
|
save_job.cgi | File | 2.91 KB | 0755 |
|
save_pool.cgi | File | 2.36 KB | 0755 |
|
save_schedule.cgi | File | 1.76 KB | 0755 |
|
save_sdirector.cgi | File | 1.57 KB | 0755 |
|
save_storage.cgi | File | 2.43 KB | 0755 |
|
save_storagec.cgi | File | 1.07 KB | 0755 |
|
save_sync.cgi | File | 737 B | 0755 |
|
schedule_chooser.cgi | File | 2.89 KB | 0755 |
|
schedule_select.cgi | File | 928 B | 0755 |
|
start.cgi | File | 187 B | 0755 |
|
stop.cgi | File | 183 B | 0755 |
|
storagestatus_form.cgi | File | 2.57 KB | 0755 |
|
sync.pl | File | 408 B | 0755 |
|
treechooser.cgi | File | 2.03 KB | 0755 |
|