Hinweis: Sie sind auf den Seiten der Moodle 1.9 Dokumentation. Die Dokumentation der aktuellsten Moodle-Version finden Sie hier: Sicherung und Wiederherstellung FAQ.

Sicherung und Wiederherstellung FAQ: Unterschied zwischen den Versionen

Aus MoodleDocs
Wechseln zu:Navigation, Suche
Zeile 30: Zeile 30:
*Bewertungsskalen werden nur gesichert, wenn sie in mindestens einer Lernaktivität verwendet werden.
*Bewertungsskalen werden nur gesichert, wenn sie in mindestens einer Lernaktivität verwendet werden.


==The process ends with: "Error: An error occurred deleting old backup data". What should I do?==
==Der Prozess endet mit einer Fehlermeldung. Was kann ich tun?==


This part of the backup (or restore) procedure tries to delete old info, used in previous executions, performing the following tasks:
Es kann passieren, dass das Sichern oder Wiederherstellen eines Kurses mit der Fehlermeldung


# Delete old records from "backup_ids" table: Check the table exists, repair it and try again.
  "Error: An error occurred deleting old backup data".
# Delete old records from "backup_files" table: Check the table exists, repair it and try again.
# Delete old files from "moodledata/temp/backup": Delete the dir completely and try again.


[[Image:BackupProblem.gif|thumb|Backup error message]]For points 1 & 2, there are various ways of repairing tables, including using MySQL Admin.
endet, d.h. alte Sicherungsdaten nicht gelöscht werden können. Im einzelnen passiert während des Prozesses der Kurssicherung oder -wiederherstellung folgendes:
For point 3 see below:


The error message states that the "directory not empty" and gives the path to that directory. If you go there with an FTP program you can see what is there and clean up. It could be just some empty subfolders that were leftover. Deleting these has been able to help. One can also delete the dir "moodledata/temp/backup" completely. That can take a bit longer but may solve several problems at once.
# Alte Datensätze aus der Tabelle '''mdl_backup_ids''' der [[Moodle-Datenbank]] löschen: Prüfen Sie, ob diese Tabelle existiert, reparieren Sie ggf. die Tabelle und versuchen Sie es erneut.
# Alte Datensätze aus der Tabelle '''mdl_backup_files''' der [[Moodle-Datenbank]] löschen: Prüfen Sie, ob diese Tabelle existiert, reparieren Sie ggf. die Tabelle und versuchen Sie es erneut.
# Alte Dateien im Unterverzeichnis ''moodledata/temp/backup'' des [[Moodle-Datenverzeichnisses]] löschen: Löschen Sie dieses Unterverzeichnis auf dem Server und versuchen Sie es erneut.
 
[[Image:BackupProblem.gif|thumb|Backup error message]]
 
'''Bemerkung zu den Punkten 1 und 2''': Es gibt verschiedene Möglichkeiten, Tabellen in der [[Moodle-Datenbank]] zu reparieren, u.a. mit Hilfe von MySQL Admin.
 
Bemerkung zu Punkt 3: Die Fehlermeldung besagt, dass das Unterverzeichnis ''moodledata/temp/backup'' nicht leer ist und gibt den Pfad zu diesem Unterverzeichnis aus. Wenn Sie per FTP auf dieses Unterverzeichnis zugreifen, können Sie den Inhalt prüfen und löschen. Es kann sein, dass das Unterverzeichnis einfach weitere, leere Verzeichnisse enthält - löschen Sie diese. Oder löschen Sie das gesamte Verzeichnis ''moodledata/temp/backup''. Das kann u.U. etwas länger dauern, aber dafür evtl. mehrere Probleme auf einmal lösen.


==The process ends with: "XML error: not well-formed (invalid token) at line YYYY". What can I do?==
==The process ends with: "XML error: not well-formed (invalid token) at line YYYY". What can I do?==

Version vom 13. Juli 2009, 15:48 Uhr

Baustelle.png Diese Seite ist noch nicht vollständig übersetzt.

Siehe en:Backup_and_restore_FAQ

Wie sichere ich einen Kurs?

Siehe Kurssicherung und Automatische Kurssicherung.

Wie stelle ich einen Kurs wieder her?

Siehe Kurswiederherstellung.

Wie sichere ich meine gesamte Moodle-Installation?

Siehe Sicherung der Moodle-Installation.

Sicherung bricht beim Zippen ab!

Moodle 1.9 und ältere Versionen verwenden eine PHP-Bibliothek, um Dateien zu packen. Diese Vorgehensweise ist nicht sehr effizient und hat insbesondere Probleme beim Packen und Entpacken von großen Dateien. Sie können aber auch ein externes ZIP-Programm verwenden, welches Sie unter Website-Administration > Server > Systemprogramme eintragen können.

Moodle 2.0 verwendet neue PHP-Zip-Funktionen, so dass ein externes Systemprogramm nicht mehr nötig ist.

Was sind die Pros und Cons von Kurssicherung bzw. Sicherung der Moodle-Installation?

Die Sicherung der Moodle-Installation wird empfohlen, um eine vollständige Sicherung aller relevanten Daten für den Notfall schnell verfügbar zu haben.

Die Automatische Kurssicherung ist teurer in Bezug auf Zeitaufwand und CPU-Last. Auch die Wiederherstellung Ihrer Moodle-Installation im Notfall dauert länger. Kurssicherungen sind nützlich, um "frische" Kopien von Kursen zu haben, die wiederverwendet werden sollen, sie sollten aber niemals als alleinige Backup-Strategie dienen (es sei denn, Ihr Hosting-Provider erlaubt keine vollständige Sicherung der Moodle-Installation).

Welche Daten sind in einer Kurssicherung nicht enthalten?

Wenn Sie bei einer Kurssicherung alle Optionen auswählen, dann werden fast alle kursspezifischen Daten gesichert. Beachten Sie jedoch, dass folgendes nicht gesichert wird:

  • Testfragen werden nur gesichert, wenn mindestens eine Frage einer Fragenkategorie tatsächlich zu einem Test gehört.
  • Bewertungsskalen werden nur gesichert, wenn sie in mindestens einer Lernaktivität verwendet werden.

Der Prozess endet mit einer Fehlermeldung. Was kann ich tun?

Es kann passieren, dass das Sichern oder Wiederherstellen eines Kurses mit der Fehlermeldung

 "Error: An error occurred deleting old backup data".

endet, d.h. alte Sicherungsdaten nicht gelöscht werden können. Im einzelnen passiert während des Prozesses der Kurssicherung oder -wiederherstellung folgendes:

  1. Alte Datensätze aus der Tabelle mdl_backup_ids der Moodle-Datenbank löschen: Prüfen Sie, ob diese Tabelle existiert, reparieren Sie ggf. die Tabelle und versuchen Sie es erneut.
  2. Alte Datensätze aus der Tabelle mdl_backup_files der Moodle-Datenbank löschen: Prüfen Sie, ob diese Tabelle existiert, reparieren Sie ggf. die Tabelle und versuchen Sie es erneut.
  3. Alte Dateien im Unterverzeichnis moodledata/temp/backup des Moodle-Datenverzeichnisses löschen: Löschen Sie dieses Unterverzeichnis auf dem Server und versuchen Sie es erneut.
Backup error message

Bemerkung zu den Punkten 1 und 2: Es gibt verschiedene Möglichkeiten, Tabellen in der Moodle-Datenbank zu reparieren, u.a. mit Hilfe von MySQL Admin.

Bemerkung zu Punkt 3: Die Fehlermeldung besagt, dass das Unterverzeichnis moodledata/temp/backup nicht leer ist und gibt den Pfad zu diesem Unterverzeichnis aus. Wenn Sie per FTP auf dieses Unterverzeichnis zugreifen, können Sie den Inhalt prüfen und löschen. Es kann sein, dass das Unterverzeichnis einfach weitere, leere Verzeichnisse enthält - löschen Sie diese. Oder löschen Sie das gesamte Verzeichnis moodledata/temp/backup. Das kann u.U. etwas länger dauern, aber dafür evtl. mehrere Probleme auf einmal lösen.

The process ends with: "XML error: not well-formed (invalid token) at line YYYY". What can I do?

This problem can appear at any point in the restore process. It's caused when the XML parser detects something incorrect in the backup file that prevent correct operation. Usually, it's caused by some "illegal" characters added in the original course due to some copy/paste of text containing them (control characters, or invalid sequences...).

The best method to handle this issue is:

  • Unzip the problematic backup file under one empty folder.
  • Open the moodle.xml with Firefox. It will show you where (exact char) the problem is happening.
  • Edit the moodle.xml file with some UTF8-compatible editor and delete such characters. Save changes.
  • Test the moodle.xml file again with Firefox until no error was displayed.
  • Zip everything again (all the folder contents but not the folder itself!).
  • Restore the course. It should work now.
  • Restore still not working? See the next question.

Also, if possible, it's highly recommended to solve those problems in the original course too from Moodle itself. Once "repaired" there, problems will be out if you create new backup files in the future.

I Still get an XML error. How can I clean the borked XML file?

In some cases XML backup files may contain characters causing the restore process to abort, even after the steps described in the previous question. In such cases you may want to try the following:

  • Unzip the problematic Moodle backup file under one empty folder. Moodle will create the course file folders as long as the unclean moodle.xml file. Please unzip using the Moodle unzip feature.
  • Rename the unclean moodle.xml file to moodle-unclean.xml.
  • If you don't have access to your Moodle server's command prompt, using the Moodle zip feature, zip the moodle-unclean.xml file only, download the zip file locally and unzip it. It is very important to download the xml file in zipped format to avoid unwanted character encoding when transferring from an operating system to another.
  • Move the downloaded Atlassian XML Cleaner Utility in the same folder where is your moodle-unclean.xml file.
  • Issue the following command from the command prompt:
java -jar atlassian-xml-cleaner-0.1.jar moodle-unclean.xml > moodle.xml
  • If you launched the utility on your local computer, zip the just created (and hopefully cleaned) moodle.xml file and upload it in the same place from where you downloaded the moodle-unclean.xml file. Once uploaded, unzip it using the Moodle unzip feature.
  • Zip everything again (all the folder contents but the folder itself!).
  • Restore the course. It should work now.

What does "Some of your courses weren't saved!!" mean?

There are three possible causes of this problem:

  1. Error - this happens when the backup procedure has found an error and so hasn't finished the backup of a particular course. These are "controlled" errors and the scheduled backup continues with the next course.
  2. Unfinished - this happens when the backup procedure dies without knowing why. When the cron is next executed it detects that the last execution went wrong, and continues skipping the problematic course. A possible solution would be to raise the PHP/Apache limit in your installation (memory, time of execution...). By taking a look to your log tables you should be able to see if the "crash" is happening at exact time intervals (usually a problem with the max_execution_time php's variable), or if there is some exact point were all the courses are breaking (generally internal zip libraries, try to switch to external executables instead).
  3. Skipped - this happens when a course is unavailable to students and has not been changed in the last month (31 days). This isn't an error situation - it's a feature, especially useful for sites with many unavailable old courses, saving process time.

How can I restore pre 1.6 non-ISO-8859-1 backups to Moodle 1.6 (Unicode)?

Any backup files with contents which are not 100% ISO-8859-1 will be a problem to restore to Moodle 1.6 (and upwards) running under Unicode. Instead, please try the following:

  1. Make a clean install of Moodle 1.5.x (the latest version available)
  2. Restore all your courses there (they should work if they were working originally)
  3. Upgrade your site to Moodle 1.6 and run the UTF-8 migration script
  4. Backup your courses again

This will produce a new set of backup files that will be 100% UTF-8 and you will be able to use them with Moodle 1.6 without any problems.

Restoring a course results in broken HTML tags. What can I do?

This problem is due to a PHP bug in libxml2 2.7.1 (the same bug reported with version 2.7.2 and 2.7.3). All HTML entities, such as >, < and " are removed when a course is restored.

To resolve the problem, you should use a different version of libxml2 such as 2.7.0 or 2.6.32 or compile PHP against libexpat instead of libxml2 or finally use PHP version >= 5.2.9 that solves this compatibility issue over the newer libxml2.

At Gentoo servers, you can use

echo ">dev-libs/libxml2-2.6.32" >> /etc/portage/package.mask

Update: This was fixed for libxml2 version 2.7.3 in PHP snapshot on 11/01/2009. You can use the following patch:

--- php-5.2.8/ext/xml/compat.c 2008/12/31 11:12:38 1.52
+++ php-5.2.8/ext/xml/compat.c 2009/01/11 12:00:30 1.53
@@ -482,6 +482,10 @@
parser->parser->charset = XML_CHAR_ENCODING_NONE;
#endif

+#if LIBXML_VERSION >= 20703
+ xmlCtxtUseOptions(parser->parser, XML_PARSE_OLDSAX);
+#endif
+
parser->parser->replaceEntities = 1;
parser->parser->wellFormed = 0;
if (sep != NULL) {

See the discussion Restoring makes webpages and labels in code for further information.

If the above doesn't make much sense... as of the time of writing the latest versions of libxml2 and PHP no longer have this problem. Upgrade both and you should be fine.

Warum werden einige Kurse bei der automatischen Kurssicherung übersprungen?

Ab Moodle 1.6 werden bei der automatischen Kurssicherung Kurse übersprungen, die für Teilnehmer nicht verfügbar sind und im vergangenen Monat nicht geändert wurden.

Warum bricht die Kurswiederherstellung ab?

Wenn Sie versuchen, einen Kurs in einer älteren Moodle-Version wiederherzustellen als der, in der der Kurs gesichert wurde, dann kann dies zu Fehlern und zum Abbruch der Kurswiederherstellung führen. Achten Sie also darauf, dass die Moodle-Version bei der Wiederherstellung dieselbe ist wie bei der Sicherung oder neuer als die Sicherung.

Wenn die Wiederherstellung unerwartet und ohne Fehlermeldung abbricht, dann aktivieren Sie das Debugging und versuchen Sie es erneut. Die dann angezeigten Fehlermeldungen können bei der Problemlösung helfen - wenden sie sich damit an die Experten in den jeweiligen Foren des Kurses Using Moodle auf moodle.org.

How can I improve restore robustness and execution times?

Moodle1.9 To improve restore robustness and execution times, particularly for medium to large course backups, try enabling the setting experimentalsplitrestore in Administration > Miscellaneous > Experimental. (This setting is available in Moodle 1.9.5 onwards.)

Siehe auch

Diskussionsbeiträge im Kurs Using Moodle auf moodle.org: