%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.248 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/fsdump/ |
Upload File : |
#!/usr/bin/perl # backup.cgi # Run a filesystem backup, either in the background or foreground (and show # the results) require './fsdump-lib.pl'; &ReadParse(); $dump = &get_dump($in{'id'}); $dump->{'id'} || &error($text{'backup_egone'}); &can_edit_dir($dump) || &error($text{'backup_ecannot'}); if ($config{'run_mode'}) { # Background &ui_print_header(undef, $text{'backup_title'}, ""); print "<p>$text{'backup_bg'}<p>\n"; &clean_environment(); &system_logged("$cron_cmd ".quotemeta($dump->{'id'}). " >/dev/null 2>&1 </dev/null &"); &reset_environment(); &webmin_log("bgbackup", undef, undef, $dump); } else { # Foreground &ui_print_unbuffered_header(undef, $text{'backup_title'}, ""); # Setup command to be called upon tape change (which is not # supported in this mode) $nfile = "$module_config_directory/$dump->{'id'}.notape"; unlink($nfile); &create_wrappers(); print "<b>",&text('backup_desc', "<tt>".&html_escape($dump->{'dir'})."</tt>", &dump_dest($dump)),"</b><p>\n"; print "<pre>"; $bok = &execute_before($dump, STDOUT, 1); if (!$bok && !$dump->{'beforefok'}) { # Before command failed print "</pre>\n"; print "<b>$text{'backup_beforefailed'}</b><p>\n"; } else { # Do the dump $now = time(); $ok = &execute_dump($dump, STDOUT, 1, 0, $now); print "</pre>\n"; if (!$bok) { print "<b>$text{'backup_afterfailed'}</b><p>\n"; } elsif ($ok) { # Worked .. but verify if asked if ($dump->{'reverify'}) { print "<b>$text{'backup_reverify'}</b><p>\n"; print "<pre>"; $ok = &verify_dump($dump, STDOUT, 1, 0, $now); print "</pre>"; } if ($ok) { print "<b>$text{'backup_done'}</b><br>\n"; } else { print "<b>$text{'backup_noverify'}</b><br>\n"; } } else { if (-r $nfile) { print "<b>$text{'backup_notape'}</b><br>\n"; } else { print "<b>$text{'backup_failed'}</b><br>\n"; } } # Execute the post-backup command, if any if ($ok || $dump->{'afteraok'}) { print "<pre>"; $bok = &execute_after($dump, STDOUT, 1); print "</pre>\n"; } } unlink($nfile); delete($dump->{'pass'}); &webmin_log("backup", undef, undef, $dump); } &ui_print_footer($access{'edit'} ? ( "edit_dump.cgi?id=$in{'id'}", $text{'edit_return'} ) : ( ), "", $text{'index_return'});