[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Utility helper for automated backups run through cron.
Copyright: | 2010 Sam Hemelryk |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 741 lines (32 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
run_automated_backup($rundirective = self::RUN_ON_SCHEDULE) X-Ref |
Runs the automated backups if required |
get_backup_status_array() X-Ref |
Gets the results from the last automated backup that was run based upon the statuses of the courses that were looked at. return: array |
calculate_next_automated_backup($ignoredtimezone, $now) X-Ref |
Works out the next time the automated backup should be run. param: mixed $ignoredtimezone all settings are in server timezone! param: int $now timestamp, should not be in the past, most likely time() return: int timestamp of the next execution at server time |
launch_automated_backup($course, $starttime, $userid) X-Ref |
Launches a automated backup routine for the given course param: stdClass $course param: int $starttime param: int $userid return: bool |
outcome_from_results($results) X-Ref |
Returns the backup outcome by analysing its results. param: array $results returned by a backup return: int {@link self::BACKUP_STATUS_OK} and other constants |
remove_deleted_courses_from_schedule() X-Ref |
Removes deleted courses fromn the backup_courses table so that we don't waste time backing them up. return: int |
get_automated_backup_state($rundirective = self::RUN_ON_SCHEDULE) X-Ref |
Gets the state of the automated backup system. return: int One of self::STATE_* |
set_state_running($running = true) X-Ref |
Sets the state of the automated backup system. param: bool $running return: bool |
remove_excess_backups($course, $now = null) X-Ref |
Removes excess backups from a specified course. param: stdClass $course Course object param: int $now Starting time of the process return: bool Whether or not backups is being removed |
remove_excess_backups_from_course($course, $now) X-Ref |
Removes excess backups in the course backup filearea from a specified course. param: stdClass $course Course object param: int $now Starting time of the process return: bool Whether or not backups are being removed |
remove_excess_backups_from_directory($course, $now) X-Ref |
Removes excess backups in the specified external directory from a specified course. param: stdClass $course Course object param: int $now Starting time of the process return: bool Whether or not backups are being removed |
get_backups_to_delete($backupfiles, $now) X-Ref |
Get the list of backup files to delete depending on the automated backup settings. param: array $backupfiles Existing backup files param: int $now Starting time of the process return: array Backup files to delete |
is_course_modified($courseid, $since) X-Ref |
Check logs to find out if a course was modified since the given time. param: int $courseid course id to check param: int $since timestamp, from which to check return: bool true if the course was modified, false otherwise. This also returns false if no readers are enabled. This is |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |