BenBE's humble thoughts Thoughts the world doesn't need yet …

16.05.2010

Katastrophen-Recovery mit ispCP

Filed under: Server — Schlagwörter: , , , , , , , , , , , — BenBE @ 20:40:03

Heute gibt es von meiner Seite einmal einen der Beiträge, die man am liebsten nie brauchen wöllte: Wie stelle ich aus minimalen Daten ein ispCP wieder her, falls es am alten Sytem zu Problemen kam. Und auch wenn ich schreibe, Katastrophen-Recovery: Alles, was über einen gewissen Grad an Problemen hinaus geht, wird auch mit dieser Anleitung nicht zu beheben gehen. Von daher eine kurze Checkliste:

  1. Habt ihr ein Backup ALLER Server-Dateien? Wenn ja, reicht im Wesentlichen die Migrationsanleitung von der ispCP-Homepage. Dennoch empfehle ich einen Blick weiter unten zu Hinweisen während man dies erledigt.
  2. Habt ihr ein Backup aller Userdaten UND folgenden Dinge:
    1. die Datenbank ispcp des alten Systems (Binärkopie ausreichend!)
    2. die Datenbank mysql des alten Systems (Binärkopie ausreichend!)
    3. die ispcp.conf des alten Systems
    4. /var/www/ispcp/gui/include/ispcp-db-keys.php
    5. /var/www/ispcp/engine/ispcp-db-keys.pl

    Sollten von den letzten beiden Dateien nur eine verfügbar sein, so kann die jeweils andere aus dieser Datei erzeugt werden. Fehlen beide, kann nur versucht werden, mit Hilfe des Howtos zum Setzen des MySQL-Passwortes für ispCP diese Dateien zu erzeugen. Dies muss nach dem Wiederherstellen der MySQL-Nutzer-Datenbank und vor Aufruf des Setup-Skripts geschehen. DATABASE_USER und DATABASE_PASSWORD müssen für diesen Fall nach Aufruf des Passwort-Skriptes aus der ispcp.conf in die ispcp.old.conf übertragen werden, da ispCP sonst mit den falschen Schlüsseln ein Login probiert.

  3. Habt ihr vom alten System genug Daten, um die im vorigen Punkt nötigen Daten der zweiten Subliste zusammenzukratzen. Wenn nicht, gilt auch hier: Beißt in saure Äpfel, der Todesgott eurer Installation mag die.

Okay: Eines vorweg: Wenn ihr mindestens einen Punkt der obigen Liste bejahen konntet, bestehen berechtigte Hoffnungen, dass ihr um eine vollständige Neuinstallation herumkommt. Eine Garantie gibt es hierbei aber nicht, da die nächsten Schritte mit extrem vielen Möglichkeiten für Fehler verbunden sind und ich es selber beim Erarbeiten dieser Liste geschafft habe, so nahezu JEDE Fehlermeldung, die ispCP bietet auch einmal zu erhalten. Wer also nicht allzu frusttolerant ist, sollte es vor dem Fortfahren mit geeigneten Antidepressiva probieren. Ihr wurdet gewarnt. (more…)

Flattr this!

09.01.2009

Highlighting Perl in all its oddity

Filed under: GeSHi — Schlagwörter: , — BenBE @ 00:02:34

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /var/www/virtual/benny-baumann.de/blog/htdocs/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /var/www/virtual/benny-baumann.de/blog/htdocs/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Following up on a discussion on the GeSHi-devel mailing list I got some interesting testcases for testing Perl in all its oddity.

So lets get things startet: Open up the testcase, and see: The CSS is not fully precise on some stuff (some classes in GeSHi can be used for different things like .co5 for perl is used for predefined variables). So I did a quick editing of the CSS stylesheet with the Web Developer Toolbar to mark everything that was of specific classes (as expected) in a different color than white to see if it actually is highlighted (which most stuff was).

Adding the missing stuff into the language file I got an updated version for Perl that can be found as revision 1975 in the GeSHi SVN repository for testing. Things I didn’t include there are file descriptors as they should already be highlighted (even if <> and <test> are marked as different things.

But in one thing the testcase wasn’t right: Heredocs As well as Regular expressions are supported by GeSHi, see:

$test = <<HEREIAM;
Some text to show this is a heredoc part
HEREIAM;
$match =~ /te[sx]t/g;
$replace =~ s/x/s/i;

Just to be complete on this. Oh, and the

< <

bug is a problem with my WordPress. The demo page does the Heredoc correctly, for those that don’t believe me 😉

Now I’m only lacking this little testcase as a file for inclusion into the Code Repository of GeSHi and I can declare this „done“ …

Update: Revision 1977 contains some important updates on the rev1975\r1974 version of this file: I missed some things due to some issue I had with encoding $ inside of regexps (I missed the escapes PHP needed inside the string). I also added the few remaining cases that the previous version didn’t yet.

What will not be highlighted correctly are bacreferences to numbers (and I thought C was odd …) and nested Heredocs (i.e. Heredocs with two or more starters on one line).

But given the current state this should somewhat resemble most of what even most insane Perl programmers need when puking their code …

Flattr this!

Powered by WordPress