Student activity logs missing from backups, by design?

Re: Student activity logs missing from backups, by design?

by Paul Lindgreen -
Number of replies: 3
Picture of Particularly helpful Moodlers

re: Do you backup courses even if there have been no changes?
re: When you restore, I wonder how quickly Moodle sees the old logs and then deletes them - I am not sure of the process but perhaps that would happen at the next cron job?

Automated backups are set to not backup courses with no changes. I've also manually backed up the course and got the same results. I just backed up a course in our live production site and restored it in another course shell moments later, the student activity logs were not there, just a single entry for each user.

Seeing as the issue also occurred with regular manual backups I am assuming the issue is not related to the automated backup settings?

re: As for difference between logs in plugins etc and backup, I believe the backup settings are referring to the backup logs, not the course logs.  (Someone might correct me on that though!)

If a course is manually backed up and saved to a local computer, should the student activity logs be there regardless of the course setting 'keep logs for'? Would the student activity logs be lost only upon Restoring based on the 'keeps logs for' setting then, ie keep logs setting 30 days, course ended 60 days ago, upon restore those logs would not be restored as they are too old? If I was to restore a course more then 365 days old would there be no way to view student activity logs as 365days is the maximum setting?

Note: After restoring the course to a blank shell and seeing no student activity logs I backed up that same course and see the backup file is the same size as the original. So either I am not retrieving the student activity logs from the backup or the backup does not have the student activity logs to begin with.

In reply to Paul Lindgreen

Re: Student activity logs missing from backups, by design?

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

Where in the course backup file are the student activity logs? I'ld like to confirm student activites are in a manually backed up course to begin with.

I tried looking in the 'activities' folders and see a 'logs.xml' file but they do not contain any logs even though Activities should have been backed up?

In reply to Paul Lindgreen

Re: Student activity logs missing from backups, by design?

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Have you included user data and logs in your backups?

In reply to Emma Richardson

Re: Student activity logs missing from backups, by design?

by Paul Lindgreen -
Picture of Particularly helpful Moodlers

Yes, all info checked for backing up except 'anonymize information' and 'include badges'.

How does the General Backup default setting 'Keep logs for' affect backups? Currently mine is set to 30 days but I've tried 365 as well, but I'm not sure what it does to manual and automated backups?

We are looking for an easy way to restore student logs older than 1 year and were thinking our quarterly backup and archive of the moodle database may be useful, Do you think restoring a 16month old database in a development environment will give us access to student activity logs older than 1 year? Would those logs be removed after the cron job runs to clean up logs older than 1 year?