2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 * Strings for component 'tool_health', language 'en', branch 'MOODLE_22_STABLE'
22 * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 ob_start(); //for whitespace test
27 require('../../../config.php');
28 $extraws = ob_get_clean();
30 require_once($CFG->libdir.'/adminlib.php');
32 admin_externalpage_setup('toolhealth');
34 define('SEVERITY_NOTICE', 'notice');
35 define('SEVERITY_ANNOYANCE', 'annoyance');
36 define('SEVERITY_SIGNIFICANT', 'significant');
37 define('SEVERITY_CRITICAL', 'critical');
39 $solution = optional_param('solution', 0, PARAM_PLUGIN);
42 require_capability('moodle/site:config', context_system::instance());
46 echo $OUTPUT->header();
48 if(strpos($solution, 'problem_') === 0 && class_exists($solution)) {
49 health_print_solution($solution);
52 health_find_problems();
56 echo $OUTPUT->footer();
59 function health_find_problems() {
62 echo $OUTPUT->heading(get_string('pluginname', 'tool_health'));
65 SEVERITY_CRITICAL => array(),
66 SEVERITY_SIGNIFICANT => array(),
67 SEVERITY_ANNOYANCE => array(),
68 SEVERITY_NOTICE => array(),
72 for($i = 1; $i < 1000000; ++$i) {
73 $classname = sprintf('problem_%06d', $i);
74 if(!class_exists($classname)) {
77 $problem = new $classname;
79 if($problem->exists()) {
80 $severity = $problem->severity();
81 $issues[$severity][$classname] = array(
82 'severity' => $severity,
83 'description' => $problem->description(),
84 'title' => $problem->title()
92 echo '<div id="healthnoproblemsfound">';
93 echo get_string('healthnoproblemsfound', 'tool_health');
97 echo $OUTPUT->heading(get_string('healthproblemsdetected', 'tool_health'));
98 $severities = array(SEVERITY_CRITICAL, SEVERITY_SIGNIFICANT, SEVERITY_ANNOYANCE, SEVERITY_NOTICE);
99 foreach($severities as $severity) {
100 if(!empty($issues[$severity])) {
101 echo '<dl class="healthissues '.$severity.'">';
102 foreach($issues[$severity] as $classname => $data) {
103 echo '<dt id="'.$classname.'">'.$data['title'].'</dt>';
104 echo '<dd>'.$data['description'];
105 echo '<form action="index.php#solution" method="get">';
106 echo '<input type="hidden" name="solution" value="'.$classname.'" /><input type="submit" value="'.get_string('viewsolution').'" />';
115 function health_print_solution($classname) {
117 $problem = new $classname;
119 'title' => $problem->title(),
120 'severity' => $problem->severity(),
121 'description' => $problem->description(),
122 'solution' => $problem->solution()
125 echo $OUTPUT->heading(get_string('pluginname', 'tool_health'));
126 echo $OUTPUT->heading(get_string('healthproblemsolution', 'tool_health'));
127 echo '<dl class="healthissues '.$data['severity'].'">';
128 echo '<dt>'.$data['title'].'</dt>';
129 echo '<dd>'.$data['description'].'</dd>';
130 echo '<dt id="solution" class="solution">'.get_string('healthsolution', 'tool_health').'</dt>';
131 echo '<dd class="solution">'.$data['solution'].'</dd></dl>';
132 echo '<form id="healthformreturn" action="index.php#'.$classname.'" method="get">';
133 echo '<input type="submit" value="'.get_string('healthreturntomain', 'tool_health').'" />';
144 function severity() {
145 return SEVERITY_NOTICE;
147 function description() {
150 function solution() {
155 class problem_000002 extends problem_base {
157 return 'Extra characters at the end of config.php or other library function';
162 if($extraws === '') {
167 function severity() {
168 return SEVERITY_SIGNIFICANT;
170 function description() {
171 return 'Your Moodle configuration file config.php or another library file, contains some characters after the closing PHP tag (?>). This causes Moodle to exhibit several kinds of problems (such as broken downloaded files) and must be fixed.';
173 function solution() {
175 return 'You need to edit <strong>'.$CFG->dirroot.'/config.php</strong> and remove all characters (including spaces and returns) after the ending ?> tag. These two characters should be the very last in that file. The extra trailing whitespace may be also present in other PHP files that are included from lib/setup.php.';
179 class problem_000003 extends problem_base {
181 return '$CFG->dataroot does not exist or does not have write permissions';
185 if(!is_dir($CFG->dataroot) || !is_writable($CFG->dataroot)) {
190 function severity() {
191 return SEVERITY_SIGNIFICANT;
193 function description() {
195 return 'Your <strong>config.php</strong> says that your "data root" directory is <strong>'.$CFG->dataroot.'</strong>. However, this directory either does not exist or cannot be written to by Moodle. This means that a variety of problems will be present, such as users not being able to log in and not being able to upload any files. It is imperative that you address this problem for Moodle to work correctly.';
197 function solution() {
199 return 'First of all, make sure that the directory <strong>'.$CFG->dataroot.'</strong> exists. If the directory does exist, then you must make sure that Moodle is able to write to it. Contact your web server administrator and request that he gives write permissions for that directory to the user that the web server process is running as.';
203 class problem_000004 extends problem_base {
205 return 'cron.php is not set up to run automatically';
209 $lastcron = $DB->get_field_sql('SELECT max(lastcron) FROM {modules}');
210 return (time() - $lastcron > 3600 * 24);
212 function severity() {
213 return SEVERITY_SIGNIFICANT;
215 function description() {
216 return 'The cron.php mainenance script has not been run in the past 24 hours. This probably means that your server is not configured to automatically run this script in regular time intervals. If this is the case, then Moodle will mostly work as it should but some operations (notably sending email to users) will not be carried out at all.';
218 function solution() {
220 return 'For detailed instructions on how to enable cron, see <a href="'.$CFG->wwwroot.'/doc/?file=install.html#cron">this section</a> of the installation manual.';
224 class problem_000005 extends problem_base {
226 return 'PHP: session.auto_start is enabled';
229 return ini_get_bool('session.auto_start');
231 function severity() {
232 return SEVERITY_CRITICAL;
234 function description() {
235 return 'Your PHP configuration includes an enabled setting, session.auto_start, that <strong>must be disabled</strong> in order for Moodle to work correctly. Notable symptoms arising from this misconfiguration include fatal errors and/or blank pages when trying to log in.';
237 function solution() {
239 return '<p>There are two ways you can solve this problem:</p><ol><li>If you have access to your main <strong>php.ini</strong> file, then find the line that looks like this: <pre>session.auto_start = 1</pre> and change it to <pre>session.auto_start = 0</pre> and then restart your web server. Be warned that this, as any other PHP setting change, might affect other web applications running on the server.</li><li>Finally, you may be able to change this setting just for your site by creating or editing the file <strong>'.$CFG->dirroot.'/.htaccess</strong> to contain this line: <pre>php_value session.auto_start "0"</pre></li></ol>';
243 class problem_000007 extends problem_base {
245 return 'PHP: file_uploads is disabled';
248 return !ini_get_bool('file_uploads');
250 function severity() {
251 return SEVERITY_SIGNIFICANT;
253 function description() {
254 return 'Your PHP configuration includes a disabled setting, file_uploads, that <strong>must be enabled</strong> to let Moodle offer its full functionality. Until this setting is enabled, it will not be possible to upload any files into Moodle. This includes, for example, course content and user pictures.';
256 function solution() {
258 return '<p>There are two ways you can solve this problem:</p><ol><li>If you have access to your main <strong>php.ini</strong> file, then find the line that looks like this: <pre>file_uploads = Off</pre> and change it to <pre>file_uploads = On</pre> and then restart your web server. Be warned that this, as any other PHP setting change, might affect other web applications running on the server.</li><li>Finally, you may be able to change this setting just for your site by creating or editing the file <strong>'.$CFG->dirroot.'/.htaccess</strong> to contain this line: <pre>php_value file_uploads "On"</pre></li></ol>';
262 class problem_000008 extends problem_base {
264 return 'PHP: memory_limit cannot be controlled by Moodle';
269 $oldmemlimit = @ini_get('memory_limit');
270 if (empty($oldmemlimit)) {
271 // PHP not compiled with memory limits, this means that it's
272 // probably limited to 8M or in case of Windows not at all.
273 // We can ignore it for now - there is not much to test anyway
274 // TODO: add manual test that fills memory??
277 $oldmemlimit = get_real_size($oldmemlimit);
278 //now lets change the memory limit to something higher
279 $newmemlimit = ($oldmemlimit + 1024*1024*5);
280 raise_memory_limit($newmemlimit);
281 $testmemlimit = get_real_size(@ini_get('memory_limit'));
282 //verify the change had any effect at all
283 if ($oldmemlimit == $testmemlimit) {
284 //memory limit can not be changed - is it big enough then?
285 if ($oldmemlimit < get_real_size('128M')) {
291 reduce_memory_limit($oldmemlimit);
294 function severity() {
295 return SEVERITY_NOTICE;
297 function description() {
298 return 'The settings for PHP on your server do not allow a script to request more memory during its execution. '.
299 'This means that there is a hard limit of '.@ini_get('memory_limit').' for each script. '.
300 'It is possible that certain operations within Moodle will require more than this amount in order '.
301 'to complete successfully, especially if there are lots of data to be processed.';
303 function solution() {
304 return 'It is recommended that you contact your web server administrator to address this issue.';
308 class problem_000009 extends problem_base {
310 return 'SQL: using account without password';
314 return empty($CFG->dbpass);
316 function severity() {
317 return SEVERITY_CRITICAL;
319 function description() {
321 return 'The user account your are connecting to the database server with is set up without a password. This is a very big security risk and is only somewhat lessened if your database is configured to not accept connections from any hosts other than the server Moodle is running on. Unless you use a strong password to connect to the database, you risk unauthorized access to and manipulation of your data.'.($CFG->dbuser != 'root'?'':' <strong>This is especially alarming because such access to the database would be as the superuser (root)!</strong>');
323 function solution() {
325 return 'You should change the password of the user <strong>'.$CFG->dbuser.'</strong> both in your database and in your Moodle <strong>config.php</strong> immediately!'.($CFG->dbuser != 'root'?'':' It would also be a good idea to change the user account from root to something else, because this would lessen the impact in the event that your database is compromised anyway.');
328 /* // not implemented in 2.0 yet
329 class problem_000010 extends problem_base {
331 return 'Uploaded files: slasharguments disabled or not working';
334 if (!$this->is_enabled()) {
337 if ($this->status() < 1) {
342 function severity() {
343 if ($this->is_enabled() and $this->status() == 0) {
344 return SEVERITY_SIGNIFICANT;
346 return SEVERITY_ANNOYANCE;
349 function description() {
351 $desc = 'Slasharguments are needed for relative linking in uploaded resources:<ul>';
352 if (!$this->is_enabled()) {
353 $desc .= '<li>slasharguments are <strong>disabled</strong> in Moodle configuration</li>';
355 $desc .= '<li>slasharguments are enabled in Moodle configuration</li>';
357 if ($this->status() == -1) {
358 $desc .= '<li>can not run automatic test, you can verify it <a href="'.$CFG->wwwroot.'/file.php/testslasharguments" target="_blank">here</a> manually</li>';
359 } else if ($this->status() == 0) {
360 $desc .= '<li>slashargument test <strong>failed</strong>, please check server configuration</li>';
362 $desc .= '<li>slashargument test passed</li>';
367 function solution() {
369 $enabled = $this->is_enabled();
370 $status = $this->status();
372 if ($enabled and ($status == 0)) {
373 $solution .= 'Slasharguments are enabled, but the test failed. Please disable slasharguments in Moodle configuration or fix the server configuration.<hr />';
374 } else if ((!$enabled) and ($status == 0)) {
375 $solution .= 'Slasharguments are disabled and the test failed. You may try to fix the server configuration.<hr />';
376 } else if ($enabled and ($status == -1)) {
377 $solution .= 'Slasharguments are enabled, <a href="'.$CFG->wwwroot.'/file.php/testslasharguments">automatic testing</a> not possible.<hr />';
378 } else if ((!$enabled) and ($status == -1)) {
379 $solution .= 'Slasharguments are disabled, <a href="'.$CFG->wwwroot.'/file.php/testslasharguments">automatic testing</a> not possible.<hr />';
380 } else if ((!$enabled) and ($status > 0)) {
381 $solution .= 'Slasharguments are disabled though the iternal test is OK. You should enable slasharguments in Moodle configuration.';
382 } else if ($enabled and ($status > 0)) {
383 $solution .= 'Congratulations - everything seems OK now :-D';
386 $solution .= '<p>IIS:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li><li>do NOT enable AllowPathInfoForScriptMappings !!!</li><li>slasharguments may not work when using ISAPI and PHP 4.3.10 and older</li></ul></p>';
387 $solution .= '<p>Apache 1:<ul><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
388 $solution .= '<p>Apache 2:<ul><li>you must add <code>AcceptPathInfo on</code> to php.ini or .htaccess</li><li>try to add <code>cgi.fix_pathinfo=1</code> to php.ini</li></ul></p>';
392 function is_enabled() {
394 return !empty($CFG->slasharguments);
398 $handle = @fopen($CFG->wwwroot.'/file.php?file=/testslasharguments', "r");
399 $contents = @trim(fread($handle, 10));
401 if ($contents != 'test -1') {
404 $handle = @fopen($CFG->wwwroot.'/file.php/testslasharguments', "r");
405 $contents = trim(@fread($handle, 10));
408 case 'test 1': return 1;
409 case 'test 2': return 2;
415 class problem_000012 extends problem_base {
417 return 'Random questions data consistency';
421 return $DB->record_exists_select('question', "qtype = 'random' AND parent <> id", array());
423 function severity() {
424 return SEVERITY_ANNOYANCE;
426 function description() {
427 return '<p>For random questions, question.parent should equal question.id. ' .
428 'There are some questions in your database for which this is not true. ' .
429 'One way that this could have happened is for random questions restored from backup before ' .
430 '<a href="http://tracker.moodle.org/browse/MDL-5482">MDL-5482</a> was fixed.</p>';
432 function solution() {
434 return '<p>Upgrade to Moodle 1.9.1 or later, or manually execute the SQL</p>' .
435 '<pre>UPDATE ' . $CFG->prefix . 'question SET parent = id WHERE qtype = \'random\' and parent <> id;</pre>';
439 class problem_000013 extends problem_base {
441 return 'Multi-answer questions data consistency';
445 $positionexpr = $DB->sql_position($DB->sql_concat("','", "q.id", "','"),
446 $DB->sql_concat("','", "qma.sequence", "','"));
447 return $DB->record_exists_sql("
448 SELECT * FROM {question} q
449 JOIN {question_multianswer} qma ON $positionexpr > 0
450 WHERE qma.question <> q.parent") ||
451 $DB->record_exists_sql("
452 SELECT * FROM {question} q
453 JOIN {question} parent_q ON parent_q.id = q.parent
454 WHERE q.category <> parent_q.category");
456 function severity() {
457 return SEVERITY_ANNOYANCE;
459 function description() {
460 return '<p>For each sub-question whose id is listed in ' .
461 'question_multianswer.sequence, its question.parent field should equal ' .
462 'question_multianswer.question; and each sub-question should be in the same ' .
463 'category as its parent. There are questions in your database for ' .
464 'which this is not the case. One way that this could have happened is ' .
465 'for multi-answer questions restored from backup before ' .
466 '<a href="http://tracker.moodle.org/browse/MDL-14750">MDL-14750</a> was fixed.</p>';
468 function solution() {
469 return '<p>Upgrade to Moodle 1.9.1 or later, or manually execute the ' .
470 'code in question_multianswer_fix_subquestion_parents_and_categories in ' .
471 '<a href="http://cvs.moodle.org/moodle/question/type/multianswer/db/upgrade.php?revision=1.1.10.2&view=markup">/question/type/multianswer/db/upgrade.php' .
472 'from the 1.9 stable branch</a>.</p>';
476 class problem_000014 extends problem_base {
478 return 'Only multianswer and random questions should be the parent of another question';
482 return $DB->record_exists_sql("
483 SELECT * FROM {question} q
484 JOIN {question} parent_q ON parent_q.id = q.parent
485 WHERE parent_q.qtype NOT IN ('random', 'multianswer')");
487 function severity() {
488 return SEVERITY_ANNOYANCE;
490 function description() {
491 return '<p>You have questions that violate this in your databse. ' .
492 'You will need to investigate to determine how this happened.</p>';
494 function solution() {
495 return '<p>It is impossible to give a solution without knowing more about ' .
496 ' how the problem was caused. You may be able to get help from the ' .
497 '<a href="http://moodle.org/mod/forum/view.php?f=121">Quiz forum</a>.</p>';
501 class problem_000015 extends problem_base {
503 return 'Question categories should belong to a valid context';
507 return $DB->record_exists_sql("
508 SELECT qc.*, (SELECT COUNT(1) FROM {question} q WHERE q.category = qc.id) AS numquestions
509 FROM {question_categories} qc
510 LEFT JOIN {context} con ON qc.contextid = con.id
511 WHERE con.id IS NULL");
513 function severity() {
514 return SEVERITY_ANNOYANCE;
516 function description() {
518 $problemcategories = $DB->get_records_sql("
519 SELECT qc.id, qc.name, qc.contextid, (SELECT COUNT(1) FROM {question} q WHERE q.category = qc.id) AS numquestions
520 FROM {question_categories} qc
521 LEFT JOIN {context} con ON qc.contextid = con.id
523 ORDER BY numquestions DESC, qc.name");
524 $table = '<table><thead><tr><th>Cat id</th><th>Category name</th>' .
525 "<th>Context id</th><th>Num Questions</th></tr></thead><tbody>\n";
526 foreach ($problemcategories as $cat) {
527 $table .= "<tr><td>$cat->id</td><td>" . s($cat->name) . "</td><td>" .
528 $cat->contextid ."</td><td>$cat->numquestions</td></tr>\n";
530 $table .= '</tbody></table>';
531 return '<p>All question categories are linked to a context id, and, ' .
532 'the context they are linked to must exist. The following categories ' .
533 'belong to a non-existant category:</p>' . $table . '<p>Any of these ' .
534 'categories that contain no questions can just be deleted form the database. ' .
535 'Other categories will require more thought.</p>';
537 function solution() {
539 return '<p>You can delete the empty categories by executing the following SQL:</p><pre>
540 DELETE FROM ' . $CFG->prefix . 'question_categories
542 NOT EXISTS (SELECT * FROM ' . $CFG->prefix . 'question q WHERE q.category = ' . $CFG->prefix . 'question_categories.id)
543 AND NOT EXISTS (SELECT * FROM ' . $CFG->prefix . 'context con WHERE contextid = con.id)
544 </pre><p>Any remaining categories that contain questions will require more thought. ' .
545 'People in the <a href="http://moodle.org/mod/forum/view.php?f=121">Quiz forum</a> may be able to help.</p>';
549 class problem_000016 extends problem_base {
551 return 'Question categories should belong to the same context as their parent';
555 return $DB->record_exists_sql("
556 SELECT parent_qc.id AS parent, child_qc.id AS child, child_qc.contextid
557 FROM {question_categories} child_qc
558 JOIN {question_categories} parent_qc ON child_qc.parent = parent_qc.id
559 WHERE child_qc.contextid <> parent_qc.contextid");
561 function severity() {
562 return SEVERITY_ANNOYANCE;
564 function description() {
566 $problemcategories = $DB->get_records_sql("
568 parent_qc.id AS parentid, parent_qc.name AS parentname, parent_qc.contextid AS parentcon,
569 child_qc.id AS childid, child_qc.name AS childname, child_qc.contextid AS childcon
570 FROM {question_categories} child_qc
571 JOIN {question_categories} parent_qc ON child_qc.parent = parent_qc.id
572 WHERE child_qc.contextid <> parent_qc.contextid");
573 $table = '<table><thead><tr><th colspan="3">Child category</th><th colspan="3">Parent category</th></tr><tr>' .
574 '<th>Id</th><th>Name</th><th>Context id</th>' .
575 '<th>Id</th><th>Name</th><th>Context id</th>' .
576 "</tr></thead><tbody>\n";
577 foreach ($problemcategories as $cat) {
578 $table .= "<tr><td>$cat->childid</td><td>" . s($cat->childname) .
579 "</td><td>$cat->childcon</td><td>$cat->parentid</td><td>" . s($cat->parentname) .
580 "</td><td>$cat->parentcon</td></tr>\n";
582 $table .= '</tbody></table>';
583 return '<p>When one question category is the parent of another, then they ' .
584 'should both belong to the same context. This is not true for the following categories:</p>' .
587 function solution() {
588 return '<p>An automated solution is difficult. It depends whether the ' .
589 'parent or child category is in the wrong pace.' .
590 'People in the <a href="http://moodle.org/mod/forum/view.php?f=121">Quiz forum</a> may be able to help.</p>';
594 class problem_000017 extends problem_base {
596 return 'Question categories tree structure';
598 function find_problems() {
600 static $answer = null;
602 if (is_null($answer)) {
603 $categories = $DB->get_records('question_categories', array(), 'id');
605 // Look for missing parents.
606 $missingparent = array();
607 foreach ($categories as $category) {
608 if ($category->parent != 0 && !array_key_exists($category->parent, $categories)) {
609 $missingparent[$category->id] = $category;
615 while (!empty($categories)) {
616 $current = array_pop($categories);
617 $thisloop = array($current->id => $current);
619 if (isset($thisloop[$current->parent])) {
621 $loops[$current->id] = $thisloop;
623 } else if (!isset($categories[$current->parent])) {
624 // Got to the top level, or a category we already know is OK.
627 // Continue following the path.
628 $current = $categories[$current->parent];
629 $thisloop[$current->id] = $current;
630 unset($categories[$current->id]);
635 $answer = array($missingparent, $loops);
641 list($missingparent, $loops) = $this->find_problems();
642 return !empty($missingparent) || !empty($loops);
644 function severity() {
645 return SEVERITY_ANNOYANCE;
647 function description() {
648 list($missingparent, $loops) = $this->find_problems();
650 $description = '<p>The question categories should be arranged into tree ' .
651 ' structures by the question_categories.parent field. Sometimes ' .
652 ' this tree structure gets messed up.</p>';
654 if (!empty($missingparent)) {
655 $description .= '<p>The following categories are missing their parents:</p><ul>';
656 foreach ($missingparent as $cat) {
657 $description .= "<li>Category $cat->id: " . s($cat->name) . "</li>\n";
659 $description .= "</ul>\n";
662 if (!empty($loops)) {
663 $description .= '<p>The following categories form a loop of parents:</p><ul>';
664 foreach ($loops as $loop) {
665 $description .= "<li><ul>\n";
666 foreach ($loop as $cat) {
667 $description .= "<li>Category $cat->id: " . s($cat->name) . " has parent $cat->parent</li>\n";
669 $description .= "</ul></li>\n";
671 $description .= "</ul>\n";
676 function solution() {
678 list($missingparent, $loops) = $this->find_problems();
680 $solution = '<p>Consider executing the following SQL queries. These fix ' .
681 'the problem by moving some categories to the top level.</p>';
683 if (!empty($missingparent)) {
684 $solution .= "<pre>UPDATE " . $CFG->prefix . "question_categories\n" .
685 " SET parent = 0\n" .
686 " WHERE id IN (" . implode(',', array_keys($missingparent)) . ");</pre>\n";
689 if (!empty($loops)) {
690 $solution .= "<pre>UPDATE " . $CFG->prefix . "question_categories\n" .
691 " SET parent = 0\n" .
692 " WHERE id IN (" . implode(',', array_keys($loops)) . ");</pre>\n";
699 class problem_00000x extends problem_base {
706 function severity() {
707 return SEVERITY_SIGNIFICANT;
709 function description() {
712 function solution() {
722 session.save_path -- it doesn't really matter because we are already IN a session, right?
723 detect unsupported characters in $CFG->wwwroot - see bug Bug #6091 - relative vs absolute path during backup/restore process