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

Re: automated backups failing - sharing resolution

$
0
0
by Ken Task.  

You've reported other problems with DB matching files.    The things you are reporting are very strange and I don't believe I've ever seen similar.     Sounds like an older backup of the moodledata directory was restored to the site for some reason and thus the data in tables like mdl_files doesn't match what's in moodledata/filedir/.   

Things like this don't happen by themselves.   Ok, that might sound like a 'finger wag' (and it really is, but OK, lesson learned? ), sooooo ...

If there are only 5 or so backups referenced in the DB for which there is no physical file in moodledata/filedir, then do the same thing done with the user pics problem.   Carefully remove records in mdl_files.

What do you get with this query on the DB for Moodle:

select contenthash,filename from `mdl_files` where (`component` like "%backup%" and `filename` like "%.mbz%")

In checking over that output, see any that match up with the one error you've shown:

d04f5e92e7a37c4ab807ed89d2b581507abe26c4

If so, remove the record.

Just to be safe ... would backup the DB first before removing any records AND

I'd take the time to explore /moodledata/filedir/d0/4f/ to see if there is a file with that content hash name.   There shouldn't be.

If you had linux and could use CLI, one could check easily with:

cd /pathto/moodledata/filedir/

find ./d0/4f/ -name d04f5e92e7a37c4ab807ed89d2b581507abe26c4

That should kick back nothing.

Do the same for all those errors seen ... there are only 4-5 right?

Nothing found ... safe to delete the records.

When you finish cleaning up, remove any DB backups you have archived so you won't use errant ones.   Also remove any data directory backups you have so you won't use errant ones.   And do a fresh full site backup ... DB dump, an archive of the code directory, and an archive of the data directory.   Restores are only as good as the backups.

'spirit of sharing', Ken


Viewing all articles
Browse latest Browse all 6588

Trending Articles



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