📄 en.pm
字号:
#!/bin/perl#my %lang;#use strict;# --------------------------------$Lang{Start_Archive} = "Start Archive";$Lang{Stop_Dequeue_Archive} = "Stop/Dequeue Archive";$Lang{Start_Full_Backup} = "Start Full Backup";$Lang{Start_Incr_Backup} = "Start Incr Backup";$Lang{Stop_Dequeue_Backup} = "Stop/Dequeue Backup";$Lang{Restore} = "Restore";$Lang{Type_full} = "full";$Lang{Type_incr} = "incremental";# -----$Lang{Only_privileged_users_can_view_admin_options} = "Only privileged users can view admin options.";$Lang{H_Admin_Options} = "BackupPC Server: Admin Options";$Lang{Admin_Options} = "Admin Options";$Lang{Admin_Options_Page} = <<EOF;\${h1(qq{$Lang{Admin_Options}})}<br>\${h2("Server Control")}<form name="ReloadForm" action="\$MyURL" method="get"><input type="hidden" name="action" value=""><table class="tableStnd"> <tr><td>Reload the server configuration:<td><input type="button" value="Reload" onClick="document.ReloadForm.action.value='Reload'; document.ReloadForm.submit();"></table></form><!--\${h2("Server Configuration")}<ul> <li><i>Other options can go here... e.g.,</i> <li>Edit server configuration</ul>-->EOF$Lang{Unable_to_connect_to_BackupPC_server} = "Unable to connect to BackupPC server", "This CGI script (\$MyURL) is unable to connect to the BackupPC" . " server on \$Conf{ServerHost} port \$Conf{ServerPort}. The error" . " was: \$err.", "Perhaps the BackupPC server is not running or there is a " . " configuration error. Please report this to your Sys Admin.";$Lang{Admin_Start_Server} = <<EOF;\${h1(qq{$Lang{Unable_to_connect_to_BackupPC_server}})}<form action="\$MyURL" method="get">The BackupPC server at <tt>\$Conf{ServerHost}</tt> port <tt>\$Conf{ServerPort}</tt>is not currently running (maybe you just stopped it, or haven't yet started it).<br>Do you want to start it?<input type="hidden" name="action" value="startServer"><input type="submit" value="Start Server" name="ignore"></form>EOF# -----$Lang{H_BackupPC_Server_Status} = "BackupPC Server Status";$Lang{BackupPC_Server_Status_General_Info}= <<EOF;\${h2(\"General Server Information\")}<ul><li> The servers PID is \$Info{pid}, on host \$Conf{ServerHost}, version \$Info{Version}, started at \$serverStartTime.<li> This status was generated at \$now.<li> The configuration was last loaded at \$configLoadTime.<li> PCs will be next queued at \$nextWakeupTime.<li> Other info: <ul> <li>\$numBgQueue pending backup requests from last scheduled wakeup, <li>\$numUserQueue pending user backup requests, <li>\$numCmdQueue pending command requests, \$poolInfo <li>Pool file system was recently at \$Info{DUlastValue}% (\$DUlastTime), today\'s max is \$Info{DUDailyMax}% (\$DUmaxTime) and yesterday\'s max was \$Info{DUDailyMaxPrev}%. </ul></ul>EOF$Lang{BackupPC_Server_Status} = <<EOF;\${h1(qq{$Lang{H_BackupPC_Server_Status}})}<p>\$generalInfo\${h2("Currently Running Jobs")}<p><table class="tableStnd" border cellspacing="1" cellpadding="3"><tr class="tableheader"><td> Host </td> <td> Type </td> <td> User </td> <td> Start Time </td> <td> Command </td> <td align="center"> PID </td> <td align="center"> Xfer PID </td> </tr>\$jobStr</table><p>\${h2("Failures that need attention")}<p><table class="tableStnd" border cellspacing="1" cellpadding="3"><tr class="tableheader"><td align="center"> Host </td> <td align="center"> Type </td> <td align="center"> User </td> <td align="center"> Last Try </td> <td align="center"> Details </td> <td align="center"> Error Time </td> <td> Last error (other than no ping) </td></tr>\$statusStr</table>EOF# --------------------------------$Lang{BackupPC__Server_Summary} = "BackupPC: Host Summary";$Lang{BackupPC__Archive} = "BackupPC: Archive";$Lang{BackupPC_Summary} = <<EOF;\${h1(qq{$Lang{BackupPC__Server_Summary}})}<p><ul><li>This status was generated at \$now.<li>Pool file system was recently at \$Info{DUlastValue}% (\$DUlastTime), today\'s max is \$Info{DUDailyMax}% (\$DUmaxTime) and yesterday\'s max was \$Info{DUDailyMaxPrev}%.</ul></p>\${h2("Hosts with good Backups")}<p>There are \$hostCntGood hosts that have been backed up, for a total of:<ul><li> \$fullTot full backups of total size \${fullSizeTot}GB (prior to pooling and compression),<li> \$incrTot incr backups of total size \${incrSizeTot}GB (prior to pooling and compression).</ul></p><table class="sortable" id="host_summary_backups" border cellpadding="3" cellspacing="1"><tr class="tableheader"><td> Host </td> <td align="center"> User </td> <td align="center"> #Full </td> <td align="center"> Full Age (days) </td> <td align="center"> Full Size (GB) </td> <td align="center"> Speed (MB/s) </td> <td align="center"> #Incr </td> <td align="center"> Incr Age (days) </td> <td align="center"> Last Backup (days) </td> <td align="center"> State </td> <td align="center"> Last attempt </td></tr>\$strGood</table><br><br>\${h2("Hosts with no Backups")}<p>There are \$hostCntNone hosts with no backups.<p><table class="sortable" id="host_summary_nobackups" border cellpadding="3" cellspacing="1"><tr class="tableheader"><td> Host </td> <td align="center"> User </td> <td align="center"> #Full </td> <td align="center"> Full Age (days) </td> <td align="center"> Full Size (GB) </td> <td align="center"> Speed (MB/s) </td> <td align="center"> #Incr </td> <td align="center"> Incr Age/days </td> <td align="center"> Last Backup (days) </td> <td align="center"> State </td> <td align="center"> Last attempt </td></tr>\$strNone</table>EOF$Lang{BackupPC_Archive} = <<EOF;\${h1(qq{$Lang{BackupPC__Archive}})}<script language="javascript" type="text/javascript"><!-- function checkAll(location) { for (var i=0;i<document.form1.elements.length;i++) { var e = document.form1.elements[i]; if ((e.checked || !e.checked) && e.name != \'all\') { if (eval("document.form1."+location+".checked")) { e.checked = true; } else { e.checked = false; } } } } function toggleThis(checkbox) { var cb = eval("document.form1."+checkbox); cb.checked = !cb.checked; }//--></script>There are \$hostCntGood hosts that have been backed up for a total size of \${fullSizeTot}GB<p><form name="form1" method="post" action="\$MyURL"><input type="hidden" name="fcbMax" value="\$checkBoxCnt"><input type="hidden" name="type" value="1"><input type="hidden" name="host" value="\${EscHTML(\$archHost)}"><input type="hidden" name="action" value="Archive"><table class="tableStnd" border cellpadding="3" cellspacing="1"><tr class="tableheader"><td align=center> Host</td> <td align="center"> User </td> <td align="center"> Backup Size </td>\$strGood\$checkAllHosts</table></form><p>EOF$Lang{BackupPC_Archive2} = <<EOF;\${h1(qq{$Lang{BackupPC__Archive}})}About to archive the following hosts<ul>\$HostListStr</ul><form action="\$MyURL" method="post">\$hiddenStr<input type="hidden" name="action" value="Archive"><input type="hidden" name="host" value="\${EscHTML(\$archHost)}"><input type="hidden" name="type" value="2"><input type="hidden" value="0" name="archive_type"><table class="tableStnd" border cellspacing="1" cellpadding="3">\$paramStr<tr> <td colspan=2><input type="submit" value="Start the Archive" name="ignore"></td></tr></form></table>EOF$Lang{BackupPC_Archive2_location} = <<EOF;<tr> <td>Archive Location/Device</td> <td><input type="text" value="\$ArchiveDest" name="archive_device"></td></tr>EOF$Lang{BackupPC_Archive2_compression} = <<EOF;<tr> <td>Compression</td> <td> <input type="radio" value="0" name="compression" \$ArchiveCompNone>None<br> <input type="radio" value="1" name="compression" \$ArchiveCompGzip>gzip<br> <input type="radio" value="2" name="compression" \$ArchiveCompBzip2>bzip2 </td></tr>EOF$Lang{BackupPC_Archive2_parity} = <<EOF;<tr> <td>Percentage of Parity Data (0 = disable, 5 = typical)</td> <td><input type="numeric" value="\$ArchivePar" name="par"></td></tr>EOF$Lang{BackupPC_Archive2_split} = <<EOF;<tr> <td>Split output into</td> <td><input type="numeric" value="\$ArchiveSplit" name="splitsize">Megabytes</td></tr>EOF# -----------------------------------$Lang{Pool_Stat} = <<EOF; <li>Pool is \${poolSize}GB comprising \$info->{"\${name}FileCnt"} files and \$info->{"\${name}DirCnt"} directories (as of \$poolTime), <li>Pool hashing gives \$info->{"\${name}FileCntRep"} repeated files with longest chain \$info->{"\${name}FileRepMax"}, <li>Nightly cleanup removed \$info->{"\${name}FileCntRm"} files of size \${poolRmSize}GB (around \$poolTime),EOF# --------------------------------$Lang{BackupPC__Backup_Requested_on__host} = "BackupPC: Backup Requested on \$host";# --------------------------------$Lang{REPLY_FROM_SERVER} = <<EOF;\${h1(\$str)}<p>Reply from server was: \$reply<p>Go back to <a href="\$MyURL?host=\$host">\$host home page</a>.EOF# --------------------------------$Lang{BackupPC__Start_Backup_Confirm_on__host} = "BackupPC: Start Backup Confirm on \$host";# --------------------------------$Lang{Are_you_sure_start} = <<EOF;\${h1("Are you sure?")}<p>You are about to start a \$type backup on \$host.<form name="Confirm" action="\$MyURL" method="get"><input type="hidden" name="host" value="\$host"><input type="hidden" name="hostIP" value="\$ipAddr"><input type="hidden" name="doit" value="1"><input type="hidden" name="action" value="">Do you really want to do this?<input type="button" value="\$buttonText" onClick="document.Confirm.action.value='\$In{action}'; document.Confirm.submit();"><input type="submit" value="No" name="ignore"></form>EOF# --------------------------------$Lang{BackupPC__Stop_Backup_Confirm_on__host} = "BackupPC: Stop Backup Confirm on \$host";# --------------------------------$Lang{Are_you_sure_stop} = <<EOF;\${h1("Are you sure?")}<p>You are about to stop/dequeue backups on \$host;<form name="Confirm" action="\$MyURL" method="get"><input type="hidden" name="host" value="\$host"><input type="hidden" name="doit" value="1"><input type="hidden" name="action" value="">Also, please don\'t start another backup for<input type="text" name="backoff" size="10" value="\$backoff"> hours.<p>Do you really want to do this?<input type="button" value="\$buttonText" onClick="document.Confirm.action.value='\$In{action}'; document.Confirm.submit();"><input type="submit" value="No" name="ignore"></form>EOF# --------------------------------$Lang{Only_privileged_users_can_view_queues_} = "Only privileged users can view queues.";# --------------------------------$Lang{Only_privileged_users_can_archive} = "Only privileged users can Archive.";# --------------------------------$Lang{BackupPC__Queue_Summary} = "BackupPC: Queue Summary";# --------------------------------$Lang{Backup_Queue_Summary} = <<EOF;\${h1("Backup Queue Summary")}<br><br>\${h2("User Queue Summary")}<p>The following user requests are currently queued:</p><table class="tableStnd" border cellspacing="1" cellpadding="3" width="80%"><tr class="tableheader"><td> Host </td> <td> Req Time </td> <td> User </td></tr>\$strUser</table><br><br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -