mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Removed useless directories
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
---- Changes since 1.130 ----
|
||||
Backup emails are now send using the Read User Mail module, removing any dependency on the Sendmail module.
|
||||
---- Changes since 1.140 ----
|
||||
Added support for backups that span multiple tapes. The user will be notified by email when a tape change is needed, after which is link on the module's main apge can be clicked to signal that the backup should continue.
|
||||
Added access control options to restrict a user to only performing backups or restores, or limit the directories he is allowed to backup. Thanks for Martin Mewese for sponsoring these two features.
|
||||
Added the ability to use tar for backups instead of dump commands, on Linux and FreeBSD. Tar will be used automatically for filesystems that do not have a dump command (like reiserfs), and can be enabled for all filesystems on the Module Config page.
|
||||
---- Changes since 1.150 ----
|
||||
Improved layout of dump form.
|
||||
---- Changes since 1.160 ----
|
||||
Added module configuration option to prevent prompting for a new tape if the curent one runs out of space.
|
||||
---- Changes since 1.170 ----
|
||||
When scheduling a dump, it can be specified to run after the completion of another backup dump. This makes it easy to backup multiple directories to a single tape.
|
||||
When creating a TAR format backup, multiple directories can be entered.
|
||||
---- Changes since 1.180 ----
|
||||
A password can now be specified for remote backups and restores via SSH, on Linux and BSD systems.
|
||||
---- Changes since 1.210 ----
|
||||
Added options on Linux systems to verify a backup once it is complete, and to re-mount with the noatime option when backing up.
|
||||
---- Changes since 1.260 ----
|
||||
If the before-backup command fails, the entire backup is halted.
|
||||
Added support for bzipping TAR archives on Linux systems.
|
||||
---- Changes since 1.270 ----
|
||||
Added checkboxes and a button for deleting multiple backups at once.
|
||||
The backup message subject can include variables like ${HOSTNAME}, which will be substituted when the email is sent.
|
||||
---- Changes since 1.290 ----
|
||||
Made the backup and new tape email contents translatable.
|
||||
Added an option for setting the path to the remote rmt command for tar format backups on Linux.
|
||||
On Linux and BSD systems, backups and restores in TAR or EXT formats can be done via FTP as well as SSH, RSH and to local files.
|
||||
@@ -1,56 +0,0 @@
|
||||
|
||||
do 'fsdump-lib.pl';
|
||||
|
||||
# acl_security_form(&options)
|
||||
# Output HTML for editing security options for the acl module
|
||||
sub acl_security_form
|
||||
{
|
||||
print "<tr> <td valign=top><b>$text{'acl_edit'}</b></td> <td valign=top>\n";
|
||||
printf "<input type=radio name=edit value=1 %s> %s\n",
|
||||
$_[0]->{'edit'} ? "checked" : "", $text{'yes'};
|
||||
printf "<input type=radio name=edit value=0 %s> %s</td>\n",
|
||||
$_[0]->{'edit'} ? "" : "checked", $text{'no'};
|
||||
|
||||
print "<td valign=top><b>$text{'acl_restore'}</b></td> <td valign=top>\n";
|
||||
printf "<input type=radio name=restore value=1 %s> %s\n",
|
||||
$_[0]->{'restore'} ? "checked" : "", $text{'yes'};
|
||||
printf "<input type=radio name=restore value=0 %s> %s</td> </tr>\n",
|
||||
$_[0]->{'restore'} ? "" : "checked", $text{'no'};
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'acl_cmds'}</b></td> <td valign=top>\n";
|
||||
printf "<input type=radio name=cmds value=1 %s> %s\n",
|
||||
$_[0]->{'cmds'} ? "checked" : "", $text{'yes'};
|
||||
printf "<input type=radio name=cmds value=0 %s> %s</td>\n",
|
||||
$_[0]->{'cmds'} ? "" : "checked", $text{'no'};
|
||||
|
||||
print "<td valign=top><b>$text{'acl_extra'}</b></td> <td valign=top>\n";
|
||||
printf "<input type=radio name=extra value=1 %s> %s\n",
|
||||
$_[0]->{'extra'} ? "checked" : "", $text{'yes'};
|
||||
printf "<input type=radio name=extra value=0 %s> %s</td> </tr>\n",
|
||||
$_[0]->{'extra'} ? "" : "checked", $text{'no'};
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'acl_dirs'}</b></td> <td colspan=3>\n";
|
||||
printf "<input type=radio name=dirs_def value=1 %s> %s\n",
|
||||
$_[0]->{'dirs'} eq "*" ? "checked" : "", $text{'acl_all'};
|
||||
printf "<input type=radio name=dirs_def value=0 %s> %s<br>\n",
|
||||
$_[0]->{'dirs'} eq "*" ? "" : "checked", $text{'acl_list'};
|
||||
print "<textarea name=dirs rows=5 cols=30>",
|
||||
$_[0]->{'dirs'} eq "*" ? "" :
|
||||
join("\n", split(/\t/, $_[0]->{'dirs'})),"</textarea></td> </tr>\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
# acl_security_save(&options)
|
||||
# Parse the form for security options for the acl module
|
||||
sub acl_security_save
|
||||
{
|
||||
$_[0]->{'edit'} = $in{'edit'};
|
||||
$_[0]->{'restore'} = $in{'restore'};
|
||||
$_[0]->{'cmds'} = $in{'cmds'};
|
||||
$_[0]->{'extra'} = $in{'extra'};
|
||||
$in{'dirs'} =~ s/\r//g;
|
||||
$_[0]->{'dirs'} = $in{'dirs_def'} ? "*" :
|
||||
join("\t", split(/\n/, $in{'dirs'}));
|
||||
}
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
#!/usr/local/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) {
|
||||
# Before command failed
|
||||
print "</pre>\n";
|
||||
print "<b>$text{'backup_beforefailed'}</b><p>\n";
|
||||
}
|
||||
else {
|
||||
# Do the dump
|
||||
$ok = &execute_dump($dump, STDOUT, 1, 0);
|
||||
$bok = &execute_after($dump, STDOUT, 1);
|
||||
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);
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
unlink($nfile);
|
||||
&webmin_log("backup", undef, undef, $dump);
|
||||
}
|
||||
|
||||
&ui_print_footer($access{'edit'} ? ( "edit_dump.cgi?id=$in{'id'}",
|
||||
$text{'edit_return'} ) : ( ),
|
||||
"", $text{'index_return'});
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# backup.pl
|
||||
# Perform a backup and send the results to someone
|
||||
|
||||
$no_acl_check++;
|
||||
require './fsdump-lib.pl';
|
||||
$dump = &get_dump($ARGV[0]);
|
||||
$dump->{'id'} || die "Dump $ARGV[0] does not exist!";
|
||||
|
||||
# Check if this backup is already running
|
||||
&foreign_require("proc", "proc-lib.pl");
|
||||
@procs = &proc::list_processes();
|
||||
@running = &running_dumps(\@procs);
|
||||
($running) = grep { $_->{'id'} eq $dump->{'id'} &&
|
||||
$_->{'pid'} != $$ } @running;
|
||||
|
||||
$sfile = "$module_config_directory/$dump->{'id'}.$$.status";
|
||||
if ($running) {
|
||||
# Already running! Do nothing ..
|
||||
$ok = 0;
|
||||
$out = &text('email_already', $running->{'pid'})."\n";
|
||||
}
|
||||
else {
|
||||
# Update status file
|
||||
%status = ( 'status' => 'running',
|
||||
'pid' => $$,
|
||||
'start' => time() );
|
||||
&write_file($sfile, \%status);
|
||||
|
||||
if ($dump->{'email'}) {
|
||||
# Save output for mailing
|
||||
$temp = &transname();
|
||||
open(OUT, ">$temp");
|
||||
}
|
||||
else {
|
||||
# Throw output away
|
||||
open(OUT, ">/dev/null");
|
||||
}
|
||||
|
||||
# Create tape change wrapper
|
||||
&create_wrappers();
|
||||
|
||||
$bok = &execute_before($dump, OUT, 0);
|
||||
if (!$bok) {
|
||||
# Before command failed!
|
||||
print OUT "\n$text{'email_ebefore'}\n";
|
||||
$status{'status'} = 'failed';
|
||||
}
|
||||
else {
|
||||
# Do the backup
|
||||
$ok = &execute_dump($dump, OUT, 0, 1);
|
||||
|
||||
# Re-update the status file
|
||||
if ($ok) {
|
||||
# Worked .. but verify if asked
|
||||
if ($dump->{'reverify'}) {
|
||||
print OUT "\n$text{'email_verify'}\n";
|
||||
$ok = &verify_dump($dump, OUT, 0, 1);
|
||||
}
|
||||
if ($ok) {
|
||||
$status{'status'} = 'complete';
|
||||
}
|
||||
else {
|
||||
$status{'status'} = 'verifyfailed';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$status{'status'} = 'failed';
|
||||
}
|
||||
}
|
||||
$status{'end'} = time();
|
||||
&write_file($sfile, \%status);
|
||||
|
||||
# Execute the post-backup script
|
||||
$bok = &execute_after($dump, OUT, 0);
|
||||
if (!$bok) {
|
||||
print OUT "\n$text{'email_eafter'}\n";
|
||||
$status{'status'} = 'failed';
|
||||
$ok = 0;
|
||||
}
|
||||
close(OUT);
|
||||
|
||||
if ($temp) {
|
||||
# Read output
|
||||
open(OUT, $temp);
|
||||
while(<OUT>) {
|
||||
s/\r//g;
|
||||
$out .= $_;
|
||||
}
|
||||
close(OUT);
|
||||
unlink($temp);
|
||||
}
|
||||
}
|
||||
|
||||
if ($out && $dump->{'email'} && &foreign_check("mailboxes")) {
|
||||
# Construct the email
|
||||
&foreign_require("mailboxes", "mailboxes-lib.pl");
|
||||
$host = &get_system_hostname();
|
||||
@dirs = &dump_directories($dump);
|
||||
$dirs = join(", ", @dirs);
|
||||
%hash = ( %$dirs, 'dirs' => $dirs );
|
||||
local $subject = &substitute_template($dump->{'subject'}, \%hash) ||
|
||||
&text('email_subject', $dirs, $host);
|
||||
local $data = &text('email_subject', $dirs, $host)."\n\n";
|
||||
$data .= $out;
|
||||
$data .= "\n";
|
||||
if ($ok) {
|
||||
$data .= $text{'email_ok'}."\n";
|
||||
}
|
||||
else {
|
||||
$data .= $text{'email_failed'}."\n";
|
||||
}
|
||||
|
||||
# Send the email
|
||||
if (!$ok || !$config{'error_email'}) {
|
||||
# Only send email upon failure, or it requested always
|
||||
&mailboxes::send_text_mail(&mailboxes::get_from_address(),
|
||||
$dump->{'email'},
|
||||
undef,
|
||||
$subject,
|
||||
$data,
|
||||
$config{'smtp_server'});
|
||||
}
|
||||
}
|
||||
|
||||
# Check for any dumps scheduled to run after this one
|
||||
foreach $follow (&list_dumps()) {
|
||||
if ($follow->{'follow'} == $dump->{'id'} && $follow->{'enabled'} == 2) {
|
||||
system("$cron_cmd $follow->{'id'}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
date_subs=0
|
||||
run_mode=0
|
||||
always_tar=0
|
||||
nonewtape=0
|
||||
error_email=0
|
||||
simple_sched=0
|
||||
@@ -1,7 +0,0 @@
|
||||
date_subs=Do <tt>strftime</tt> substitution of backup destinations?,1,1-Yes,0-No
|
||||
smtp_server=Send mail via SMTP server,3,Read User Mail module
|
||||
run_mode=Run backups in,1,0-Foreground,1-Background
|
||||
nonewtape=Prompt for new tape if full?,1,1-Yes,0-No
|
||||
always_tar=Always use TAR format for backups?,1,1-Yes,0-No
|
||||
error_email=Send backup email,1,0-Always,1-Only if error occurs
|
||||
simple_sched=Schedule selector format,1,1-Simple,0-Complex
|
||||
@@ -1,7 +0,0 @@
|
||||
date_subs=Fes la substitució <tt>strftime</tt> de les destinacions de la còpia,1,1-Sí,0-No
|
||||
smtp_server=Envia el correu via servidor SMTP,3,Mòdul de Lectura del Correu d'Usuaris
|
||||
run_mode=Executa les còpies,1,0-En primer pla,1-En segon pla
|
||||
nonewtape=Demana una cinta nova quan estigui plena,1,1-Sí,0-No
|
||||
always_tar=Fes servir sempre el format TAR per a les còpies,1,1-Sí,0-No
|
||||
error_email=Envia correu de la còpia,1,0-Sempre,1-Només si es produeix un error
|
||||
simple_sched=Format del selector de planificació,1,1-Simple,0-Complex
|
||||
@@ -1,6 +0,0 @@
|
||||
date_subs=<tt>strftime</tt>-Substitution der Backup-Ziele?,1,1-Ja,0-Nein
|
||||
smtp_server=Sende E-Mail über SMTP-Server,3,Lese Benutzer-E-Mail-Modul
|
||||
run_mode=Starte Backups im,1,0-Vordergrund,1-Hintergund
|
||||
nonewtape=Neues Band anfordern, wenn das eingelegte voll ist?,1,1-Ja,0-Nein
|
||||
always_tar=Benutze immer TAR-Format für Backups?,1,1-Ja,0-Nein
|
||||
error_email=Sende Benachrichtigungs-E-Mail,1,0-Immer,1-Nur wenn Fehler auftreten
|
||||
@@ -1,6 +0,0 @@
|
||||
date_subs=¿Hacer sustitución <tt>strftime</tt> de los destinos de copia de seguridad?,1,1-Sí,0-No
|
||||
smtp_server=Enviar correo via servidor SMTP,3,Módulo de Lectura de Correo de Usuarios
|
||||
run_mode=Crear copias de seguridad en,1,0-Primer plano,1-Segundo plano
|
||||
nonewtape=¿Pedir nueva cinta si se llena?,1,1-Sí,0-No
|
||||
always_tar=¿Utilizar siempre formato TAR para las copias de seguridad?,1,1-Sí,0-No
|
||||
error_email=Mandar email de copia de seguridad,1,0-Siempre,1-Sólo si ocurre un error
|
||||
@@ -1 +0,0 @@
|
||||
date_subs=Заменять место назначения резервной копии с помощью <tt>strftime</tt>?,1,1-Да,0-Нет
|
||||
@@ -1 +0,0 @@
|
||||
date_subs=Заменять место назначения резервной копии с помощью <tt>strftime</tt>?,1,1-Да,0-Нет
|
||||
@@ -1,2 +0,0 @@
|
||||
date_subs=<3D>אל³ם<C2B3>עט ל³סצו ןנטחםאקוםם<D79D> נוחונגםמ<D79D> ךמן³<D79F> חא המןמלמדמ <tt>strftime</tt>?,1,1-הא,0-םולא÷
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
edit=1
|
||||
restore=1
|
||||
dirs=*
|
||||
cmds=1
|
||||
extra=1
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Delete a bunch of backups
|
||||
|
||||
require './fsdump-lib.pl';
|
||||
&foreign_require("cron", "cron-lib.pl");
|
||||
&ReadParse();
|
||||
&error_setup($text{'delete_err'});
|
||||
@d = split(/\0/, $in{'d'});
|
||||
@d || &error($text{'delete_enone'});
|
||||
|
||||
# Delete each one, and its cron job
|
||||
foreach $d (@d) {
|
||||
$dump = &get_dump($d);
|
||||
$access{'edit'} && &can_edit_dir($dump) ||
|
||||
&error($text{'dump_ecannot2'});
|
||||
@jobs = &foreign_call("cron", "list_cron_jobs");
|
||||
($job) = grep { $_->{'command'} eq "$cron_cmd $dump->{'id'}" } @jobs;
|
||||
&delete_dump($dump);
|
||||
if ($job) {
|
||||
&lock_file($job->{'file'});
|
||||
&foreign_call("cron", "delete_cron_job", $job);
|
||||
&unlock_file($job->{'file'});
|
||||
}
|
||||
}
|
||||
|
||||
&webmin_log("delete", "dumps", scalar(@d));
|
||||
&redirect("");
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# edit_dump.cgi
|
||||
# Edit or create a filesystem backup
|
||||
|
||||
require './fsdump-lib.pl';
|
||||
&foreign_require("cron", "cron-lib.pl");
|
||||
&ReadParse();
|
||||
|
||||
if (!$in{'id'}) {
|
||||
# Adding a new backup of some type
|
||||
$access{'edit'} || &error($text{'dump_ecannot1'});
|
||||
&error_setup($text{'edit_err'});
|
||||
$in{'dir'} || &error($text{'edit_edir'});
|
||||
if ($supports_tar && ($config{'always_tar'} || $in{'forcetar'})) {
|
||||
# Always use tar format
|
||||
$fs = "tar";
|
||||
}
|
||||
else {
|
||||
# Work out filesystem type
|
||||
$fs = &directory_filesystem($in{'dir'});
|
||||
@supp = &supported_filesystems();
|
||||
if (&indexof($fs, @supp) < 0) {
|
||||
if ($supports_tar) {
|
||||
$fs = "tar"; # fall back to tar mode
|
||||
}
|
||||
else {
|
||||
&error(&text('edit_efs', uc($fs)));
|
||||
}
|
||||
}
|
||||
}
|
||||
&ui_print_header(undef, $text{'edit_title'}, "", "edit");
|
||||
$dump = { 'dir' => $in{'dir'},
|
||||
'fs' => $fs,
|
||||
$config{'simple_sched'} ?
|
||||
( 'special' => 'daily' ) :
|
||||
( 'mins' => '0',
|
||||
'hours' => '0',
|
||||
'days' => '*',
|
||||
'months' => '*',
|
||||
'weekdays' => '*' ) };
|
||||
}
|
||||
else {
|
||||
# Editing an existing backup
|
||||
$dump = &get_dump($in{'id'});
|
||||
$access{'edit'} && &can_edit_dir($dump) ||
|
||||
&error($text{'dump_ecannot2'});
|
||||
&ui_print_header(undef, $text{'edit_title2'}, "", "create");
|
||||
}
|
||||
|
||||
print "<form action=save_dump.cgi>\n";
|
||||
print "<input type=hidden name=id value='$in{'id'}'>\n";
|
||||
print "<input type=hidden name=fs value='$dump->{'fs'}'>\n";
|
||||
print "<table border width=100%>\n";
|
||||
print "<tr $tb> <td><b>",&text('edit_header', uc($dump->{'fs'})),
|
||||
"</b></td> </tr>\n";
|
||||
print "<tr $cb> <td><table width=100%>\n";
|
||||
|
||||
print "<tr> <td><b>$text{'dump_format'}</b></td>\n";
|
||||
print "<td>",$dump->{'fs'} eq 'tar' ? $text{'dump_tar'}
|
||||
: &text('dump_dumpfs', uc($dump->{'fs'})),"</td> </tr>\n";
|
||||
|
||||
if (!&multiple_directory_support($dump->{'fs'})) {
|
||||
# One directory
|
||||
print "<tr> <td><b>",&hlink($text{'dump_dir'}, "dir"),"</b></td>\n";
|
||||
printf "<td colspan=3>".
|
||||
"<input name=dir size=50 value='%s'> %s</td> </tr>\n",
|
||||
$dump->{'dir'}, &file_chooser_button("dir", 1);
|
||||
}
|
||||
else {
|
||||
# Multiple directories
|
||||
print "<tr> <td valign=top><b>",
|
||||
&hlink($text{'dump_dirs'}, "dirs"),"</b></td>\n";
|
||||
print "<td colspan=3><textarea name=dir rows=3 cols=50>",
|
||||
join("\n", &dump_directories($dump)),
|
||||
"</textarea></td> </tr>\n";
|
||||
}
|
||||
|
||||
&dump_form($dump);
|
||||
if (defined(&dump_options_form)) {
|
||||
&new_header($text{'edit_header3'});
|
||||
&dump_options_form($dump);
|
||||
}
|
||||
|
||||
if (defined(&verify_dump)) {
|
||||
# Add option to verify, if supported
|
||||
print "<tr><td><b>",&hlink($text{'dump_reverify'},"reverify"),
|
||||
"</b></td>\n";
|
||||
print "<td>",&ui_yesno_radio("reverify",
|
||||
int($dump->{'reverify'})),"</td> </tr>\n";
|
||||
}
|
||||
|
||||
if ($access{'extra'}) {
|
||||
print "<tr> <td><b>",&hlink($text{'dump_extra'}, "extra"),"</b></td>\n";
|
||||
printf "<td colspan=3><input name=extra size=60 value='%s'></td> </tr>\n",
|
||||
$dump->{'extra'};
|
||||
}
|
||||
|
||||
if ($access{'cmds'}) {
|
||||
print "<tr> <td><b>",&hlink($text{'dump_before'},"before"),"</b></td>\n";
|
||||
printf "<td colspan=3><input name=before size=60 value='%s'></td> </tr>\n",
|
||||
$dump->{'before'};
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'dump_after'},"after"),"</b></td>\n";
|
||||
printf "<td colspan=3><input name=after size=60 value='%s'></td> </tr>\n",
|
||||
$dump->{'after'};
|
||||
}
|
||||
|
||||
&new_header($text{'edit_header2'});
|
||||
|
||||
# Show input for selecting when to run a dump, which can be never, on schedule
|
||||
# or after some other dump
|
||||
@dlist = grep { $_->{'id'} ne $in{'id'} } &list_dumps();
|
||||
if (@dlist) {
|
||||
$follow = &ui_select("follow", $dump->{'follow'},
|
||||
[ map { [ $_->{'id'},
|
||||
&text(defined($_->{'level'}) ? 'edit_tolevel' : 'edit_to',
|
||||
$_->{'dir'}, &dump_dest($_), $_->{'level'}) ] }
|
||||
@dlist ]);
|
||||
}
|
||||
print "<tr> <td valign=top><b>",&hlink($text{'edit_enabled'}, "enabled"),
|
||||
"</b></td>\n";
|
||||
print "<td colspan=3>",
|
||||
&ui_radio("enabled", $dump->{'follow'} ? 2 :
|
||||
$dump->{'enabled'} ? 1 : 0,
|
||||
[ [ 0, $text{'edit_enabled_no'}."<br>" ],
|
||||
@dlist ?
|
||||
( [ 2, $text{'edit_enabled_af'}." ".$follow."<br>" ] ) : ( ),
|
||||
[ 1, $text{'edit_enabled_yes'} ] ]),"</td> </tr>\n";
|
||||
|
||||
# Email address to send output to
|
||||
print "<tr> <td><b>",&hlink($text{'edit_email'}, "email"),"</b></td>\n";
|
||||
printf "<td colspan=3><input name=email size=30 value='%s'></td> </tr>\n",
|
||||
$dump->{'email'};
|
||||
|
||||
# Subject line for email message
|
||||
print "<tr> <td><b>",&hlink($text{'edit_subject'}, "subject"),"</b></td>\n";
|
||||
printf "<td colspan=3><input type=radio name=subject_def value=1 %s> %s\n",
|
||||
$dump->{'subject'} ? "" : "checked", $text{'default'};
|
||||
printf "<input type=radio name=subject_def value=0 %s>\n",
|
||||
$dump->{'subject'} ? "checked" : "";
|
||||
printf "<input name=subject size=40 value='%s'></td> </tr>\n",
|
||||
$dump->{'subject'};
|
||||
|
||||
if (!$config{'simple_sched'} || ($dump && !$dump->{'special'})) {
|
||||
# Complex Cron time input
|
||||
print "</table>\n";
|
||||
print "<table border width=100%>\n";
|
||||
&foreign_call("cron", "show_times_input", $dump);
|
||||
print "</table>\n";
|
||||
}
|
||||
else {
|
||||
# Simple input
|
||||
print &ui_hidden("special_def", 1),"\n";
|
||||
print "<tr> <td><b>",&hlink($text{'edit_special'}, "special"),"</b></td>\n";
|
||||
print "<td>",&ui_select("special", $dump->{'special'},
|
||||
[ map { [ $_, $cron::text{'edit_special_'.$_} ] }
|
||||
('hourly', 'daily', 'weekly', 'monthly', 'yearly') ]),
|
||||
"</td> </tr>\n";
|
||||
print "</table>\n";
|
||||
}
|
||||
print "</td></tr></table>\n";
|
||||
|
||||
print "<table width=100%><tr>\n";
|
||||
if ($in{'id'}) {
|
||||
print "<td><input type=submit value='$text{'save'}'></td>\n";
|
||||
print "<td align=middle><input type=submit name=savenow ",
|
||||
"value='$text{'edit_savenow'}'></td>\n";
|
||||
print "<td align=middle><input type=submit name=restore ",
|
||||
"value='$text{'edit_restore'}'></td>\n";
|
||||
print "<td align=right><input type=submit name=delete ",
|
||||
"value='$text{'delete'}'></td>\n";
|
||||
}
|
||||
else {
|
||||
print "<td><input type=submit value='$text{'create'}'></td>\n";
|
||||
print "<td align=right><input type=submit name=savenow ",
|
||||
"value='$text{'edit_createnow'}'></td>\n";
|
||||
}
|
||||
print "</tr></table></form>\n";
|
||||
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
do 'fsdump-lib.pl';
|
||||
|
||||
sub feedback_files
|
||||
{
|
||||
local (@rv, $f);
|
||||
opendir(DIR, $module_config_directory);
|
||||
foreach $f (readdir(DIR)) {
|
||||
push(@rv, "$module_config_directory/$f") if ($f =~ /\.dump$/);
|
||||
}
|
||||
closedir(DIR);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,489 +0,0 @@
|
||||
# freebsd-lib.pl
|
||||
|
||||
# supported_filesystems()
|
||||
# Returns a list of filesystem types on which dumping is supported
|
||||
sub supported_filesystems
|
||||
{
|
||||
local @rv;
|
||||
push(@rv, "ufs") if (&has_command("dump"));
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# multiple_directory_support(fs)
|
||||
# Returns 1 if some filesystem dump supports multiple directories
|
||||
sub multiple_directory_support
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
$supports_tar = 1;
|
||||
$tar_command = &has_command("gtar") || &has_command("tar");
|
||||
|
||||
# dump_form(&dump)
|
||||
sub dump_form
|
||||
{
|
||||
# Display common options
|
||||
print "<tr> <td valign=top><b>",&hlink($text{'dump_dest'}, "dest"),
|
||||
"</b></td> <td colspan=3>\n";
|
||||
printf "<input type=radio name=mode value=0 %s> %s\n",
|
||||
$_[0]->{'host'} ? '' : 'checked', $text{'dump_file'};
|
||||
printf "<input name=file size=50 value='%s'> %s<br>\n",
|
||||
$_[0]->{'host'} ? '' : $_[0]->{'file'},
|
||||
&file_chooser_button("file");
|
||||
printf "<input type=radio name=mode value=1 %s>\n",
|
||||
$_[0]->{'host'} ? 'checked' : '';
|
||||
print &text('dump_host',
|
||||
"<input name=host size=15 value='$_[0]->{'host'}'>",
|
||||
"<input name=huser size=8 value='$_[0]->{'huser'}'>",
|
||||
"<input name=hfile size=20 value='$_[0]->{'hfile'}'>"),
|
||||
"</td> </tr>\n";
|
||||
|
||||
if ($_[0]->{'fs'} eq 'tar') {
|
||||
# Display gnutar options
|
||||
print "<tr> <td><b>",&hlink($text{'dump_rsh'},"rsh"),
|
||||
"</b></td>\n";
|
||||
print "<td colspan=3>",
|
||||
&rsh_command_input("rsh_def", "rsh", $_[0]->{'rsh'}),
|
||||
"</td> </tr>\n";
|
||||
|
||||
# Password option for SSH
|
||||
print "<tr> <td><b>",&hlink($text{'dump_pass'},"pass"),
|
||||
"</b></td>\n";
|
||||
print "<td colspan=3>",&ui_password("pass", $_[0]->{'pass'}, 20),
|
||||
"</td> </tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub dump_options_form
|
||||
{
|
||||
if ($_[0]->{'fs'} eq 'tar') {
|
||||
# Display gnutar options
|
||||
print "<tr> <td><b>",&hlink($text{'dump_label'},"label"),"</b></td>\n";
|
||||
printf "<td><input name=label size=15 value='%s'></td> </tr>\n",
|
||||
$_[0]->{'label'};
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'dump_blocks'},"blocks"),
|
||||
"</b></td> <td colspan=3>\n";
|
||||
printf "<input name=blocks_def type=radio value=1 %s> %s\n",
|
||||
$_[0]->{'blocks'} ? '' : 'checked', $text{'dump_auto'};
|
||||
printf "<input name=blocks_def type=radio value=0 %s>\n",
|
||||
$_[0]->{'blocks'} ? 'checked' : '';
|
||||
printf "<input name=blocks size=8 value='%s'> kB</td> </tr>\n",
|
||||
$_[0]->{'blocks'};
|
||||
|
||||
print "<tr><td><b>",&hlink($text{'dump_gzip'},"gzip"),"</b></td>\n";
|
||||
printf "<td><input name=gzip type=radio value=1 %s> %s\n",
|
||||
$_[0]->{'gzip'} ? 'checked' : '', $text{'yes'};
|
||||
printf "<input name=gzip type=radio value=0 %s> %s</td>\n",
|
||||
$_[0]->{'gzip'} ? '' : 'checked', $text{'no'};
|
||||
|
||||
print "<td><b>",&hlink($text{'dump_multi'},"multi"),"</b></td>\n";
|
||||
printf "<td><input name=multi type=radio value=1 %s> %s\n",
|
||||
$_[0]->{'multi'} ? 'checked' : '', $text{'yes'};
|
||||
printf "<input name=multi type=radio value=0 %s> %s</td> </tr>\n",
|
||||
$_[0]->{'multi'} ? '' : 'checked', $text{'no'};
|
||||
|
||||
print "<tr><td><b>",&hlink($text{'dump_links'},"links"),"</b></td>\n";
|
||||
printf "<td><input name=links type=radio value=1 %s> %s\n",
|
||||
$_[0]->{'links'} ? 'checked' : '', $text{'yes'};
|
||||
printf "<input name=links type=radio value=0 %s> %s</td>\n",
|
||||
$_[0]->{'links'} ? '' : 'checked', $text{'no'};
|
||||
|
||||
print "<td><b>",&hlink($text{'dump_xdev'},"xdev"),"</b></td>\n";
|
||||
printf "<td><input name=xdev type=radio value=1 %s> %s\n",
|
||||
$_[0]->{'xdev'} ? 'checked' : '', $text{'yes'};
|
||||
printf "<input name=xdev type=radio value=0 %s> %s</td> </tr>\n",
|
||||
$_[0]->{'xdev'} ? '' : 'checked', $text{'no'};
|
||||
}
|
||||
else {
|
||||
# Display ufs backup options
|
||||
print "<tr> <td><b>",&hlink($text{'dump_update'},"update"),
|
||||
"</b></td>\n";
|
||||
printf "<td><input name=update type=radio value=1 %s> %s\n",
|
||||
$_[0]->{'update'} ? 'checked' : '', $text{'yes'};
|
||||
printf "<input name=update type=radio value=0 %s> %s</td>\n",
|
||||
$_[0]->{'update'} ? '' : 'checked', $text{'no'};
|
||||
|
||||
print "<td><b>",&hlink($text{'dump_level'},"level"),"</b></td>\n";
|
||||
print "<td><select name=level>\n";
|
||||
foreach $l (0 .. 9) {
|
||||
printf "<option value=%d %s>%d %s\n",
|
||||
$l, $_[0]->{'level'} == $l ? "selected" : "", $l,
|
||||
$text{'dump_level_'.$l};
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'dump_blocks'},"blocks"),
|
||||
"</b></td> <td colspan=3>\n";
|
||||
printf "<input name=blocks_def type=radio value=1 %s> %s\n",
|
||||
$_[0]->{'blocks'} ? '' : 'checked', $text{'dump_auto'};
|
||||
printf "<input name=blocks_def type=radio value=0 %s>\n",
|
||||
$_[0]->{'blocks'} ? 'checked' : '';
|
||||
printf "<input name=blocks size=8 value='%s'> kB</td> </tr>\n",
|
||||
$_[0]->{'blocks'};
|
||||
|
||||
print "<tr><td><b>",&hlink($text{'dump_honour'},"honour"),"</b></td>\n";
|
||||
printf "<td><input name=honour type=radio value=1 %s> %s\n",
|
||||
$_[0]->{'honour'} ? 'checked' : '', $text{'yes'};
|
||||
printf "<input name=honour type=radio value=0 %s> %s</td>\n",
|
||||
$_[0]->{'honour'} ? '' : 'checked', $text{'no'};
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
# parse_dump(&dump)
|
||||
sub parse_dump
|
||||
{
|
||||
# Parse common options
|
||||
if ($in{'mode'} == 0) {
|
||||
$in{'file'} =~ /\S/ || &error($text{'dump_efile'});
|
||||
$_[0]->{'file'} = $in{'file'};
|
||||
delete($_[0]->{'host'});
|
||||
delete($_[0]->{'huser'});
|
||||
delete($_[0]->{'hfile'});
|
||||
}
|
||||
else {
|
||||
gethostbyname($in{'host'}) || &check_ipaddress($in{'host'}) ||
|
||||
&error($text{'dump_ehost'});
|
||||
$_[0]->{'host'} = $in{'host'};
|
||||
$in{'huser'} =~ /^\S+$/ || &error($text{'dump_ehuser'});
|
||||
$_[0]->{'huser'} = $in{'huser'};
|
||||
$in{'hfile'} || &error($text{'dump_ehfile'});
|
||||
$_[0]->{'hfile'} = $in{'hfile'};
|
||||
delete($_[0]->{'file'});
|
||||
}
|
||||
|
||||
if ($_[0]->{'fs'} eq 'tar') {
|
||||
# Parse tar options
|
||||
$_[0]->{'rsh'} = &rsh_command_parse("rsh_def", "rsh");
|
||||
$_[0]->{'pass'} = $in{'pass'};
|
||||
$in{'label'} =~ /^\S*$/ && length($in{'label'}) < 16 ||
|
||||
&error($text{'dump_elabel'});
|
||||
$_[0]->{'label'} = $in{'label'};
|
||||
if ($in{'blocks_def'}) {
|
||||
delete($_[0]->{'blocks'});
|
||||
}
|
||||
else {
|
||||
$in{'blocks'} =~ /^\d+$/ || &error($text{'dump_eblocks'});
|
||||
$_[0]->{'blocks'} = $in{'blocks'};
|
||||
$in{'gzip'} && &error($text{'dump_egzip'});
|
||||
}
|
||||
$_[0]->{'gzip'} = $in{'gzip'};
|
||||
$_[0]->{'multi'} = $in{'multi'};
|
||||
$_[0]->{'links'} = $in{'links'};
|
||||
$_[0]->{'xdev'} = $in{'xdev'};
|
||||
if ($in{'multi'}) {
|
||||
!-c $in{'file'} && !-b $in{'file'} ||
|
||||
&error($text{'dump_emulti'});
|
||||
$in{'gzip'} && &error($text{'dump_egzip2'});
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Parse ufs options
|
||||
local $mp;
|
||||
foreach $m (&foreign_call("mount", "list_mounted")) {
|
||||
$mp++ if ($m->[0] eq $in{'dir'});
|
||||
}
|
||||
$mp || &error($text{'dump_emp'});
|
||||
|
||||
$_[0]->{'update'} = $in{'update'};
|
||||
$_[0]->{'level'} = $in{'level'};
|
||||
$_[0]->{'honour'} = $in{'honour'};
|
||||
if ($in{'blocks_def'}) {
|
||||
delete($_[0]->{'blocks'});
|
||||
}
|
||||
else {
|
||||
$in{'blocks'} =~ /^\d+$/ || &error($text{'dump_eblocks'});
|
||||
$_[0]->{'blocks'} = $in{'blocks'};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# execute_dump(&dump, filehandle, escape)
|
||||
# Executes a dump and displays the output
|
||||
sub execute_dump
|
||||
{
|
||||
local $fh = $_[1];
|
||||
local ($cmd, $flags);
|
||||
|
||||
if ($_[0]->{'huser'}) {
|
||||
$flags = "-f '$_[0]->{'huser'}\@$_[0]->{'host'}:".
|
||||
&date_subs($_[0]->{'hfile'})."'";
|
||||
}
|
||||
elsif ($_[0]->{'host'}) {
|
||||
$flags = "-f '$_[0]->{'host'}:".&date_subs($_[0]->{'hfile'})."'";
|
||||
}
|
||||
else {
|
||||
$flags = "-f '".&date_subs($_[0]->{'file'})."'";
|
||||
}
|
||||
local $tapecmd = $_[0]->{'multi'} && $_[0]->{'fs'} eq 'tar' ? $multi_cmd :
|
||||
$_[0]->{'multi'} ? undef :
|
||||
$_[3] && !$config{'nonewtape'} ? $newtape_cmd : $notape_cmd;
|
||||
if ($_[0]->{'fs'} eq 'tar') {
|
||||
# Construct tar command
|
||||
$cmd = "$tar_command -c $flags";
|
||||
$cmd .= " -V '$_[0]->{'label'}'" if ($_[0]->{'label'});
|
||||
$cmd .= " -L $_[0]->{'blocks'}" if ($_[0]->{'blocks'});
|
||||
$cmd .= " -z" if ($_[0]->{'gzip'});
|
||||
$cmd .= " -M" if ($_[0]->{'multi'});
|
||||
$cmd .= " -h" if ($_[0]->{'links'});
|
||||
$cmd .= " -l" if ($_[0]->{'xdev'});
|
||||
$cmd .= " -F \"$tapecmd $_[0]->{'id'}\"" if (!$_[0]->{'gzip'});
|
||||
$cmd .= " --rsh-command=$_[0]->{'rsh'}" if ($_[0]->{'rsh'});
|
||||
$cmd .= " $_[0]->{'extra'}" if ($_[0]->{'extra'});
|
||||
$cmd .= " '$_[0]->{'dir'}'";
|
||||
}
|
||||
else {
|
||||
# Construct ufs dump command
|
||||
$cmd = "dump -$_[0]->{'level'} $flags";
|
||||
$cmd .= " -u" if ($_[0]->{'update'});
|
||||
if ($_[0]->{'blocks'}) {
|
||||
$cmd .= " -B $_[0]->{'blocks'}";
|
||||
}
|
||||
else {
|
||||
$cmd .= " -a";
|
||||
}
|
||||
$cmd .= " -h 0" if ($_[0]->{'honour'});
|
||||
$cmd .= " $_[0]->{'extra'}" if ($_[0]->{'extra'});
|
||||
$cmd .= " '$_[0]->{'dir'}'";
|
||||
}
|
||||
|
||||
&system_logged("sync");
|
||||
sleep(1);
|
||||
local $got = &run_ssh_command($cmd, $fh, $_[2], $_[0]->{'pass'});
|
||||
if ($_[0]->{'multi'} && $_[0]->{'fs'} eq 'tar') {
|
||||
# Run multi-file switch command one last time
|
||||
&execute_command("$multi_cmd $_[0]->{'id'} >/dev/null 2>&1");
|
||||
}
|
||||
return $got ? 0 : 1;
|
||||
}
|
||||
|
||||
# dump_dest(&dump)
|
||||
sub dump_dest
|
||||
{
|
||||
if ($_[0]->{'file'}) {
|
||||
return "<tt>".&html_escape($_[0]->{'file'})."</tt>";
|
||||
}
|
||||
elsif ($_[0]->{'huser'}) {
|
||||
return "<tt>".&html_escape("$_[0]->{'huser'}\@$_[0]->{'host'}:$_[0]->{'hfile'}")."</tt>";
|
||||
}
|
||||
else {
|
||||
return "<tt>".&html_escape("$_[0]->{'host'}:$_[0]->{'hfile'}")."</tt>";
|
||||
}
|
||||
}
|
||||
|
||||
# missing_restore_command(filesystem)
|
||||
sub missing_restore_command
|
||||
{
|
||||
return &has_command("restore") ? undef : $cmd;
|
||||
}
|
||||
|
||||
# restore_form(filesystem, [&dump])
|
||||
sub restore_form
|
||||
{
|
||||
# common options
|
||||
print "<tr> <td valign=top><b>",&hlink($text{'restore_src'}, "rsrc"),
|
||||
"</b></td>\n";
|
||||
printf "<td colspan=3><input type=radio name=mode value=0 %s> %s\n",
|
||||
$_[1]->{'host'} ? "" : "checked", $text{'dump_file'};
|
||||
printf "<input name=file size=50 value='%s'> %s<br>\n",
|
||||
$_[1]->{'host'} ? "" : $_[1]->{'file'}, &file_chooser_button("file");
|
||||
printf "<input type=radio name=mode value=1 %s>\n",
|
||||
$_[1]->{'host'} ? "checked" : "";
|
||||
print &text('dump_host',
|
||||
"<input name=host size=15 value='$_[1]->{'host'}'>",
|
||||
"<input name=huser size=8 value='$_[1]->{'huser'}'>",
|
||||
"<input name=hfile size=20 value='$_[1]->{'hfile'}'>"),
|
||||
"</td> </tr>\n";
|
||||
|
||||
if ($_[0] eq 'tar') {
|
||||
# tar restore options
|
||||
print "<tr> <td><b>",&hlink($text{'restore_rsh'},"rrsh"),
|
||||
"</b></td>\n";
|
||||
print "<td colspan=3>",
|
||||
&rsh_command_input("rsh_def", "rsh", $_[1]->{'rsh'}),
|
||||
"</td> </tr>\n";
|
||||
|
||||
# Password option for SSH
|
||||
print "<tr> <td><b>",&hlink($text{'dump_pass'},"pass"),
|
||||
"</b></td>\n";
|
||||
print "<td colspan=3>",&ui_password("pass", $_[0]->{'pass'}, 20),
|
||||
"</td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'restore_files'},"rfiles"),
|
||||
"</b></td>\n";
|
||||
print "<td colspan=3><input type=radio name=files_def value=1 checked> ",
|
||||
"$text{'restore_all'}\n";
|
||||
print "<input type=radio name=files_def value=0> $text{'restore_sel'}\n";
|
||||
print "<input name=files size=40></td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'restore_dir'},"rdir"),
|
||||
"</b></td> <td colspan=3>\n";
|
||||
print "<input name=dir size=50> ",&file_chooser_button("dir", 1),
|
||||
"</td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'restore_perms'},"perms"),"</td>\n";
|
||||
print "<td><input type=radio name=perms value=1> $text{'yes'}\n";
|
||||
print "<input type=radio name=perms value=0 checked> $text{'no'}</td>\n";
|
||||
|
||||
print "<td><b>",&hlink($text{'restore_gzip'},"rgzip"),"</td>\n";
|
||||
print "<td><input type=radio name=gzip value=1> $text{'yes'}\n";
|
||||
print "<input type=radio name=gzip value=0 checked> $text{'no'}</td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'restore_keep'},"keep"),"</td>\n";
|
||||
print "<td><input type=radio name=keep value=1> $text{'yes'}\n";
|
||||
print "<input type=radio name=keep value=0 checked> $text{'no'}</td>\n";
|
||||
|
||||
print "<td><b>",&hlink($text{'restore_multi'},"rmulti"),
|
||||
"</b></td>\n";
|
||||
print "<td><input type=radio name=multi value=1> $text{'yes'}\n";
|
||||
print "<input type=radio name=multi value=0 checked> $text{'no'}</td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'restore_test'},"rtest"),"</td>\n";
|
||||
print "<td><input type=radio name=test value=1> $text{'yes'}\n";
|
||||
print "<input type=radio name=test value=0 checked> $text{'no'}</td> </tr>\n";
|
||||
|
||||
}
|
||||
else {
|
||||
# ufs restore options
|
||||
print "<tr> <td><b>",&hlink($text{'restore_files'},"rfiles"),
|
||||
"</b></td>\n";
|
||||
print "<td colspan=3><input type=radio name=files_def value=1 checked> ",
|
||||
"$text{'restore_all'}\n";
|
||||
print "<input type=radio name=files_def value=0> $text{'restore_sel'}\n";
|
||||
print "<input name=files size=40></td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'restore_dir'},"rdir"),"</td>\n";
|
||||
print "<td colspan=3><input name=dir size=40> ",
|
||||
&file_chooser_button("dir", 1),"</td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>",&hlink($text{'restore_nothing'},"rnothing"),
|
||||
"</b></td>\n";
|
||||
print "<td><input type=radio name=nothing value=1> $text{'yes'}\n";
|
||||
print "<input type=radio name=nothing value=0 checked> $text{'no'}</td>\n";
|
||||
|
||||
print "<td><b>",&hlink($text{'restore_test'},"rtest"),"</td>\n";
|
||||
print "<td><input type=radio name=test value=1> $text{'yes'}\n";
|
||||
print "<input type=radio name=test value=0 checked> $text{'no'}</td> </tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
# parse_restore(filesystem)
|
||||
# Parses inputs from restore_form() and returns a command to be passed to
|
||||
# restore_backup()
|
||||
sub parse_restore
|
||||
{
|
||||
local $cmd;
|
||||
if ($_[0] eq "tar") {
|
||||
$cmd = $tar_command;
|
||||
if ($in{'test'}) {
|
||||
$cmd .= " -t -v";
|
||||
}
|
||||
else {
|
||||
$cmd .= " -x";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$cmd .= "restore".($in{'test'} ? " -t" : " -x");
|
||||
}
|
||||
if ($in{'mode'} == 0) {
|
||||
$in{'file'} || &error($text{'restore_efile'});
|
||||
$cmd .= " -f '$in{'file'}'";
|
||||
}
|
||||
else {
|
||||
gethostbyname($in{'host'}) || &check_ipaddress($in{'host'}) ||
|
||||
&error($text{'restore_ehost'});
|
||||
$in{'huser'} =~ /^\S*$/ || &error($text{'restore_ehuser'});
|
||||
$in{'hfile'} || &error($text{'restore_ehfile'});
|
||||
if ($in{'huser'}) {
|
||||
$cmd .= " -f '$in{'huser'}\@$in{'host'}:$in{'hfile'}'";
|
||||
}
|
||||
else {
|
||||
$cmd .= " -f '$in{'host'}:$in{'hfile'}'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($_[0] eq 'tar') {
|
||||
# parse tar options
|
||||
$cmd .= " -p" if ($in{'perms'});
|
||||
$cmd .= " -z" if ($in{'gzip'});
|
||||
$cmd .= " -k" if ($in{'keep'});
|
||||
if ($in{'multi'}) {
|
||||
!-c $in{'file'} && !-b $in{'file'} ||
|
||||
&error($text{'restore_emulti'});
|
||||
$in{'mode'} == 0 || &error($text{'restore_emulti2'});
|
||||
$cmd .= " -M -F \"$rmulti_cmd $in{'file'}\"";
|
||||
}
|
||||
local $rsh = &rsh_command_parse("rsh_def", "rsh");
|
||||
if ($rsh) {
|
||||
$cmd .= " --rsh-command=".quotemeta($rsh);
|
||||
}
|
||||
$cmd .= " $in{'extra'}" if ($in{'extra'});
|
||||
if (!$in{'files_def'}) {
|
||||
$in{'files'} || &error($text{'restore_efiles'});
|
||||
$cmd .= " $in{'files'}";
|
||||
}
|
||||
-d $in{'dir'} || &error($text{'restore_edir'});
|
||||
$cmd = "cd '$in{'dir'}' && $cmd";
|
||||
if ($in{'multi'}) {
|
||||
$cmd = "$rmulti_cmd $in{'file'} 1 && $cmd";
|
||||
}
|
||||
}
|
||||
else {
|
||||
# parse ufs options
|
||||
$cmd .= " -N" if ($in{'nothing'});
|
||||
$cmd .= " $in{'extra'}" if ($in{'extra'});
|
||||
if (!$in{'files_def'}) {
|
||||
$in{'files'} || &error($text{'restore_efiles'});
|
||||
$cmd .= " $in{'files'}";
|
||||
}
|
||||
-d $in{'dir'} || &error($text{'restore_edir'});
|
||||
}
|
||||
|
||||
return $cmd;
|
||||
}
|
||||
|
||||
# restore_backup(filesystem, command)
|
||||
# Restores a backup based on inputs from restore_form(), and displays the results
|
||||
sub restore_backup
|
||||
{
|
||||
&additional_log('exec', undef, $_[1]);
|
||||
|
||||
# Need to supply prompts
|
||||
&foreign_require("proc", "proc-lib.pl");
|
||||
local ($fh, $fpid) = &foreign_call("proc", "pty_process_exec", "cd '$in{'dir'}' ; $_[1]");
|
||||
local $donevolume;
|
||||
while(1) {
|
||||
local $rv = &wait_for($fh, "(next volume #)", "(set owner.mode for.*\\[yn\\])", "((.*)\\[yn\\])", "password:", "yes\\/no", "(.*\\n)");
|
||||
last if ($rv < 0);
|
||||
print &html_escape($matches[1]);
|
||||
if ($rv == 0) {
|
||||
if ($donevolume++) {
|
||||
return $text{'restore_evolume'};
|
||||
}
|
||||
else {
|
||||
syswrite($fh, "1\n", 2);
|
||||
}
|
||||
}
|
||||
elsif ($rv == 1) {
|
||||
syswrite($fh, "n\n", 2);
|
||||
}
|
||||
elsif ($rv == 2) {
|
||||
return &text('restore_equestion',
|
||||
"<tt>$matches[2]</tt>");
|
||||
}
|
||||
elsif ($rv == 3) {
|
||||
syswrite($fh, "$in{'pass'}\n");
|
||||
}
|
||||
elsif ($rv == 4) {
|
||||
syswrite($fh, "yes\n");
|
||||
}
|
||||
}
|
||||
close($fh);
|
||||
waitpid($fpid, 0);
|
||||
return $? || undef;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,304 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# fsdump-lib.pl
|
||||
# Common functions for doing filesystem backups with dump
|
||||
# XXX multi-volume tar restore
|
||||
|
||||
do '../web-lib.pl';
|
||||
&init_config();
|
||||
require '../ui-lib.pl';
|
||||
if ($gconfig{'os_type'} =~ /^\S+\-linux$/) {
|
||||
do "linux-lib.pl";
|
||||
}
|
||||
else {
|
||||
do "$gconfig{'os_type'}-lib.pl";
|
||||
}
|
||||
&foreign_require("mount", "mount-lib.pl");
|
||||
%access = &get_module_acl();
|
||||
|
||||
$cron_cmd = "$module_config_directory/backup.pl";
|
||||
$newtape_cmd = "$module_config_directory/newtape.pl";
|
||||
$notape_cmd = "$module_config_directory/notape.pl";
|
||||
$multi_cmd = "$module_config_directory/multi.pl";
|
||||
$rmulti_cmd = "$module_config_directory/rmulti.pl";
|
||||
$ftp_cmd = "$module_config_directory/ftp.pl";
|
||||
|
||||
# list_dumps()
|
||||
# Returns a list of all scheduled dumps
|
||||
sub list_dumps
|
||||
{
|
||||
local (@rv, $f);
|
||||
opendir(DIR, $module_config_directory);
|
||||
foreach $f (sort { $a cmp $b } readdir(DIR)) {
|
||||
next if ($f !~ /^(\S+)\.dump$/);
|
||||
push(@rv, &get_dump($1));
|
||||
}
|
||||
closedir(DIR);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# get_dump(id)
|
||||
sub get_dump
|
||||
{
|
||||
local %dump;
|
||||
&read_file("$module_config_directory/$_[0].dump", \%dump) || return undef;
|
||||
$dump{'id'} = $_[0];
|
||||
return \%dump;
|
||||
}
|
||||
|
||||
# save_dump(&dump)
|
||||
sub save_dump
|
||||
{
|
||||
$_[0]->{'id'} = $$.time() if (!$_[0]->{'id'});
|
||||
&lock_file("$module_config_directory/$_[0]->{'id'}.dump");
|
||||
&write_file("$module_config_directory/$_[0]->{'id'}.dump", $_[0]);
|
||||
&unlock_file("$module_config_directory/$_[0]->{'id'}.dump");
|
||||
}
|
||||
|
||||
# delete_dump(&dump)
|
||||
sub delete_dump
|
||||
{
|
||||
&lock_file("$module_config_directory/$_[0]->{'id'}.dump");
|
||||
unlink("$module_config_directory/$_[0]->{'id'}.dump");
|
||||
&unlock_file("$module_config_directory/$_[0]->{'id'}.dump");
|
||||
}
|
||||
|
||||
# directory_filesystem(dir)
|
||||
# Returns the filesystem type of some directory , or the full details
|
||||
# if requesting an array
|
||||
sub directory_filesystem
|
||||
{
|
||||
local $fs;
|
||||
foreach $m (sort { length($a->[0]) <=> length($b->[0]) }
|
||||
&foreign_call("mount", "list_mounted")) {
|
||||
local $l = length($m->[0]);
|
||||
if ($m->[0] eq $_[0] || $m->[0] eq "/" ||
|
||||
(length($_[0]) >= $l && substr($_[0], 0, $l+1) eq $m->[0]."/")) {
|
||||
$fs = $m;
|
||||
}
|
||||
}
|
||||
return wantarray ? @$fs : $fs->[2];
|
||||
}
|
||||
|
||||
# same_filesystem(fs1, fs2)
|
||||
# Returns 1 if type filesystem types are the same
|
||||
sub same_filesystem
|
||||
{
|
||||
local ($fs1, $fs2) = @_;
|
||||
$fs1 = "ext2" if ($fs1 eq "ext3");
|
||||
$fs2 = "ext2" if ($fs2 eq "ext3");
|
||||
return lc($fs1) eq lc($fs2);
|
||||
}
|
||||
|
||||
# date_subs(string)
|
||||
sub date_subs
|
||||
{
|
||||
if ($config{'date_subs'}) {
|
||||
eval "use POSIX";
|
||||
eval "use posix" if ($@);
|
||||
local @tm = localtime(time());
|
||||
return strftime($_[0], @tm);
|
||||
}
|
||||
else {
|
||||
return $_[0];
|
||||
}
|
||||
}
|
||||
|
||||
# execute_before(&dump, handle, escape)
|
||||
# Executes the before-dump command, and prints the output. Returns 1 on success
|
||||
# or 0 on failure
|
||||
sub execute_before
|
||||
{
|
||||
if ($_[0]->{'before'}) {
|
||||
local $h = $_[1];
|
||||
&open_execute_command(before, "($_[0]->{'before'}) 2>&1 </dev/null", 1);
|
||||
while(<before>) {
|
||||
print $h $_[2] ? &html_escape($_) : $_;
|
||||
}
|
||||
close(before);
|
||||
return !$?;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
# execute_after(&dump, handle, escape)
|
||||
sub execute_after
|
||||
{
|
||||
if ($_[0]->{'after'}) {
|
||||
local $h = $_[1];
|
||||
&open_execute_command(after, "($_[0]->{'after'}) 2>&1 </dev/null", 1);
|
||||
while(<after>) {
|
||||
print $h $_[2] ? &html_escape($_) : $_;
|
||||
}
|
||||
close(after);
|
||||
return !$?;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
# running_dumps(&procs)
|
||||
# Returns a list of backup jobs currently in progress, and their statuses
|
||||
sub running_dumps
|
||||
{
|
||||
local ($p, @rv, %got);
|
||||
foreach $p (@{$_[0]}) {
|
||||
if (($p->{'args'} =~ /$cron_cmd\s+(\S+)/ ||
|
||||
$p->{'args'} =~ /$module_root_directory\/backup.pl\s+(\S+)/) &&
|
||||
$p->{'args'} !~ /^\/bin\/(sh|bash|csh|tcsh)/) {
|
||||
local $backup = &get_dump($1);
|
||||
local $sfile = "$module_config_directory/$1.$p->{'pid'}.status";
|
||||
local %status;
|
||||
&read_file($sfile, \%status);
|
||||
$backup->{'status'} = \%status;
|
||||
$backup->{'pid'} = $p->{'pid'};
|
||||
push(@rv, $backup);
|
||||
$got{$sfile} = 1 if (!$status{'end'});
|
||||
}
|
||||
}
|
||||
# Remove any left over .status files
|
||||
opendir(DIR, $module_config_directory);
|
||||
local $f;
|
||||
foreach $f (readdir(DIR)) {
|
||||
local $path = "$module_config_directory/$f";
|
||||
unlink($path) if ($path =~ /\.status$/ && !$got{$path});
|
||||
}
|
||||
closedir(DIR);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# can_edit_dir(dir)
|
||||
# Returns 1 if some backup can be used or edited
|
||||
sub can_edit_dir
|
||||
{
|
||||
return 1 if ($access{'dirs'} eq '*');
|
||||
local ($d, $dd);
|
||||
local @ddirs = !ref($_[0]) ? ( $_[0] ) :
|
||||
$supports_multiple ? split(/\s+/, $_[0]->{'dir'}) :
|
||||
( $_[0]->{'dir'} );
|
||||
foreach $dd (@ddirs) {
|
||||
local $anyok = 0;
|
||||
foreach $d (split(/\t+/, $access{'dirs'})) {
|
||||
$anyok = 1 if (&is_under_directory($d, $dd));
|
||||
}
|
||||
return 0 if (!$anyok);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub create_wrappers
|
||||
{
|
||||
&foreign_require("cron", "cron-lib.pl");
|
||||
&cron::create_wrapper($notape_cmd, $module_name, "notape.pl");
|
||||
&cron::create_wrapper($newtape_cmd, $module_name, "newtape.pl");
|
||||
&cron::create_wrapper($multi_cmd, $module_name, "multi.pl");
|
||||
&cron::create_wrapper($rmulti_cmd, $module_name, "rmulti.pl");
|
||||
}
|
||||
|
||||
# new_header(title)
|
||||
sub new_header
|
||||
{
|
||||
print "</table></td></tr></table><br>\n";
|
||||
print "<table border width=100%>\n";
|
||||
print "<tr $tb> <td><b>$_[0]</b></td> </tr>\n";
|
||||
print "<tr $cb> <td><table width=100%>\n";
|
||||
}
|
||||
|
||||
# dump_directories(&dump)
|
||||
sub dump_directories
|
||||
{
|
||||
if (!&multiple_directory_support($_[0]->{'fs'})) {
|
||||
return $_[0]->{'dir'};
|
||||
}
|
||||
elsif ($_[0]->{'tabs'}) {
|
||||
return split(/\t+/, $_[0]->{'dir'});
|
||||
}
|
||||
else {
|
||||
return split(/\s+/, $_[0]->{'dir'});
|
||||
}
|
||||
}
|
||||
|
||||
# run_ssh_command(command, output-fh, output-mode, password)
|
||||
# Run some command and display it's output, possibly providing a password
|
||||
# if one is requested
|
||||
sub run_ssh_command
|
||||
{
|
||||
local ($cmd, $fh, $fhmode, $pass) = @_;
|
||||
&foreign_require("proc", "proc-lib.pl");
|
||||
local ($cfh, $fpid) = &proc::pty_process_exec_logged($cmd);
|
||||
local ($wrong_password, $got_login, $connect_failed);
|
||||
local $out;
|
||||
while(1) {
|
||||
local $rv = &wait_for($cfh, "password:", "yes\\/no", "(^|\\n)\\s*Permission denied.*\n", "ssh: connect.*\n", ".*\n");
|
||||
if ($wait_for_input !~ /^\s*DUMP:\s+ACLs\s+in\s+inode/i) {
|
||||
if ($fhmode) {
|
||||
print $fh &html_escape($wait_for_input);
|
||||
}
|
||||
else {
|
||||
print $fh $wait_for_input;
|
||||
}
|
||||
}
|
||||
if ($rv == 0) {
|
||||
syswrite($cfh, "$pass\n");
|
||||
}
|
||||
elsif ($rv == 1) {
|
||||
syswrite($cfh, "yes\n");
|
||||
}
|
||||
elsif ($rv == 2) {
|
||||
$wrong_password++;
|
||||
last;
|
||||
}
|
||||
elsif ($rv == 3) {
|
||||
$connect_failed++;
|
||||
}
|
||||
elsif ($rv < 0) {
|
||||
last;
|
||||
}
|
||||
}
|
||||
close($cfh);
|
||||
local $got = waitpid($fpid, 0);
|
||||
return $?;
|
||||
}
|
||||
|
||||
# rsh_command_input(selname, textname, value)
|
||||
# Returns HTML for selecting an rsh command
|
||||
sub rsh_command_input
|
||||
{
|
||||
local ($selname, $textname, $rsh) = @_;
|
||||
local $ssh = &has_command("ssh");
|
||||
local $r = $ssh && $rsh eq $ssh ? 1 :
|
||||
$rsh eq $ftp_cmd ? 3 :
|
||||
$rsh ? 2 : 0;
|
||||
local @opts = ( [ 0, $text{'dump_rsh0'} ],
|
||||
[ 1, $text{'dump_rsh1'} ],
|
||||
[ 3, $text{'dump_rsh3'} ] );
|
||||
if ($r == 2) {
|
||||
push(@opts, [ 2, $text{'dump_rsh2'}." ".
|
||||
&ui_textbox($textname, $rsh, 30) ]);
|
||||
}
|
||||
return &ui_radio($selname, $r, \@opts);
|
||||
}
|
||||
|
||||
# rsh_command_parse(selname, textname)
|
||||
# Returns the rsh command to use for a backup/restore, based on %in
|
||||
sub rsh_command_parse
|
||||
{
|
||||
local ($selname, $textname) = @_;
|
||||
if ($in{$selname} == 0) {
|
||||
return undef;
|
||||
}
|
||||
elsif ($in{$selname} == 1) {
|
||||
local $ssh = &has_command("ssh");
|
||||
$ssh || &error($text{'dump_essh'});
|
||||
return $ssh;
|
||||
}
|
||||
elsif ($in{$selname} == 3) {
|
||||
return $ftp_cmd;
|
||||
}
|
||||
else {
|
||||
$in{$textname} =~ /^(\S+)/ && &has_command("$1") ||
|
||||
&error($text{'dump_ersh'});
|
||||
return $in{$textname};
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Pass data from stdin to an FTP server
|
||||
|
||||
$no_acl_check++;
|
||||
require './fsdump-lib.pl';
|
||||
|
||||
# Parse args, and get password
|
||||
select(STDERR); $| = 1; select(STDOUT);
|
||||
$host = $ARGV[0];
|
||||
$user = $ARGV[2];
|
||||
if ($ARGV[3] =~ /touch/) {
|
||||
$touched = 1;
|
||||
}
|
||||
$| = 1;
|
||||
if (defined($ENV{'DUMP_PASSWORD'})) {
|
||||
$pass = $ENV{'DUMP_PASSWORD'};
|
||||
}
|
||||
else {
|
||||
open(TTY, "+</dev/tty");
|
||||
print TTY "Password: ";
|
||||
$pass = <TTY>;
|
||||
$pass =~ s/\r|\n//g;
|
||||
close(TTY);
|
||||
}
|
||||
|
||||
# Read rmt protocol messages
|
||||
while(1) {
|
||||
$line = <STDIN>;
|
||||
$line =~ s/\r|\n//g;
|
||||
if ($line =~ /^O(.*)/) {
|
||||
# File to open specified .. connect to FTP server
|
||||
$file = $1;
|
||||
$perms = <STDIN>;
|
||||
$perms = int($perms);
|
||||
&open_socket($host, 21, "SOCK", \$err);
|
||||
&error_exit("FTP connection failed : $err") if ($err);
|
||||
&ftp_command("", 2, \$err) ||
|
||||
&error_exit("FTP prompt failed : $err");
|
||||
|
||||
# Login to server
|
||||
@urv = &ftp_command("USER $user", [ 2, 3 ], \$err);
|
||||
@urv || &error_exit("FTP login failed : $err");
|
||||
if (int($urv[1]/100) == 3) {
|
||||
&ftp_command("PASS $pass", 2, \$err) ||
|
||||
&error_exit("FTP login failed : $err");
|
||||
}
|
||||
&ftp_command("TYPE I", 2, \$err) ||
|
||||
&error_exit("FTP file type failed : $err");
|
||||
|
||||
# Work out what we are doing
|
||||
$mode = 0;
|
||||
if ($perms & 0100 ||
|
||||
(($perms & 01) || ($perms & 02)) && $touched) {
|
||||
# Writing new file
|
||||
$mode = 1;
|
||||
}
|
||||
elsif ($perms & 02000) {
|
||||
# Appending to a file
|
||||
$mode = 2;
|
||||
}
|
||||
elsif (!$perms) {
|
||||
# Reading from file
|
||||
$mode = 0;
|
||||
}
|
||||
else {
|
||||
&error_exit("Unknown permissions $perms");
|
||||
}
|
||||
|
||||
# Open passive port
|
||||
$pasv = &ftp_command("PASV", 2, \$err);
|
||||
$pasv || &error_exit("FTP port failed : $err");
|
||||
$pasv =~ /\(([0-9,]+)\)/;
|
||||
@n = split(/,/ , $1);
|
||||
&open_socket("$n[0].$n[1].$n[2].$n[3]", $n[4]*256 + $n[5],
|
||||
"CON", \$err) ||
|
||||
&error_exit("FTP port failed : $err");
|
||||
|
||||
if ($mode == 0) {
|
||||
# Read from file
|
||||
&ftp_command("RETR $file", 1, \$err) ||
|
||||
&error_exit("FTP read failed : $err");
|
||||
$opened = 1;
|
||||
}
|
||||
elsif ($mode == 1) {
|
||||
# Create new file if requested by the client, or if
|
||||
# the touch command was specified by the caller
|
||||
&ftp_command("STOR $file", 1, \$err) ||
|
||||
&error_exit("FTP write failed : $err");
|
||||
$touched = 0;
|
||||
$opened = 1;
|
||||
}
|
||||
elsif ($mode == 2) {
|
||||
# Otherwise append to the file
|
||||
&ftp_command("APPE $file", 1, \$err) ||
|
||||
&error_exit("FTP write failed : $err");
|
||||
$opened = 1;
|
||||
}
|
||||
else {
|
||||
$opened = 0;
|
||||
}
|
||||
print "A0\n";
|
||||
}
|
||||
elsif ($line =~ /^W(\d+)/) {
|
||||
# Write to FTP server
|
||||
$opened || &error_exit("FTP connection not opened yet");
|
||||
$len = $1;
|
||||
read(STDIN, $buf, $len);
|
||||
$wrote = (print CON $buf);
|
||||
print "A".($wrote ? $len : 0)."\n";
|
||||
}
|
||||
elsif ($line =~ /^R(\d+)/) {
|
||||
# Read from to FTP server
|
||||
# XXX doesn't work yet?
|
||||
$opened || &error_exit("FTP connection not opened yet");
|
||||
$len = $1;
|
||||
$read = read(CON, $buf, $len);
|
||||
if ($read >= 0) {
|
||||
print "A".$read."\n";
|
||||
print $buf;
|
||||
}
|
||||
else {
|
||||
print "E",int($!),"\n";
|
||||
print "Read failed : $!\n";
|
||||
}
|
||||
}
|
||||
elsif ($line =~ /^C/) {
|
||||
# Close FTP connection
|
||||
if ($opened) {
|
||||
# Finish transfer
|
||||
close(CON);
|
||||
&ftp_command("", 2, \$err) ||
|
||||
&error_exit("FTP close failed : $err");
|
||||
}
|
||||
&ftp_command("QUIT", 2, \$err) ||
|
||||
&error_exit("FTP quit failed : $err");
|
||||
close(SOCK);
|
||||
print "A0\n";
|
||||
$opened = 0;
|
||||
}
|
||||
elsif (!$line) {
|
||||
# All done!
|
||||
last;
|
||||
}
|
||||
else {
|
||||
print "E1\nUnknown command $line\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub error_exit
|
||||
{
|
||||
local $err = &html_tags_to_text(join("", @_));
|
||||
print STDERR $err,"\n";
|
||||
print "E1\n$err\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sub html_tags_to_text
|
||||
{
|
||||
local ($rv) = @_;
|
||||
$rv =~ s/<tt>|<\/tt>//g;
|
||||
$rv =~ s/<b>|<\/b>//g;
|
||||
$rv =~ s/<i>|<\/i>//g;
|
||||
$rv =~ s/<u>|<\/u>//g;
|
||||
$rv =~ s/<pre>|<\/pre>//g;
|
||||
$rv =~ s/<br>/\n/g;
|
||||
$rv =~ s/<p>/\n\n/g;
|
||||
return $rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Ordre a executar després de la còpia</header>
|
||||
|
||||
Qualsevol ordre shell que introdueixis en aquest camp s'executarà com a
|
||||
root tot just després que acabi la còpia, ja sigui manualment o de forma
|
||||
planificada. La sortida de l'ordre s'inclourà en l'informe de còpia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Command to run after backup</header>
|
||||
|
||||
Any shell command that you enter into this field will be run as root just
|
||||
after the backup is finished, either manually or on schedule. Output from the
|
||||
command will be included in the dump report. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Inclou els atributs dels fitxers</header>
|
||||
|
||||
Quan es posa aquesta opció a Sí, la còpia inclourà qualsevol conjunt
|
||||
d'atributs estesos dels fitxers que facin servir l'ordre <tt>attr</tt>. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>¿ Incluir los atributos de los ficheros ?</header>
|
||||
|
||||
Cuando diga Sí a esta opción, la copia de seguridad incluirá los atributos
|
||||
extendidos (configurados con el comando <tt>attr</tt>) de los ficheros. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Include file attributes?</header>
|
||||
|
||||
When this option is set to Yes, the backup will include any extended attributes
|
||||
set of files using the <tt>attr</tt> command. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Posa les dades comprimides en blocs</header>
|
||||
|
||||
Quans'activam aquesta opció provoca que les dades comprimides es posin
|
||||
en blocs en un buffer, de manera que es gravin a una unitat de cinta de
|
||||
forma mñes eficient. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Buffer compressed data into blocks?</header>
|
||||
|
||||
When enabled, this option causes compressed data to be buffered into blocks
|
||||
so that it can be written to a tape drive more efficiently. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Ordre a executar abans de la còpia</header>
|
||||
|
||||
Qualsevol ordre shell que introdueixis en aquest camp s'executarà com a
|
||||
root just abans de començar la còpia, ja sigui manualment o de forma
|
||||
planificada. La sortida de l'ordre s'inclourà en l'informe de còpia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Command to run before backup</header>
|
||||
|
||||
Any shell command that you enter into this field will be run as root just
|
||||
before the backup is made, either manually or on schedule. Output from the
|
||||
command will be included in the dump report. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>Mida de la cinta</header>
|
||||
|
||||
Quan es tria 'Dedueix-la automàticament', la còpia es gravarà fins que
|
||||
la cinta o sistema de fitxers es quedi sense espai. Altrament, pots
|
||||
especificar el nombre correcte de kilobytes disponibles, cosa que pot
|
||||
ser útil si la detecció automàtica de la mida produeix un resultat
|
||||
incorrecte. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Tape size</header>
|
||||
|
||||
When 'Work out automatically' is chosen, the backup will be written until
|
||||
the tape or filesystem runs out of space. Alternately, you can specify the
|
||||
correct number of kilobytes available, which can be useful if the
|
||||
automatic size detection produces the incorrect result. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Mida del bloc</header>
|
||||
|
||||
Aquesta opció permet controlar la mida dels blocs que l'ordre de còpia
|
||||
grava a la cinta. Normalment, el valor per defecte és 10 Kb. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Dump record block size</header>
|
||||
|
||||
This option allows you to control the size of blocks that the backup command
|
||||
writes to tape. The default is usually 10 kB. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Comprimeix les dades</header>
|
||||
|
||||
Si selecciones aquesta opció, les dades es comprimiran utilitzant
|
||||
l'algoritme bzip abans d'escriure-les al dispositiu de còpia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Compress data?</header>
|
||||
|
||||
If this option is selected, the data will be compressed using the bzip
|
||||
algorithm before being written to the backup device. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
<header>Fés la substitució strftime de les destinacions de còpia</header>
|
||||
|
||||
Si es posa aquesta opció a <b>Sí</b>, es poden utilitzar els codis com ara
|
||||
%d, %m, %Y i %u en el nom de fitxer de destinació de la còpia. Aquests se
|
||||
substituiran pel dia, mes, any i dia de la setmana respectivament, quan es
|
||||
faci la còpia. Això és útil si vols desar una còpia diferent cada dia, de
|
||||
manera que puguis retrocedir el sistema fins a una data anterior. <p>
|
||||
|
||||
Alguns altres codis que es poden utilitzar són:<br>
|
||||
|
||||
<pre><font size=-1>
|
||||
%a El nom del dia de la setmana abreujat, segons amb el
|
||||
locale actual.
|
||||
|
||||
%A El nom del dia de la setmana complet, segons amb el
|
||||
locale actual.
|
||||
|
||||
%b El nom del dia del mes abreujat, segons amb el locale
|
||||
actual.
|
||||
|
||||
%B El nom del dia del mes complet, segons amb el locale
|
||||
actual.
|
||||
|
||||
%c La representació preferida de la data i l'hora segons
|
||||
el locale actual.
|
||||
|
||||
%C El número de segle (any/100) com un enter de 2 dígits.
|
||||
|
||||
%d El dia del mes com un número decimal (del 01 al 31).
|
||||
|
||||
%e Com %d, el dia del mes com un número decimal, però el
|
||||
zero inicial se substitueix per un espai.
|
||||
|
||||
%E Modificador: utilitza un format alternatiu, vegeu més
|
||||
avall.
|
||||
|
||||
%G L'any ISO 8601 amb el segle com un número decimal.
|
||||
L'any de 4 dígits corresponent al númro de setmana ISO
|
||||
(vegeu %V). Això té el mateix format i valor que %y,
|
||||
excepte que si el número de setmana ISO pertany a
|
||||
l'any següent o l'anterior, s'utilitza aquest any.
|
||||
|
||||
%g Com %G, però sense el segle, això és, amb un any de 2
|
||||
dígits (00-99).
|
||||
|
||||
%h Equivalent a %b.
|
||||
|
||||
%H L'hora com un número decimal utilitzant un rellotge de
|
||||
24 hores (de 00 to 23).
|
||||
|
||||
%I L'hora com un número decimal utilitzant un rellotge de
|
||||
12 hores (de 01 to 12).
|
||||
|
||||
%j El dia de l'any com un número decimal (de 001 a 366).
|
||||
|
||||
%k L'hora (rellotge de 24 hores) com un número decimal
|
||||
(de 0 a 23); els dígits sols es precedeixen amb espai.
|
||||
(vegeu també %H.)
|
||||
|
||||
%l L'hora (rellotge de 12 hores) com un número decimal
|
||||
(d'1 a 12); els dígits sols es precedeixen amb espai.
|
||||
(vegeu també %I.)
|
||||
|
||||
%m El mes com un número decimal (de 01 a 12).
|
||||
|
||||
%M Els minuts com un número decimal (de 00 a 59).
|
||||
|
||||
%n Un caràcter de salt de línia.
|
||||
|
||||
%O Modificador: utilitza un format alternatiu, vegeu més
|
||||
avall.
|
||||
|
||||
%p 'AM' o 'PM', segons el valor de l'hora donat, o els
|
||||
valors corresponents al locale actual. El migdia es
|
||||
tracta com a 'pm' i la mitjanit com a 'am'.
|
||||
|
||||
%P Com %p, però en minúscules: 'am' or 'pm' o la cadena
|
||||
corresponent al locale actual.
|
||||
|
||||
%r L'hora en notació a.m. o p.m. Amb el locale POSIX,
|
||||
això és equivalent a '%I:%M:%S %p'.
|
||||
|
||||
%R L'hora en notació de 24 hores (%H:%M). Per una versió
|
||||
que inclogui els segons, vegeu %T més avall.
|
||||
|
||||
%s El nombre de segons a partir de l'Era, això és, a
|
||||
partir de 1970-01-01 00:00:00 UTC.
|
||||
|
||||
%S Els segons com un número decimal (de 00 to 61).
|
||||
|
||||
%t Un caràcter de tabulació.
|
||||
|
||||
%T L'hora en notació de 24 hores (%H:%M:%S).
|
||||
|
||||
%u El dia de la setmana com a decimal, de l'1 al 7,
|
||||
essent l'1 el dilluns. Vegeu també %w.
|
||||
|
||||
%U El número de setmana de l'any actual com un número
|
||||
decimal del 0 al 53, començant amb el primer diumenge
|
||||
com el primer dia de la setmana 01. Vegeu també %V i
|
||||
%W.
|
||||
|
||||
%V El número de setmana ISO 8601:1988 de l'any actual com
|
||||
un número decimal del 0 al 53, on la setmana 1 és la
|
||||
primera setmana que té almenys 4 dies dins de l'any
|
||||
actual, i amb el dilluns com a primer dia de la
|
||||
setmana. Vegeu també %V i %W.
|
||||
|
||||
%w El dia de la setmana com un decimal, de 0 a 6, essent
|
||||
el 0 el diumenge. Vegeu també %u.
|
||||
|
||||
%W El número de setmana de l'any actual com un número
|
||||
decimal, de 00 a 53, començant amb el primer dilluns
|
||||
com a primer dia de la setmana 01.
|
||||
|
||||
%x La representació preferida de la data segons el locale
|
||||
actual sense l'hora.
|
||||
|
||||
%X La representació preferida de l'hora segons el locale
|
||||
actual sense la data.
|
||||
|
||||
%y L'any com un número decimal sense el segle (de 00 a
|
||||
99).
|
||||
|
||||
%Y L'any com un número decimal incloent-hi el segle.
|
||||
|
||||
%z La zona horària com a diferència horària amb GMT. És
|
||||
necessari per a crear dates conformes amb RFC822
|
||||
(utilitzant "%a, %d %b %Y %H:%M:%S %z").
|
||||
|
||||
%Z La zona horària, nom, o abreujament.
|
||||
|
||||
%% Un caràcter '%' literal.
|
||||
</font></pre>
|
||||
|
||||
<footer>
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
<header>Do strftime substitution of backup destinations?</header>
|
||||
|
||||
If this option is set to <b>Yes</b>, codes like %d, %m, %Y and %u can be used
|
||||
in the backup destination filename. These will be replaced with the day, month
|
||||
year and day of the week respectively when the backup is performed. This is
|
||||
useful if you want to save a different backup every day, so that you can roll
|
||||
a system back to a previous date. <p>
|
||||
|
||||
Some of the other codes that can be used are :<br>
|
||||
|
||||
<pre><font size=-1>
|
||||
%a The abbreviated weekday name according to the cur<AD>
|
||||
rent locale.
|
||||
|
||||
%A The full weekday name according to the current
|
||||
locale.
|
||||
|
||||
%b The abbreviated month name according to the current
|
||||
locale.
|
||||
|
||||
%B The full month name according to the current
|
||||
locale.
|
||||
|
||||
%c The preferred date and time representation for the
|
||||
current locale.
|
||||
|
||||
%C The century number (year/100) as a 2-digit integer.
|
||||
|
||||
%d The day of the month as a decimal number (range 01
|
||||
to 31).
|
||||
|
||||
%e Like %d, the day of the month as a decimal number,
|
||||
but a leading zero is replaced by a space.
|
||||
|
||||
%E Modifier: use alternative format, see below.
|
||||
|
||||
%G The ISO 8601 year with century as a decimal number.
|
||||
The 4-digit year corresponding to the ISO week num<AD>
|
||||
ber (see %V). This has the same format and value
|
||||
as %y, except that if the ISO week number belongs
|
||||
to the previous or next year, that year is used
|
||||
instead.
|
||||
|
||||
%g Like %G, but without century, i.e., with a 2-digit
|
||||
year (00-99).
|
||||
|
||||
%h Equivalent to %b.
|
||||
|
||||
%H The hour as a decimal number using a 24-hour clock
|
||||
(range 00 to 23).
|
||||
|
||||
%I The hour as a decimal number using a 12-hour clock
|
||||
(range 01 to 12).
|
||||
|
||||
%j The day of the year as a decimal number (range 001
|
||||
to 366).
|
||||
|
||||
%k The hour (24-hour clock) as a decimal number (range
|
||||
0 to 23); single digits are preceded by a blank.
|
||||
(See also %H.)
|
||||
|
||||
%l The hour (12-hour clock) as a decimal number (range
|
||||
1 to 12); single digits are preceded by a blank.
|
||||
(See also %I.)
|
||||
|
||||
%m The month as a decimal number (range 01 to 12).
|
||||
|
||||
%M The minute as a decimal number (range 00 to 59).
|
||||
|
||||
%n A newline character.
|
||||
|
||||
%O Modifier: use alternative format, see below.
|
||||
|
||||
%p Either `AM' or `PM' according to the given time
|
||||
value, or the corresponding strings for the current
|
||||
locale. Noon is treated as `pm' and midnight as
|
||||
`am'.
|
||||
|
||||
%P Like %p but in lowercase: `am' or `pm' or a corre<AD>
|
||||
sponding string for the current locale.
|
||||
|
||||
%r The time in a.m. or p.m. notation. In the POSIX
|
||||
locale this is equivalent to `%I:%M:%S %p'.
|
||||
|
||||
%R The time in 24-hour notation (%H:%M). For a
|
||||
version including the seconds, see %T below.
|
||||
|
||||
%s The number of seconds since the Epoch, i.e., since
|
||||
1970-01-01 00:00:00 UTC.
|
||||
|
||||
%S The second as a decimal number (range 00 to 61).
|
||||
|
||||
%t A tab character.
|
||||
|
||||
%T The time in 24-hour notation (%H:%M:%S).
|
||||
|
||||
%u The day of the week as a decimal, range 1 to 7,
|
||||
Monday being 1. See also %w.
|
||||
|
||||
%U The week number of the current year as a decimal
|
||||
number, range 00 to 53, starting with the first
|
||||
Sunday as the first day of week 01. See also %V and
|
||||
%W.
|
||||
|
||||
%V The ISO 8601:1988 week number of the current year
|
||||
as a decimal number, range 01 to 53, where week 1
|
||||
is the first week that has at least 4 days in the
|
||||
current year, and with Monday as the first day of
|
||||
the week. See also %U and %W.
|
||||
|
||||
%w The day of the week as a decimal, range 0 to 6,
|
||||
Sunday being 0. See also %u.
|
||||
|
||||
%W The week number of the current year as a decimal
|
||||
number, range 00 to 53, starting with the first
|
||||
Monday as the first day of week 01.
|
||||
|
||||
%x The preferred date representation for the current
|
||||
locale without the time.
|
||||
|
||||
%X The preferred time representation for the current
|
||||
locale without the date.
|
||||
|
||||
%y The year as a decimal number without a century
|
||||
(range 00 to 99).
|
||||
|
||||
%Y The year as a decimal number including the century.
|
||||
|
||||
%z The time-zone as hour offset from GMT. Required to
|
||||
emit RFC822-conformant dates (using "%a, %d %b %Y
|
||||
%H:%M:%S %z").
|
||||
|
||||
%Z The time zone or name or abbreviation.
|
||||
|
||||
%% A literal `%' character.
|
||||
</font></pre>
|
||||
|
||||
<footer>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<header>Crea la Còpia</header>
|
||||
|
||||
En aquesta pàgina, pots introduir els detalls d'una nova còpia configurada.
|
||||
|
||||
<include dump>
|
||||
|
||||
Un cop acabats d'entrar els detalls d'aquesta còpia, fes clic sobre el botó
|
||||
Crea al peu de la pàgina per desar-la. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<header>Crear Copia de Seguridad</header>
|
||||
|
||||
En esta página puede introducir los detalles de la nueva copia de seguridad
|
||||
configurada.
|
||||
|
||||
<include dump>
|
||||
|
||||
Una vez haya terminado de introducir los detalles de esta copia de
|
||||
seguridad, pulse el botón "Crear" al final de la página para guardar la
|
||||
copia de seguridad. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<header>Create Backup</header>
|
||||
|
||||
On this page you can enter the details of a new configured backup.
|
||||
|
||||
<include dump>
|
||||
|
||||
Once you have finished entering the details of this backup, click the Create
|
||||
button at the bottom of the page to save it. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<header>Copia sobre</header>
|
||||
|
||||
Això pot ser o bé el camí d'un fitxer al qual s'escriurà la còpia, o bé
|
||||
el camí d'una unitat de cinta (com ara <tt>/dev/st0</tt>), o un fitxer o
|
||||
dispositiu d'un host remot. Per tal que les còpies a un host remot funcionin,
|
||||
aquest ha de suportar el protocol <tt>rsh</tt>, que normalment no està
|
||||
activat per raons de seguretat. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<header>Guardar la Copia de Seguridad en</header>
|
||||
|
||||
Puede ser la ruta completa a un fichero al que se escribirá la copia de
|
||||
seguridad, o la ruta de un dispositivo de cinta (como <tt>/dev/st0</tt>), o
|
||||
un fichero o dispositivo en una máquina remota. Para que funcionen las
|
||||
copias de seguridad remotas, la máquina destinataria debe soportar el
|
||||
protocolo <tt>rsh</tt>, que por razones de seguridad no suele estar
|
||||
activado por defecto. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>Backup to</header>
|
||||
|
||||
This can either be the path to a file to which the backup will be written,
|
||||
the path to a tape drive device (like <tt>/dev/st0</tt>), or a file or device
|
||||
on a remote host. For backups to a remote host to work, it must support the
|
||||
<tt>rsh</tt> protocol, which is not usually turned on by default for security
|
||||
reasons. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Directori a copiar</header>
|
||||
|
||||
Quan es faci la còpia, es desarà aquest directori i tot el seu contingut.
|
||||
Amb alguns sistemes de fitxers (com ara XFS), cal que sigui el punt de
|
||||
muntatge del sistema de fitxers. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Directorio que guardar</header>
|
||||
|
||||
Cuando se haga la copia de seguridad se guardarán este directorio y todos
|
||||
sus subdirectorios. Con ciertos sistemas de ficheros (como XFS) se debe
|
||||
indicar el punto de montaje del sistema de ficheros. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Directory to backup</header>
|
||||
|
||||
This directory and all its contents will be saved when the backup is done.
|
||||
With some filesystem types (such as XFS) it must be the mount point of the
|
||||
filesystem. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Directoris a copiar</header>
|
||||
|
||||
Els comentaris del directori o directoris introduïts en aquest camp
|
||||
es desaran un cop feta la còpia. Si se n'introdueix més d'un, cal
|
||||
posar-los en línies separades. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Directories to backup</header>
|
||||
|
||||
The directory or directories entered into this field will have all their
|
||||
contents saved when the backup is done. If more than one is entered, they
|
||||
must be on separate lines. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Els detalls d'una còpia es divideixen en dues parts. A dalt hi ha les
|
||||
opcions específiques del tipus de sistema de fitxers, i a baix els camps
|
||||
per seleccionar si la còpia es farà de forma planificada, i quan. <p>
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Los detalles de una copia de seguridad se dividen en dos partes. Arriba hay
|
||||
opciones específicas del tipo de sistema de ficheros, y abajo hay campos
|
||||
para seleccionar si la copia de seguridad se planifica para llevarse a cabo
|
||||
automáticamente, y en tal caso cuándo. <p>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
The details of a backup are divided into two parts. At the top are options
|
||||
specific to the filesystem type, and at the bottom are fields for selecting
|
||||
if and when the backup is automatically scheduled to be run. <p>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<header>Edició de Còpia</header>
|
||||
|
||||
En aquesta pàgina pots editar els detalls d'una còpia configurada existent.
|
||||
|
||||
<include dump>
|
||||
|
||||
Al peu de la pàgina hi ha els botons per desar els canvis que has fet,
|
||||
executar immediatament la còpia i esborrar aquesta configuració de còpia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<header>Editar Copia de Seguridad</header>
|
||||
|
||||
En esta página puede editar los detalles de una copia de seguridad
|
||||
previamente configurada.
|
||||
|
||||
<include dump>
|
||||
|
||||
Al final de la página hay unos botones para guardar los cambios que haya
|
||||
hecho, llevar a cabo la copia de seguridad de forma inmediata, y para
|
||||
borrar esta configuración de copia de seguridad. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<header>Edit Backup</header>
|
||||
|
||||
On this page you can edit the details of an existing configured backup.
|
||||
|
||||
<include dump>
|
||||
|
||||
At the bottom of the page are buttons for saving the changes you have made,
|
||||
running the backup immediately and deleting this backup configuration. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Envia la sortida planificada per correu a</header>
|
||||
|
||||
Si es configura una còpia per executar-se de forma planificada, la sortida
|
||||
de l'ordre <tt>dump</tt> s'enviarà a l'adreça introduïda en aquest camp.
|
||||
Si no es dóna cap adreça, la sortida serà senzillament descartada. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Enviar la salida de la copia de seguridad planificada a</header>
|
||||
|
||||
Si se ha configurado la copia de seguridad para ejecutar a una determinada
|
||||
hora y día, se enviará por correo electrónico la salida del comando
|
||||
<tt>dump</tt> a la dirección que introduzca en este campo. Si no
|
||||
proporciona ninguna dirección, la salida simplemente se descartará. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Email scheduled output to</header>
|
||||
|
||||
If a backup is setup to be run on schedule, the output from the <tt>dump</tt>
|
||||
command will be emailed to the address entered into this field. If not address
|
||||
is supplied, the output will simply be discarded. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>Còpia planificada activada</header>
|
||||
|
||||
Si aquesta opció està posada a Activada, Webmin crearà un treball <tt>cron</tt>
|
||||
que executarà la còpia a les hores triades a sota. Altrament, la còpia
|
||||
només s'executarà quan facis clic sobre el botó Fes la Còpia del peu de la
|
||||
pàgina. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>¿ Activada la ejecución planificada de la copia de seguridad ?</header>
|
||||
|
||||
Si se activa esta opción Webmin creará un trabajo de cron para llevar a
|
||||
cabo la copia de seguridad en los momentos indicados. De otra manera, la
|
||||
copia de seguridad sólo se llevará a cabo cuando pulse el botón "Ejecutar
|
||||
Backup" al final de esta página. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Scheduled backup enabled?</header>
|
||||
|
||||
If this option is set to Enabled, Webmin will create a cron job that
|
||||
runs the backup at the times chosen below. Otherwise, the backup will only
|
||||
be run when you click on the Run Backup button at the bottom of this page. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Esborra el fitxer / la cinta abans de la còpia</header>
|
||||
|
||||
Si es copia sobre un fitxer, establir aquesta opció provocarà que el fitxer
|
||||
s'esborri abans de procedir. Si la còpia és a una cinta, aquesta opció
|
||||
provocarà que s'esborri la cinta abans de continuar. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>¿ Borrar fichero / borrar la cinta antes de hacer la copia de
|
||||
seguridad?</header>
|
||||
|
||||
Si se hace la copia de seguridad a un fichero, esta opción (de estar
|
||||
activada) hace que el comando de backup borre el fichero antes de
|
||||
continuar. Si se usa una cinta para la copia de seguridad, esta opción
|
||||
provocará el borrado de la cinta antes de continuar. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Delete file / erase tape before backup?</header>
|
||||
|
||||
If backing up to a file, setting this option to Yes will cause the backup
|
||||
command to delete the file before proceeding. If backing up to a tape, this
|
||||
option will cause the tape to be erased before continuing. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Paràmetres extra de la línia d'ordres</header>
|
||||
|
||||
Qualsevol cosa que introdueixis en aquest camp s'afegirà a l'ordre
|
||||
<tt>dump</tt>, <tt>xfsdump</tt>, <tt>ufsdump</tt> o <tt>tar</tt> just abans
|
||||
del directori. Fes-ho servir només si estàs familiaritzat amb les opcions
|
||||
de la línia d'ordres. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Extra command-line parameters</header>
|
||||
|
||||
Anything entered into this field will be added to the <tt>dump</tt>,
|
||||
<tt>xfsdump</tt>, <tt>ufsdump</tt> or <tt>tar</tt> command just before the directory. It
|
||||
should only be used if you are familiar with the available command-line
|
||||
options. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Comprimeix l'arxiu</header>
|
||||
|
||||
Quan s'activa aquest opció, el fitxer TAR resultant es comprimeix amb gzip
|
||||
o bzip a mida que es va creant. En general, això no hauria d'estar activat
|
||||
quan es copia a un dispositiu de cinta, ja que la majoria d'unitats de cinta
|
||||
porten compressió integrada. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Compress archive?</header>
|
||||
|
||||
When this option is enabled, the resulting TAR file will be compressed
|
||||
with either gzip or bzip as it is created. This should not generally be enabled when backing
|
||||
up to a tape device, as most tape drives have built-in compression. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>Exclou sempre els fitxers marcats</header>
|
||||
|
||||
Si aquesta opció està establerta, les còpies ometran sempre els fitxers
|
||||
que s'hagin marcat amb l'ordre <tt>chattr</tt> o el Gestor de Fitxers,
|
||||
fins i tot en cas de fer una còpia de nivell 0. Normalment, només
|
||||
s'ometen per a còpies de nivell 1 o superior. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Always exclude marked files?</header>
|
||||
|
||||
If this option is set, the backups will always skip files that have been
|
||||
marked with the <tt>chattr</tt> command or the File Manager, even when doing
|
||||
a level 0 backup. Normally, they are only skipped for backups of level 1 or
|
||||
above. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<header>Còpia de Seguretat de Sistemes de Fitxers</header>
|
||||
|
||||
Aquest mòdul permet copiar i restaurar sistemes de fitxers sencers fent
|
||||
servir la família d'ordres <tt>dump</tt> i <tt>restore</tt>. Les còpies
|
||||
de seguretat de sistemes de fitxers es fan normalment sobre una cinta, però
|
||||
també es poden desar sobre un fitxer en un altre sistema si no tens cap
|
||||
unitat de cinta. <p>
|
||||
|
||||
En alguns sistemes operatius, s'utilitzarà en lloc seu l'ordre <tt>tar</tt>
|
||||
en copiar un sistema de fitxers que no té un <tt>dump</tt> natiu. Per exemple,
|
||||
NFS, FAT i Reiserfs no tenen ordres de còpia específiques del sistema de
|
||||
fitxers. El format <tt>tar</tt> no pot emmagatzemar certa informació avançada
|
||||
dels fitxers, tal com ara ACLs, i atributs EXT i XFS, així que és preferible
|
||||
fer servir el format <tt>dump</tt> sempre que sigui possible. <p>
|
||||
|
||||
La pàgina principal del mòdul conté una llista de les còpies configurades
|
||||
(si és que n'hi ha), un botó per afegir una còpia nova i un botó per a
|
||||
restaurar una còpia d'algun tipus de sistema de fitxers. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<header>Copia de Seguridad de Sistemas de Ficheros</header>
|
||||
|
||||
Este módulo le permite hacer copias de seguridad y restaurar sistemas de
|
||||
ficheros enteros usando la familia de comandos <tt>dump</tt> y
|
||||
<tt>restore</tt>. Las copias de seguridad habitualmente se hacen a unidad
|
||||
de cinta, pero también se pueden guardar a fichero o a otro sistema de
|
||||
ficheros si no dispone de unidad de cinta. <p>
|
||||
|
||||
A diferencia de otras herramientas de backup como <tt>tar</tt>, los
|
||||
comandos usados por este módulo evitan acceder al sistema de fichero a
|
||||
través de los cauces normales, y por lo tanto no se pueden usar para hacer
|
||||
copias de seguridad de tipos de sistemas de ficheros no soportados como NAT
|
||||
o NSF. En general sólo estarán soportados los sistemas de ficheros nativos
|
||||
en los discos locales de su sistema operativo. <p>
|
||||
|
||||
La página principal del módulo contiene una lista de copias de seguridad
|
||||
configuradas (de haberlas), un botón para añadir una nueva configuración de
|
||||
backup y un botón para restaurar una copia de seguridad de un determinado
|
||||
sistema de ficheros. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<header>Filesystem Backup</header>
|
||||
|
||||
This module allows you to backup and restore entire filesystems using the
|
||||
<tt>dump</tt> and <tt>restore</tt> family of commands. Filesystem backups are
|
||||
normally made to tape, but can also be saved to a file on another filesystem
|
||||
if you do not have a tape drive. <p>
|
||||
|
||||
On some operating systems, the <tt>tar</tt> command will be used instead when
|
||||
backing up a filesystem that does not have a native <tt>dump</tt>. For example,
|
||||
NFS, FAT and Reiserfs have no filesystem-specific backup commands. The
|
||||
<tt>tar</tt> format cannot store certain advanced file information,
|
||||
such as ACLs, EXT and XFS attributes, so it is preferable to use the
|
||||
<tt>dump</tt> format where possible. <p>
|
||||
|
||||
The main page of the module contains a list of configured backups
|
||||
(if any), a button for adding a new backup and a button for restoring a backup
|
||||
of some filesystem type. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Enregistra la còpia a l'inventari</header>
|
||||
|
||||
Quan s'activa aquesta opció, es manté un registre a l'inventari de còpies
|
||||
(normalment, <tt>/var/lib/xfsdump/inventory</tt>) quan s'executa aquesta
|
||||
còpia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>¿ Registrar esta copia de seguridad en un directorio ?</header>
|
||||
|
||||
Cuando active esta opción se mantendrá un registro de cada ejecución de
|
||||
esta copia de seguridad en el directorio de inventario (habitualmente
|
||||
<tt>/var/lib/xfsdump/inventory</tt>).
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Record backup in inventory?</header>
|
||||
|
||||
When this option is enabled, a record will be kept in the backup inventory
|
||||
(usually at <tt>/var/lib/xfsdump/inventory</tt>) of this backup when it is run. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>No reescriguis els fitxers</header>
|
||||
|
||||
Si està activada, la restauració no reescriurà cap fitxer del directori de
|
||||
destinació que també existeix a l'arxiu. Útil per restaurar només fitxers
|
||||
que han estat esborrats. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Don't overwrite files?</header>
|
||||
|
||||
If enabled, any files in the destination directory which also exist
|
||||
in the archive will not be overwritten by the restore. Useful for restoring
|
||||
only files that have been deleted. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Etiqueta de la còpia</header>
|
||||
|
||||
Un petit text per a identificar aquesta còpia més endavant. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Etiqueta de la copia de seguridad</header>
|
||||
|
||||
Un breve cadena de texto que usar para identificar esta copia de seguridad
|
||||
en el futuro. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<header>Backup label</header>
|
||||
|
||||
A short string that can be used to identify this backup later on. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>Nivell de còpia</header>
|
||||
|
||||
El nivell de còpia controla quins fitxers s'escriuran a la còpia. Si es tria
|
||||
el nivell 0, es desarà cada fitxer sota el directori a copiar. Altrament,
|
||||
només es copiaran els fitxers que són nous o han estat modificats d'ençà
|
||||
de la darrera còpia d'un nivell inferior. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>Nivel de dump</header>
|
||||
|
||||
El nivel de dump controla qué ficheros se escribirán a la copia de
|
||||
seguridad. Si se elige el nivel 0, se guardarán todos los ficheros bajo el
|
||||
directorio del que hacer copia de seguridad. En otro caso sólo se guardarán
|
||||
los fichero más recientes o modificados desde la última copia de seguridad
|
||||
con un nivel de dump inferior al actual. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<header>Dump level</header>
|
||||
|
||||
The dump level controls which files will be written to the backup. If level 0
|
||||
is chosen, every file under the directory to backup will be saved. Otherwise,
|
||||
only files that are new or modified since the last dump of a lower level will
|
||||
be written. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Segueix els enllaços simbòlics</header>
|
||||
|
||||
Quan s'activa aquesta opció, els enllaços simbòlics no es copien com a
|
||||
enllaços. En lloc d'això, s'emmagatzemaran els fitxers als quals apunten. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Follow symbolic links?</header>
|
||||
|
||||
When this option is enabled, symbolic links will not be backed up as links.
|
||||
Instead, the files that they point to will be stored instead. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Mida màxima de fitxer a incloure</header>
|
||||
|
||||
Si s'estableix aquesta opció, els fitxers més grans de la mida màxima
|
||||
especificada no s'afegiran a la còpia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Tamaño máximo de fichero que incluir</header>
|
||||
|
||||
Si esta opción está activada los ficheros más grandes que el límite máximo
|
||||
especificado no se escribirán a la copia de seguridad. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Maximum file size to include</header>
|
||||
|
||||
If this option is set, files larger than the specified maximum size will not
|
||||
be written to the backup. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>Parteix en múltiples fitxers</header>
|
||||
|
||||
Si es copia sobre un fitxer normal en un sistema de fitxers amb una mida
|
||||
màxima de fitxer petita (com ara EXT2), s'hauria d'activar aquesta opció
|
||||
per tal que la copia es divideixi en múltiples fitxers com <tt>dump001</tt>,
|
||||
<tt>dump002</tt> etc. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<header>¿ Trocear en varios ficheros ?</header>
|
||||
|
||||
Si está guardando la copia de seguridad en un fichero normal dentro de un
|
||||
sistema de ficheros con un reducido tamaño máximo de fichero (como EXT2),
|
||||
debería activar esta opción para que la copia de seguridad se divida en
|
||||
múltiples ficheros con nombres como <tt>dump001</tt>, <tt>dump002</tt>,
|
||||
etc. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Split across multiple files?</header>
|
||||
|
||||
If backing up to a normal file on a filesystem with a small maximum file size
|
||||
(like EXT2), this option should be enabled so that the backup is split into
|
||||
multiple files with names like <tt>dump001</tt>, <tt>dump002</tt> and so on. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Només verifica la còpia</header>
|
||||
|
||||
Si selecciones aquesta opció, el procés de restauració ho farà tot
|
||||
execepte escriure els fitxers restaurats al disc. Això pot ser útil
|
||||
per comprovar la integritat d'una còpia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>¿ Comprobarla copia de seguridad ?</header>
|
||||
|
||||
Si selecciona esta opción el proceso de restauración hará todo excepto
|
||||
escribir a disco los ficheros restaurados. Puede ser útil para comprobar la
|
||||
integridad la integridad de una copia de seguridad. <p>
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Just test backup?</header>
|
||||
|
||||
If this option is selected, the restore process will do everything except
|
||||
write the restored files to disk. This can be useful for checking the
|
||||
integrity of a backup. <p>
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Expulsa la cinta després de la còpia</header>
|
||||
|
||||
Si se selecciona aquesta opció, la cinta de còpia serà rebobinada i
|
||||
expulsada en acabar la còpia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<header>¿ Expulsar la cinta tras la copia de seguridad ?</header>
|
||||
|
||||
Si selecciona esta opción la cinta de la copia de seguridad se rebobinará y
|
||||
se expulsará una vez se haya terminado la copia de seguridad. <p>
|
||||
<hr>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<header>Eject tape after backup?</header>
|
||||
|
||||
If this option is selected, the backup tape will be rewound and ejected
|
||||
once the backup is complete. <p>
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Pregunta abans de reescriure una cinta</header>
|
||||
|
||||
Si s'estableix aquesta opció, la còpia no reescriurà una cinta que ja conté
|
||||
una còpia prèvia. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>¿ Preguntar antes de sobrescribir la cinta ?</header>
|
||||
|
||||
Si esta opción está activada, entonces la copia de seguridad no
|
||||
sobrescribirá automáticamente otra copia de seguridad que encuentre en la
|
||||
cinta. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<header>Ask before overwriting tape?</header>
|
||||
|
||||
If this option is set, the backup will not overwrite a tape that has
|
||||
a previous backup on it. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<header>Reescriu sempre la còpia</header>
|
||||
|
||||
Si aquesta opció està posada a Sí, l'ordre de còpia sempre reescriurà
|
||||
la cinta de còpia sense comprovar si ja en conté una altra. <p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user