Did some backups of courses to see which ones reported files missing.
Had to have error reporting turned on to get specific information.
With error reporting off, only a notice about some files missing and wouldn't be included.
For the backups, included only activities and resources + quiz bank
With debugging turned on courses would backup but then report the errors indicating which files
were missing.
Below is a listing of one with the path to moodledata obscured a little:
S102 (the course short name)
Missing file in pool: /S-I-II-1 SAI Outline.pdf (context 716 'File: S-I-II-1 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/9d/3c/9d3c7aa9849bf3258261b1e4eda6194f59330b2a]
Missing file in pool: /S-I-II-2 SAI Outline.pdf (context 719 'File: S-I-II-2 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/89/4a/894af73cd7d375bafdf6785b8b5d15c12982ead4]
Missing file in pool: /S-I-II-3 SAI Outline.pdf (context 722 'File: S-I-II-3 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/83/cc/83cc60472a34eec69f380148dd48d0219294747b]
Missing file in pool: /S-I-II-4 SAI Outline.pdf (context 725 'File: S-I-II-4 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/b4/c6/b4c6e320daec81956dd695ea565833825a4b0ee2]
Missing file in pool: /S-I-II-5 SAI Outline.pdf (context 728 'File: S-I-II-5 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/2b/b9/2bb9cb8c5f774598bfd9ca4647beaaff49889784]
Missing file in pool: /S-I-II-6 SAI Outline.pdf (context 731 'File: S-I-II-6 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/54/23/54237eeb3cee396baec4a4b509414c1510f71c3c]
Missing file in pool: /S-I-II-7 SAI Outline.pdf (context 734 'File: S-I-II-7 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/6c/ef/6cef5b68b5ca160ffc646b2349fe0fd765822590]
Missing file in pool: /S-I-II-8 SAI Outline.pdf (context 737 'File: S-I-II-8 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/be/48/be48a99dff6b051ab7f586689c87fe48991ed303]
Missing file in pool: /S-I-II-9 SAI Outline.pdf (context 740 'File: S-I-II-9 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/40/ab/40ab3030cc0299a9719bb0838f96f669ec6a6f32]
Missing file in pool: /S-I-II-10 SAI Outline.pdf (context 743 'File: S-I-II-10 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/1b/5d/1b5ddfdd716791538401b3cbaabf0fef0a17b811]
Missing file in pool: /S-I-II-11 SAI Outline.pdf (context 746 'File: S-I-II-11 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/fb/6d/fb6d81d75b422b1b5c1b6975153acf2d9180c4eb]
Missing file in pool: /S-I-II-12 SAI Outline.pdf (context 749 'File: S-I-II-12 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/d9/2d/d92d2a2b09c5b0c7b0314b6a252d0b22cbd16a73]
Missing file in pool: /S-I-II-13 SAI Outline.pdf (context 752 'File: S-I-II-13 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/55/80/5580760f43845088b14fd3ff65cd7379f9d88c19]
Missing file in pool: /S-I-II-14 SAI Outline.pdf (context 755 'File: S-I-II-14 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/ff/65/ff65814f02a5d51bec54031649ae11c8f1d8957b]
Missing file in pool: /S-I-II-15 SAI Outline.pdf (context 758 'File: S-I-II-15 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/75/92/7592b9bf5d08377f30089931b8dd19803583c322]
Missing file in pool: /S-I-II-16 SAI Outline.pdf (context 958 'File: S-I-II-16 Outline', component mod_resource, filearea content, itemid 0) [/pathtodata/moodledata/filedir/d9/52/d952c2dbbec64e3756693fa4ff5f21a3deba88af]
I did 4 like this ... all had the same issue.
Bottom line ... my suggestion to put 0 byte files at locations where Moodle is expecting to find them etc. is very time consuming and would require a level of access not within Moodle UI. It would/might be prone to human error (even if one were very experienced with Moodle and operating system upon which this site resides).
Thus, think replacing them via Moodle UI is a safe way to go.
I know that's not what you wanted to hear ... but there is no magic button, etc. that will un-do this.
The only thing that would work is the moodledata/filedir directory that matched the DB.
Oh ... please remove my account from your system.
'spirit of sharing', Ken