Revision 4e0ea59f
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
bin/mozilla/admin.pl | ||
---|---|---|
36 | 36 |
|
37 | 37 |
use DBI; |
38 | 38 |
use CGI; |
39 |
use POSIX qw(strftime); |
|
40 |
use IO::File; |
|
41 |
use Fcntl; |
|
42 |
use English qw(-no_match_vars); |
|
43 |
use Sys::Hostname; |
|
39 | 44 |
|
40 | 45 |
use SL::Form; |
46 |
use SL::Mailer; |
|
41 | 47 |
use SL::User; |
42 | 48 |
use SL::Common; |
43 | 49 |
use SL::Inifile; |
... | ... | |
562 | 568 |
|
563 | 569 |
$form->{title} = "Lx-Office ERP / " . $locale->text('Database Administration'); |
564 | 570 |
|
571 |
$form->{ALLOW_DBBACKUP} = "$pg_dump_exe" ne "DISABLED"; |
|
572 |
|
|
565 | 573 |
$form->header(); |
566 | 574 |
print $form->parse_html_template("admin/dbadmin"); |
567 | 575 |
} |
... | ... | |
693 | 701 |
"Lx-Office ERP " |
694 | 702 |
. $locale->text('Database Administration') . " / " |
695 | 703 |
. $locale->text('Delete Dataset'); |
696 |
|
|
697 | 704 |
$form->header(); |
698 | 705 |
print $form->parse_html_template("admin/dbdelete"); |
699 | 706 |
} |
700 | 707 |
|
708 |
sub backup_dataset { |
|
709 |
$form->{title} = |
|
710 |
"Lx-Office ERP " |
|
711 |
. $locale->text('Database Administration') . " / " |
|
712 |
. $locale->text('Backup Dataset'); |
|
713 |
|
|
714 |
if ("$pg_dump_exe" eq "DISABLED") { |
|
715 |
$form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.')); |
|
716 |
} |
|
717 |
|
|
718 |
my @dbsources = sort User->dbsources($form); |
|
719 |
$form->{DATABASES} = [ map { { "dbname" => $_ } } @dbsources ]; |
|
720 |
$form->{NO_DATABASES} = !scalar @dbsources; |
|
721 |
|
|
722 |
my $username = getpwuid $UID || "unknown-user"; |
|
723 |
my $hostname = hostname() || "unknown-host"; |
|
724 |
$form->{from} = "Lx-Office Admin <${username}\@${hostname}>"; |
|
725 |
|
|
726 |
$form->header(); |
|
727 |
print $form->parse_html_template("admin/backup_dataset"); |
|
728 |
} |
|
729 |
|
|
730 |
sub backup_dataset_start { |
|
731 |
$form->{title} = |
|
732 |
"Lx-Office ERP " |
|
733 |
. $locale->text('Database Administration') . " / " |
|
734 |
. $locale->text('Backup Dataset'); |
|
735 |
|
|
736 |
$pg_dump_exe ||= "pg_dump"; |
|
737 |
|
|
738 |
if ("$pg_dump_exe" eq "DISABLED") { |
|
739 |
$form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.')); |
|
740 |
} |
|
741 |
|
|
742 |
$form->isblank("dbname", $locale->text('The dataset name is missing.')); |
|
743 |
$form->isblank("to", $locale->text('The email address is missing.')) if $form->{destination} eq "email"; |
|
744 |
|
|
745 |
my $tmpdir = "/tmp/lx_office_backup_" . Common->unique_id(); |
|
746 |
mkdir $tmpdir, 0700 || $form->error($locale->text('A temporary directory could not be created:') . " $!"); |
|
747 |
|
|
748 |
my $pgpass = IO::File->new("${tmpdir}/.pgpass", O_WRONLY | O_CREAT, 0600); |
|
749 |
|
|
750 |
if (!$pgpass) { |
|
751 |
unlink $tmpdir; |
|
752 |
$form->error($locale->text('A temporary file could not be created:') . " $!"); |
|
753 |
} |
|
754 |
|
|
755 |
print $pgpass "$form->{dbhost}:$form->{dbport}:$form->{dbname}:$form->{dbuser}:$form->{dbpasswd}\n"; |
|
756 |
$pgpass->close(); |
|
757 |
|
|
758 |
$ENV{HOME} = $tmpdir; |
|
759 |
|
|
760 |
my @args = ("-c", "-o", "-h", $form->{dbhost}, "-U", $form->{dbuser}); |
|
761 |
push @args, ("-p", $form->{dbport}) if ($form->{dbport}); |
|
762 |
push @args, $form->{dbname}; |
|
763 |
|
|
764 |
my $cmd = "${pg_dump_exe} " . join(" ", map { s/\\/\\\\/g; s/\"/\\\"/g; $_ } @args); |
|
765 |
my $name = "dataset_backup_$form->{dbname}_" . strftime("%Y%m%d", localtime()) . ".sql.gz"; |
|
766 |
|
|
767 |
if ($form->{destination} ne "email") { |
|
768 |
my $in = IO::File->new("$cmd |"); |
|
769 |
|
|
770 |
if (!$in) { |
|
771 |
unlink "${tmpdir}/.pgpass"; |
|
772 |
rmdir $tmpdir; |
|
773 |
|
|
774 |
$form->error($locale->text('The pg_dump process could not be started.')); |
|
775 |
} |
|
776 |
|
|
777 |
print "content-type: application/octet-stream\n"; |
|
778 |
print "content-disposition: attachment; filename=\"${name}\"\n\n"; |
|
779 |
|
|
780 |
while (my $line = <$in>) { |
|
781 |
print $line; |
|
782 |
} |
|
783 |
|
|
784 |
$in->close(); |
|
785 |
|
|
786 |
unlink "${tmpdir}/.pgpass"; |
|
787 |
rmdir $tmpdir; |
|
788 |
|
|
789 |
} else { |
|
790 |
my $tmp = $tmpdir . "/dump_" . Common::unique_id(); |
|
791 |
|
|
792 |
if (system("$cmd > $tmp") != 0) { |
|
793 |
unlink "${tmpdir}/.pgpass", $tmp; |
|
794 |
rmdir $tmpdir; |
|
795 |
|
|
796 |
$form->error($locale->text('The pg_dump process could not be started.')); |
|
797 |
} |
|
798 |
|
|
799 |
my $mail = new Mailer; |
|
800 |
|
|
801 |
map { $mail->{$_} = $form->{$_} } qw(from to cc subject message); |
|
802 |
|
|
803 |
$mail->{charset} = $dbcharset ? $dbcharset : Common::DEFAULT_CHARSET; |
|
804 |
$mail->{attachments} = [ { "filename" => $tmp, "name" => $name } ]; |
|
805 |
$mail->send(); |
|
806 |
|
|
807 |
unlink "${tmpdir}/.pgpass", $tmp; |
|
808 |
rmdir $tmpdir; |
|
809 |
|
|
810 |
$form->{title} = |
|
811 |
"Lx-Office ERP " |
|
812 |
. $locale->text('Database Administration') . " / " |
|
813 |
. $locale->text('Backup Dataset'); |
|
814 |
|
|
815 |
$form->header(); |
|
816 |
print $form->parse_html_template("admin/backup_dataset_email_done"); |
|
817 |
} |
|
818 |
} |
|
819 |
|
|
820 |
sub restore_dataset { |
|
821 |
$form->{title} = |
|
822 |
"Lx-Office ERP " |
|
823 |
. $locale->text('Database Administration') . " / " |
|
824 |
. $locale->text('Restore Dataset'); |
|
825 |
|
|
826 |
if ("$pg_dump_exe" eq "DISABLED") { |
|
827 |
$form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.')); |
|
828 |
} |
|
829 |
} |
|
830 |
|
|
701 | 831 |
sub unlock_system { |
702 | 832 |
|
703 | 833 |
unlink "$userspath/nologin"; |
locale/de/admin | ||
---|---|---|
1 | 1 |
$self->{texts} = { |
2 |
'A temporary directory could not be created:' => 'Ein temporäres Verzeichnis konnte nicht erstellt werden:', |
|
3 |
'A temporary file could not be created:' => 'Eine temporäre Datei konnte nicht erstellt werden:', |
|
2 | 4 |
'ADDED' => 'Hinzugef?gt', |
3 | 5 |
'Add User' => 'Benutzer erfassen', |
4 | 6 |
'Address' => 'Adresse', |
5 | 7 |
'Administration' => 'Administration', |
6 | 8 |
'Attempt to call an undefined sub named \'%s\'' => 'Es wurde versucht, eine nicht definierte Unterfunktion namens \'%s\' aufzurufen.', |
9 |
'Backup Dataset' => 'Datenbank sichern', |
|
7 | 10 |
'Bin List' => 'Lagerliste', |
8 | 11 |
'CANCELED' => 'Storniert', |
9 | 12 |
'Cannot create Lock!' => 'System kann nicht gesperrt werden!', |
... | ... | |
17 | 20 |
'DUNNING STARTED' => 'Mahnprozess gestartet', |
18 | 21 |
'Database Administration' => 'Datenbankadministration', |
19 | 22 |
'Database User missing!' => 'Datenbankbenutzer fehlt!', |
23 |
'Database backups and restorations are disabled in lx-erp.conf.' => 'Datenbanksicherungen und -wiederherstellungen sind in der lx-erp.conf deaktiviert.', |
|
20 | 24 |
'Dataset missing!' => 'Datenbank fehlt!', |
21 | 25 |
'Dataset upgrade' => 'Datenbankaktualisierung', |
22 | 26 |
'Delete Dataset' => 'Datenbank l?schen', |
... | ... | |
63 | 67 |
'Purchase Order' => 'Lieferantenauftrag', |
64 | 68 |
'Quotation' => 'Angebot', |
65 | 69 |
'RFQ' => 'Anfrage', |
70 |
'Restore Dataset' => 'Datenbank wiederherstellen', |
|
66 | 71 |
'SAVED' => 'Gespeichert', |
67 | 72 |
'SAVED FOR DUNNING' => 'Gespeichert', |
68 | 73 |
'SCREENED' => 'Angezeigt', |
... | ... | |
73 | 78 |
'Storno Invoice' => 'Stornorechnung', |
74 | 79 |
'Storno Packing List' => 'Stornolieferschein', |
75 | 80 |
'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.', |
81 |
'The dataset name is missing.' => 'Der Datenbankname fehlt.', |
|
76 | 82 |
'The directory %s does not exist.' => 'Das Verzeichnis %s existiert nicht.', |
83 |
'The email address is missing.' => 'Die Emailadresse fehlt.', |
|
77 | 84 |
'The login is missing.' => 'Das Login fehlt.', |
78 | 85 |
'The passwords do not match.' => 'Die Passwörter stimmen nicht überein.', |
86 |
'The pg_dump process could not be started.' => 'Der pg_dump-Prozess konnte nicht gestartet werden.', |
|
79 | 87 |
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.', |
80 | 88 |
'Unit' => 'Einheit', |
81 | 89 |
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.', |
... | ... | |
104 | 112 |
'Q' => 'Q', |
105 | 113 |
'add_user' => 'add_user', |
106 | 114 |
'adminlogin' => 'adminlogin', |
115 |
'backup_dataset' => 'backup_dataset', |
|
116 |
'backup_dataset_start' => 'backup_dataset_start', |
|
107 | 117 |
'build_std_url' => 'build_std_url', |
108 | 118 |
'calculate_qty' => 'calculate_qty', |
109 | 119 |
'call_sub' => 'call_sub', |
... | ... | |
132 | 142 |
'pg_database_administration' => 'pg_database_administration', |
133 | 143 |
'project_selection_internal' => 'project_selection_internal', |
134 | 144 |
'reformat_numbers' => 'reformat_numbers', |
145 |
'restore_dataset' => 'restore_dataset', |
|
135 | 146 |
'restore_form' => 'restore_form', |
136 | 147 |
'save' => 'save', |
137 | 148 |
'save_form' => 'save_form', |
... | ... | |
146 | 157 |
'update_dataset' => 'update_dataset', |
147 | 158 |
'vendor_selection' => 'vendor_selection', |
148 | 159 |
'benutzer_erfassen' => 'add_user', |
160 |
'datenbank_sichern' => 'backup_dataset', |
|
149 | 161 |
'administratorpasswort_?ndern' => 'change_admin_password', |
150 | 162 |
'passwort_?ndern' => 'change_password', |
151 | 163 |
'weiter' => 'continue', |
... | ... | |
155 | 167 |
'system_sperren' => 'lock_system', |
156 | 168 |
'anmeldung' => 'login', |
157 | 169 |
'datenbankadministration' => 'pg_database_administration', |
170 |
'datenbank_wiederherstellen' => 'restore_dataset', |
|
158 | 171 |
'speichern' => 'save', |
159 | 172 |
'system_entsperren' => 'unlock_system', |
160 | 173 |
'datenbank_aktualisieren' => 'update_dataset', |
locale/de/all | ||
---|---|---|
27 | 27 |
'4. Quarter' => '4. Quartal', |
28 | 28 |
'<b>What</b> do you want to look for?' => '<b>Wonach</b> wollen Sie suchen?', |
29 | 29 |
'A Buchungsgruppe consists of a descriptive name and the account numbers for the income and expense accounts for those four tax zones as well as the inventory account number.' => 'Eine Buchungsgruppe besteht aus einem deskriptiven Namen, den Erlös- und Aufwandskonten für diese vier Steuerzonen sowie aus einem Inventarkonto.', |
30 |
'A temporary directory could not be created:' => 'Ein temporäres Verzeichnis konnte nicht erstellt werden:', |
|
31 |
'A temporary file could not be created:' => 'Eine temporäre Datei konnte nicht erstellt werden:', |
|
30 | 32 |
'A unit with this name does already exist.' => 'Eine Einheit mit diesem Namen existiert bereits.', |
31 | 33 |
'ADDED' => 'Hinzugef?gt', |
32 | 34 |
'AP' => 'Einkauf', |
... | ... | |
166 | 168 |
'BOM' => 'St?ckliste', |
167 | 169 |
'BWA' => 'BWA', |
168 | 170 |
'Back' => 'Zurück', |
171 |
'Backup Dataset' => 'Datenbank sichern', |
|
172 |
'Backup of dataset' => 'Sicherung der Datenbank', |
|
169 | 173 |
'Balance' => 'Bilanz', |
170 | 174 |
'Balance Sheet' => 'Bilanz', |
171 | 175 |
'Balanced Ledger' => 'Bilanz ausgeglichen', |
... | ... | |
320 | 324 |
'Database Administration' => 'Datenbankadministration', |
321 | 325 |
'Database Host' => 'Datenbankcomputer', |
322 | 326 |
'Database User missing!' => 'Datenbankbenutzer fehlt!', |
327 |
'Database backups and restorations are disabled in lx-erp.conf.' => 'Datenbanksicherungen und -wiederherstellungen sind in der lx-erp.conf deaktiviert.', |
|
323 | 328 |
'Database template' => 'Datenbankvorlage', |
324 | 329 |
'Database update error:' => 'Fehler beim Datenbankupgrade:', |
325 | 330 |
'Dataset' => 'Datenbank', |
... | ... | |
368 | 373 |
'Display file' => 'Datei anzeigen', |
369 | 374 |
'Do you want to <b>limit</b> your search?' => 'Wollen Sie Ihre Suche <b>spezialisieren</b>?', |
370 | 375 |
'Done' => 'Fertig', |
376 |
'Download the backup' => 'Die Sicherungsdatei herunterladen', |
|
371 | 377 |
'Draft saved.' => 'Entwurf gespeichert.', |
372 | 378 |
'Drawing' => 'Zeichnung', |
373 | 379 |
'Driver' => 'Treiber', |
... | ... | |
699 | 705 |
'No Dataset selected!' => 'Keine Datenbank ausgew?hlt!', |
700 | 706 |
'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein H?ndler gefunden', |
701 | 707 |
'No customer has been selected yet.' => 'Es wurde noch kein Kunde ausgew?hlt.', |
708 |
'No databases have been found on this server.' => 'Auf diesem Server wurden keine Datenbanken gefunden.', |
|
702 | 709 |
'No datasets have been selected.' => 'Es wurden keine Datenbanken ausgewählt.', |
703 | 710 |
'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.', |
704 | 711 |
'No entries were found which had no unit assigned to them.' => 'Es wurden keine Einträge gefunden, denen keine Einheit zugeordnet war.', |
... | ... | |
802 | 809 |
'Please select a customer from the list below.' => 'Bitte einen Endkunden aus der Liste ausw?hlen', |
803 | 810 |
'Please select a vendor from the list below.' => 'Bitte einen H?ndler aus der Liste ausw?hlen', |
804 | 811 |
'Please select the chart of accounts this installation is using from the list below.' => 'Bitte wählen Sie den Kontenrahmen aus, der bei dieser Installation verwendet wird.', |
812 |
'Please select the database you want to backup' => 'Bitte wählen Sie die zu sichernde Datenbank gefunden', |
|
805 | 813 |
'Please seletct the dataset you want to delete:' => 'Bitte wählen Sie die zu löschende Datenbank aus:', |
806 | 814 |
'Plural' => 'Plural', |
807 | 815 |
'Port' => 'Port', |
... | ... | |
899 | 907 |
'Request for Quotation' => 'Anfrage', |
900 | 908 |
'Request for Quotations' => 'Anfragen', |
901 | 909 |
'Required by' => 'Lieferdatum', |
910 |
'Restore Dataset' => 'Datenbank wiederherstellen', |
|
902 | 911 |
'Revenue' => 'Erl?skonto', |
903 | 912 |
'Revenue Account' => 'Erl?skonto', |
904 | 913 |
'Revenues EU with UStId' => 'Erlöse EU m. UStId', |
... | ... | |
945 | 954 |
'Select postscript or PDF!' => 'Postscript oder PDF ausw?hlen!', |
946 | 955 |
'Select the chart of accounts in use' => 'Benutzten Kontenrahmen auswählen', |
947 | 956 |
'Sell Price' => 'Verkaufspreis', |
957 |
'Send the backup via Email' => 'Die Sicherungsdatei per Email verschicken', |
|
948 | 958 |
'Sep' => 'Sep', |
949 | 959 |
'September' => 'September', |
950 | 960 |
'Serial No.' => 'Seriennummer', |
... | ... | |
1039 | 1049 |
'The database upgrade for the introduction of Buchungsgruppen is now complete.' => 'Das Datenbankupgrade für die Einführung von Buchungsgruppen ist jetzt beendet.', |
1040 | 1050 |
'The database upgrade for the introduction of units is now complete.' => 'Das Datenbankupgrade zwecks Einführung von Einheiten ist nun beendet.', |
1041 | 1051 |
'The dataset <TMPL_VAR db ESCAPE=HTML> has been successfully created.' => 'Die Datenbank <TMPL_VAR db ESCAPE=HTML> wurde erfolgreich erstellt.', |
1052 |
'The dataset backup has been sent via email to <TMPL_VAR to ESCAPE=HTML>.' => 'Die Datenbanksicherung wurde an <TMPL_VAR to ESCAPE=HTML> per Email verschickt.', |
|
1053 |
'The dataset name is missing.' => 'Der Datenbankname fehlt.', |
|
1042 | 1054 |
'The directory %s does not exist.' => 'Das Verzeichnis %s existiert nicht.', |
1043 | 1055 |
'The dunning process started' => 'Der Mahnprozess ist gestartet.', |
1056 |
'The email address is missing.' => 'Die Emailadresse fehlt.', |
|
1044 | 1057 |
'The factor is missing in row %d.' => 'Der Faktor fehlt in Zeile %d.', |
1045 | 1058 |
'The factor is missing.' => 'Der Faktor fehlt.', |
1046 | 1059 |
'The following Buchungsgruppen have already been created:' => 'Die folgenden Buchungsgruppen wurden bereits angelegt:', |
... | ... | |
1056 | 1069 |
'The name is missing in row %d.' => 'Der Name fehlt in Zeile %d.', |
1057 | 1070 |
'The name is missing.' => 'Der Name fehlt.', |
1058 | 1071 |
'The passwords do not match.' => 'Die Passwörter stimmen nicht überein.', |
1072 |
'The pg_dump process could not be started.' => 'Der pg_dump-Prozess konnte nicht gestartet werden.', |
|
1059 | 1073 |
'The preferred one is to install packages provided by your operating system distribution (e.g. Debian or RPM packages).' => 'Die bevorzugte Art, ein Perl-Modul zu installieren, ist durch Installation eines von Ihrem Betriebssystem zur Verfügung gestellten Paketes (z.B. Debian-Pakete oder RPM).', |
1060 | 1074 |
'The second way is to use Perl\'s CPAN module and let it download and install the module for you.' => 'Die zweite Variante besteht darin, Perls CPAN-Modul zu benutzen und es das Modul für Sie installieren zu lassen.', |
1061 | 1075 |
'The third way is to download the module from the above mentioned URL and to install the module manually following the installations instructions contained in the source archive.' => 'Die dritte Variante besteht darin, das Paket von der oben genannten URL herunterzuladen und es manuell zu installieren. Beachten Sie dabei die im Paket enthaltenen Installationsanweisungen.', |
lx-erp.conf | ||
---|---|---|
1 | 1 |
use Cwd; |
2 |
use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $watch_form_variables); |
|
2 |
use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $pg_dump_exe $watch_form_variables);
|
|
3 | 3 |
|
4 | 4 |
# path to user configuration files |
5 | 5 |
$userspath = "users"; |
... | ... | |
67 | 67 |
$dbcharset = "ISO-8859-15"; |
68 | 68 |
|
69 | 69 |
|
70 |
# Datenbankbackups werden mit dem externen Programm "pg_dump" erledigt. |
|
71 |
# Wenn es nicht im aktuellen Pfad vorhanden ist, so muss hier der vollst?ndige |
|
72 |
# Pfad eingetragen werden. Wenn die Variable auf "DISABLED" gesetzt wird, |
|
73 |
# so werden die Men?punkte zum Backup und Wiederherstellen von Datenbanken |
|
74 |
# im Administrationsfrontend nicht angeboten. |
|
75 |
$pg_dump_exe = "pg_dump"; |
|
76 |
|
|
70 | 77 |
# Globale Debug-Ausgaben (de-)aktivieren? Moegliche Werte sind |
71 | 78 |
# LXDebug::NONE - keine Debugausgaben |
72 | 79 |
# LXDebug::INFO |
templates/webpages/admin/backup_dataset_de.html | ||
---|---|---|
1 |
<body class="admin" onload="set_subject(); document.getElementsByName('to')[0].focus(); "> |
|
2 |
|
|
3 |
<script type="text/javascript"> |
|
4 |
<!-- |
|
5 |
function set_subject() { |
|
6 |
var subject_template = "Sicherung der Datenbank"; |
|
7 |
var subject = document.Form.subject.value; |
|
8 |
|
|
9 |
if ((subject == "") || (subject.substr(0, subject_template.length) == subject_template)) { |
|
10 |
document.Form.subject.value = subject_template + " " + document.Form.dbname.value; |
|
11 |
} |
|
12 |
} |
|
13 |
--> |
|
14 |
</script> |
|
15 |
|
|
16 |
<h2><TMPL_VAR title></h2> |
|
17 |
|
|
18 |
<TMPL_IF NO_DATABSES> |
|
19 |
Auf diesem Server wurden keine Datenbanken gefunden. |
|
20 |
|
|
21 |
<TMPL_ELSE> |
|
22 |
|
|
23 |
<form name="Form" method="post" action="admin.pl"> |
|
24 |
|
|
25 |
<input type="hidden" name="dbdriver" value="Pg"> |
|
26 |
<input type="hidden" name="dbhost" value="<TMPL_VAR dbhost ESCAPE=HTML>"> |
|
27 |
<input type="hidden" name="dbport" value="<TMPL_VAR dbport ESCAPE=HTML>"> |
|
28 |
<input type="hidden" name="dbuser" value="<TMPL_VAR dbuser ESCAPE=HTML>"> |
|
29 |
|
|
30 |
<p> |
|
31 |
Bitte wählen Sie die zu sichernde Datenbank gefunden: |
|
32 |
<select name="dbname" onchange="set_subject()"><TMPL_LOOP DATABASES><option><TMPL_VAR dbname ESCAPE=HTML></option></TMPL_LOOP></select> |
|
33 |
</p> |
|
34 |
|
|
35 |
<table> |
|
36 |
<tr> |
|
37 |
<td valign="top"><input type="radio" name="destination" id="destination_download" value="download" checked></td> |
|
38 |
<td valign="top"><label for="destination_download">Die Sicherungsdatei herunterladen</label></td> |
|
39 |
</tr> |
|
40 |
|
|
41 |
<tr> |
|
42 |
<td valign="top"><input type="radio" name="destination" id="destination_email" value="email"></td> |
|
43 |
<td valign="top"> |
|
44 |
<label for="destination_email">Die Sicherungsdatei per Email verschicken</label><br> |
|
45 |
|
|
46 |
<table> |
|
47 |
<tr> |
|
48 |
<td valign="top" align="right">Von</td> |
|
49 |
<td valign="top"><input name="from" size="40" value="<TMPL_VAR from ESCAPE=HTML>"></td> |
|
50 |
</tr> |
|
51 |
|
|
52 |
<tr> |
|
53 |
<td valign="top" align="right">An</td> |
|
54 |
<td valign="top"><input name="to" size="40"></td> |
|
55 |
</tr> |
|
56 |
|
|
57 |
<tr> |
|
58 |
<td valign="top" align="right">Cc</td> |
|
59 |
<td valign="top"><input name="cc" size="40"></td> |
|
60 |
</tr> |
|
61 |
|
|
62 |
<tr> |
|
63 |
<td valign="top" align="right">Betreff</td> |
|
64 |
<td valign="top"><input name="subject" size="40"></td> |
|
65 |
</tr> |
|
66 |
|
|
67 |
<tr> |
|
68 |
<td valign="top" align="right">Nachricht</td> |
|
69 |
<td valign="top"><textarea name="message" cols="40" rows="10"></textarea></td> |
|
70 |
</tr> |
|
71 |
|
|
72 |
</table> |
|
73 |
|
|
74 |
</td> |
|
75 |
</tr> |
|
76 |
|
|
77 |
</table> |
|
78 |
|
|
79 |
<input name="callback" type="hidden" value="admin.pl?action=list_users&rpw=<TMPL_VAR rpw ESCAPE=URL>"> |
|
80 |
<input type="hidden" name="rpw" value="<TMPL_VAR rpw ESCAPE=HTML>"> |
|
81 |
<input type="hidden" name="nextsub" value="backup_dataset_start"> |
|
82 |
|
|
83 |
<hr size="3" noshade> |
|
84 |
|
|
85 |
<br> |
|
86 |
|
|
87 |
<input type="submit" class="submit" name="action" value="Weiter"> |
|
88 |
|
|
89 |
</form> |
|
90 |
|
|
91 |
</TMPL_IF> |
|
92 |
|
|
93 |
</body> |
|
94 |
</html> |
templates/webpages/admin/backup_dataset_email_done_de.html | ||
---|---|---|
1 |
<body class="admin"> |
|
2 |
|
|
3 |
<h2><TMPL_VAR title></h2> |
|
4 |
|
|
5 |
<p>Die Datenbanksicherung wurde an <TMPL_VAR to ESCAPE=HTML> per Email verschickt.</p> |
|
6 |
|
|
7 |
<form method="post" action="admin.pl"> |
|
8 |
<input type="hidden" name="nextsub" value="list_users"> |
|
9 |
<input type="submit" name="action" value="Weiter"> |
|
10 |
</form> |
|
11 |
</body> |
|
12 |
</html> |
templates/webpages/admin/backup_dataset_email_done_master.html | ||
---|---|---|
1 |
<body class="admin"> |
|
2 |
|
|
3 |
<h2><TMPL_VAR title></h2> |
|
4 |
|
|
5 |
<p><translate>The dataset backup has been sent via email to <TMPL_VAR to ESCAPE=HTML>.</translate></p> |
|
6 |
|
|
7 |
<form method="post" action="admin.pl"> |
|
8 |
<input type="hidden" name="nextsub" value="list_users"> |
|
9 |
<input type="submit" name="action" value="<translate>Continue</translate>"> |
|
10 |
</form> |
|
11 |
</body> |
|
12 |
</html> |
templates/webpages/admin/backup_dataset_master.html | ||
---|---|---|
1 |
<body class="admin" onload="set_subject(); document.getElementsByName('to')[0].focus(); "> |
|
2 |
|
|
3 |
<script type="text/javascript"> |
|
4 |
<!-- |
|
5 |
function set_subject() { |
|
6 |
var subject_template = "<translate>Backup of dataset</translate>"; |
|
7 |
var subject = document.Form.subject.value; |
|
8 |
|
|
9 |
if ((subject == "") || (subject.substr(0, subject_template.length) == subject_template)) { |
|
10 |
document.Form.subject.value = subject_template + " " + document.Form.dbname.value; |
|
11 |
} |
|
12 |
} |
|
13 |
--> |
|
14 |
</script> |
|
15 |
|
|
16 |
<h2><TMPL_VAR title></h2> |
|
17 |
|
|
18 |
<TMPL_IF NO_DATABSES> |
|
19 |
<translate>No databases have been found on this server.</translate> |
|
20 |
|
|
21 |
<TMPL_ELSE> |
|
22 |
|
|
23 |
<form name="Form" method="post" action="admin.pl"> |
|
24 |
|
|
25 |
<input type="hidden" name="dbdriver" value="Pg"> |
|
26 |
<input type="hidden" name="dbhost" value="<TMPL_VAR dbhost ESCAPE=HTML>"> |
|
27 |
<input type="hidden" name="dbport" value="<TMPL_VAR dbport ESCAPE=HTML>"> |
|
28 |
<input type="hidden" name="dbuser" value="<TMPL_VAR dbuser ESCAPE=HTML>"> |
|
29 |
|
|
30 |
<p> |
|
31 |
<translate>Please select the database you want to backup</translate>: |
|
32 |
<select name="dbname" onchange="set_subject()"><TMPL_LOOP DATABASES><option><TMPL_VAR dbname ESCAPE=HTML></option></TMPL_LOOP></select> |
|
33 |
</p> |
|
34 |
|
|
35 |
<table> |
|
36 |
<tr> |
|
37 |
<td valign="top"><input type="radio" name="destination" id="destination_download" value="download" checked></td> |
|
38 |
<td valign="top"><label for="destination_download"><translate>Download the backup</translate></label></td> |
|
39 |
</tr> |
|
40 |
|
|
41 |
<tr> |
|
42 |
<td valign="top"><input type="radio" name="destination" id="destination_email" value="email"></td> |
|
43 |
<td valign="top"> |
|
44 |
<label for="destination_email"><translate>Send the backup via Email</translate></label><br> |
|
45 |
|
|
46 |
<table> |
|
47 |
<tr> |
|
48 |
<td valign="top" align="right"><translate>From</translate></td> |
|
49 |
<td valign="top"><input name="from" size="40" value="<TMPL_VAR from ESCAPE=HTML>"></td> |
|
50 |
</tr> |
|
51 |
|
|
52 |
<tr> |
|
53 |
<td valign="top" align="right"><translate>To</translate></td> |
|
54 |
<td valign="top"><input name="to" size="40"></td> |
|
55 |
</tr> |
|
56 |
|
|
57 |
<tr> |
|
58 |
<td valign="top" align="right"><translate>Cc</translate></td> |
|
59 |
<td valign="top"><input name="cc" size="40"></td> |
|
60 |
</tr> |
|
61 |
|
|
62 |
<tr> |
|
63 |
<td valign="top" align="right"><translate>Subject</translate></td> |
|
64 |
<td valign="top"><input name="subject" size="40"></td> |
|
65 |
</tr> |
|
66 |
|
|
67 |
<tr> |
|
68 |
<td valign="top" align="right"><translate>Message</translate></td> |
|
69 |
<td valign="top"><textarea name="message" cols="40" rows="10"></textarea></td> |
|
70 |
</tr> |
|
71 |
|
|
72 |
</table> |
|
73 |
|
|
74 |
</td> |
|
75 |
</tr> |
|
76 |
|
|
77 |
</table> |
|
78 |
|
|
79 |
<input name="callback" type="hidden" value="admin.pl?action=list_users&rpw=<TMPL_VAR rpw ESCAPE=URL>"> |
|
80 |
<input type="hidden" name="rpw" value="<TMPL_VAR rpw ESCAPE=HTML>"> |
|
81 |
<input type="hidden" name="nextsub" value="backup_dataset_start"> |
|
82 |
|
|
83 |
<hr size="3" noshade> |
|
84 |
|
|
85 |
<br> |
|
86 |
|
|
87 |
<input type="submit" class="submit" name="action" value="<translate>Continue</translate>"> |
|
88 |
|
|
89 |
</form> |
|
90 |
|
|
91 |
</TMPL_IF> |
|
92 |
|
|
93 |
</body> |
|
94 |
</html> |
templates/webpages/admin/dbadmin_de.html | ||
---|---|---|
55 | 55 |
<input type="submit" class="submit" name="action" value="Datenbank anlegen"> |
56 | 56 |
<input type="submit" class="submit" name="action" value="Datenbank aktualisieren"> |
57 | 57 |
<input type="submit" class="submit" name="action" value="Datenbank l?schen"> |
58 |
<TMPL_IF ALLOW_DBBACKUP> |
|
59 |
<input type="submit" class="submit" name="action" value="Datenbank sichern"> |
|
60 |
<!-- <input type="submit" class="submit" name="action" value="Datenbank wiederherstellen"> --> |
|
61 |
</TMPL_IF> |
|
58 | 62 |
</td> |
59 | 63 |
</tr> |
60 | 64 |
</table> |
templates/webpages/admin/dbadmin_master.html | ||
---|---|---|
55 | 55 |
<input type="submit" class="submit" name="action" value="<translate>Create Dataset</translate>"> |
56 | 56 |
<input type="submit" class="submit" name="action" value="<translate>Update Dataset</translate>"> |
57 | 57 |
<input type="submit" class="submit" name="action" value="<translate>Delete Dataset</translate>"> |
58 |
<TMPL_IF ALLOW_DBBACKUP> |
|
59 |
<input type="submit" class="submit" name="action" value="<translate>Backup Dataset</translate>"> |
|
60 |
<!-- <input type="submit" class="submit" name="action" value="<translate>Restore Dataset</translate>"> --> |
|
61 |
</TMPL_IF> |
|
58 | 62 |
</td> |
59 | 63 |
</tr> |
60 | 64 |
</table> |
Auch abrufbar als: Unified diff
Beim Administrationsfrontend einen Punkt eingebaut, mit dem man Datenbanken mittels pg_dump sichern kann. Das Ergebnis wird ge-gzipt und kann heruntergeladen oder direkt per Email verschickt werden.