26 Commits

Author SHA1 Message Date
stronk7
e19d817eb3 Now backup of 1.5 gradebooks is working (restore coming soon). Features are:
- It's automatic. No setting for it. Does it sound ok?
 - Any info related to non-exported modules is skipped.
 - Any info related to non-exported users is skipped.
2005-04-19 23:21:45 +00:00
stronk7
4e5f28b6a1 Now scheduled backup emails set the priotity header if something was wrong.
Bug 2647.
(http://moodle.org/bugs/bug.php?op=show&bugid=2647)
2005-03-02 18:09:58 +00:00
stronk7
70641539f3 Now MIM are included in backup (not restore yet). Configurable
for scheduled backups and only done in SITE backups. Structure is:
<MESSAGES>
  <MESSAGE>
    Content of the message with one flag to difference read & unread
  </MESSAGE>
  <CONTACTS>
    <CONTACT>
      Content of the contact
    </CONTACT>
  </CONTACTS>
</MESSAGES>
message_get_participants() should include contact users too!!
2005-02-13 02:59:04 +00:00
stronk7
572248937e Now metacourse in supported in manual and scheduled backups. It can be configured
in both backups. Please check if the used structure and exported data has sense!
2005-02-04 14:33:51 +00:00
stronk7
94df8a48c3 Now scheduled backup supports new blocks.
Moved blocks code to library.
Fixed a missing global preventing restore to work.
2005-01-27 19:07:51 +00:00
mjollnir_
075ff4698a Merged from MOODLE_14_STABLE: Adding slashes to backup_log.info as courses with an apostrophe in their fullname cause sql errors 2005-01-10 21:48:04 +00:00
stronk7
99f363bf66 Now backup names are cleaned completely, avoiding some problems
with translations and manually typed names with diacritics.
Thanks to Marian Zvalo!

Merged from MOODLE_14_STABLE
2004-12-19 16:18:10 +00:00
stronk7
0a23fdb759 Now courses are deleted from backup_courses when they have been
deleted from Moodle. See:
http://moodle.org/mod/forum/discuss.php?d=13633

Merged from MOODLE_14_STABLE
2004-11-04 00:10:33 +00:00
stronk7
70bbfd3186 Scheduled backup improvements:
- Old (>4 hour) directories are deleted at the beginning of the
  execution, so the disk full problem should be out!
- There are 2 types of errors:
    - Controlled errors: The backup process finish although something
        has been wrong.
    - Uncontrolled errors: The backup process dies (memory fault, apache
        problem, electric problem...:-)).
- Now scheduled backup is able to detect previous uncontrolled errors to
  avoid repeating the same course always. It'll be deferred to the next
  execution.
- Every time that a backup cycle has finished, admins will receive an email
  with the summary of the execution.
- The 'ERROR' text will be present in email subjects if something was wrong.

With this, all should be ok (I hope).

Merged from MOODLE_14_STABLE
2004-09-24 19:20:32 +00:00
gustav_delius
7ef0797dea some fixes for XHTML compliance 2004-09-12 01:34:24 +00:00
moodler
d462753c54 Changed echo statements to mtrace() 2004-08-07 06:02:26 +00:00
stronk7
dfd0229026 Modified to delete temp files older than 4 hours (previously it was
configured to 48 hours). Force to execute the clean before doing the
backup itself. This should avoid the disk full of temp backup files
issue. See bug 1520.
http://moodle.org/bugs/bug.php?op=show&bugid=1520

Changes merged from MOODLE_13_STABLE.
2004-06-27 22:35:27 +00:00
stronk7
1029856e40 Now scheduled bakup checks for required XML functions to work.
Bug 1432 related.
(http://moodle.org/bugs/bug.php?op=show&bugid=1432)
2004-05-20 15:17:39 +00:00
stronk7
4c49c802d0 Some minor changes about the system to encode file.php calls included.
Solve an important issue about scheduled backups not working properly
    when encoding links...
Added support for event->visible in backup & restore.

TODO: Add wwwroot to backup/restore to use it when decoding.
      Change the system to encode forum calls.
2004-05-06 22:17:45 +00:00
stronk7
cd44fdcb82 Some important changes:
- Now course events are supported in backup & restore.
        - in manual backups
        - in scheduled backups
    - Fixed important bug when restoring groups.
    - Added support to the "user change password" action
      (with some changes done in login/change_password.php)

Please, test it !!!!
2004-02-21 01:30:22 +00:00
stronk7
e9163ad481 Now groups are included in scheduled backups.
I think that we should use the same exact code in backup_execute.php
and backup_scheduled.php to avoid duplicating it in two files !!
2004-01-29 00:07:25 +00:00
stronk7
148b8edfca Now, when the status is RUNNING, the function checks how much
old is that status in backup_logs table. If there is no activity
in that period, then the script status is unlocked automatically.
This prevents to become RUNNING for ever !!!
2004-01-05 00:27:22 +00:00
moodler
4cd327fb26 Change default value for backup_sche_keep to be one day.
(As the path of least impact on server resources)
2003-12-30 03:56:32 +00:00
stronk7
b06021549a A new parameter (backup_sche_keep) is included. Oldest backup files
will be deleted automatically. Try it !!
2003-12-29 20:24:45 +00:00
stronk7
b35a612212 Solve more bugs in set_field("backup_courses"... calls. 2003-12-28 11:15:19 +00:00
moodler
e82b841361 Add the site's shortname to the email subject 2003-12-27 04:08:04 +00:00
moodler
8c39e2740f FIxed a small bug when updating the next time 2003-12-27 03:14:32 +00:00
stronk7
d997d2d44e Now an email is sent to the admin when some course backup is excecuted.
TODO:
   - View logs
   - Language strings
2003-12-15 00:54:16 +00:00
stronk7
7f46857afe Now scheduled backups seem to be fully functional. Please, test it !!
TODO:
   - Insert info about process in backup_log
   - Be able to see that info from admin/backup.php
   - Email to the admin with the execution progress
   - Create all languaje strings
Bye :-)
2003-12-14 00:00:28 +00:00
stronk7
c4b39dd214 Included backup's cron function (not implemented) 2003-12-12 19:36:52 +00:00
stronk7
1b225eaf65 Wow !!
Now backup of one course is ENTIRELY encapsulated inside backup_scheduled.php.
And a backup of EVERY course can be executed invoking try.php.
Backing up to a custom directory is working too !!
They are preliminary versions, of course, but seem to work fine :-)
Now I'm going to make all the necessay structures to support the cron system
and to be able to inform the admin about every scheduled backup process.
Ciao :-)
2003-12-01 22:00:00 +00:00