Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Re: Re: Re: Automated backups skip courses not modified - what does it check to see if the course has been modified?

$
0
0
by Dominique Palumbo.  

Hi,

As you said enroll a student is enough to make course changed for backup.

Try this query (mariadb,mysql) to see if at least they have actions logged in your database for that course.

SELECT FROM_UNIXTIME(t1.timecreated)
             ,t1.*
  FROM mdl_logstore_standard_log t1
  WHERE courseid = 2
  LIMIT 0, 100

I also use next query to make an HTML report  with all the courses backuped today :

SELECT DISTINCT t1.courseid
      ,t2.fullname
      ,DATE_FORMAT(FROM_UNIXTIME(laststarttime), '%Y-%m-%d %H:%i') AS start_time
      ,DATE_FORMAT(FROM_UNIXTIME(lastendtime), '%Y-%m-%d %H:%i') AS end_time
      ,SEC_TO_TIME(lastendtime - laststarttime) diff_time
      ,laststatus
  FROM mdl_backup_courses t1
  LEFT JOIN mdl_course t2 ON t2.id = t1.courseid
 WHERE DATE_FORMAT(FROM_UNIXTIME(laststarttime), '%Y%m%d') = CURDATE()+0
 ORDER BY laststarttime DESC

You can also with the first query make one that give you the list of courses that should be backuped...

Hope it's help.



Viewing all articles
Browse latest Browse all 6815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>