by Ken Task.
When one migrates a server the original code, DB *and* moodledata are brought over to new server and configured to run ... same version as the old server. If everything working, then upgrade.
Sounds like what you might have attempted ... new code, *database import from old server to new database*, new data directory. OR, one attempted a migation *and* an upgrade at the same time ... new code on new server, same DB from old in new DB, *same* data directory.
Did old instance have file system repo or make use of some other file system (remote)?
Make a query of your DB mdl_files table for the 'humanly recognizable filename' (Unit_03.pdf) on the filename column.
If it does show a reference in that table, check out the contenthash value ...
Then see if that contenthashed file actually does exit in moodledata/filedir/
Contenthash consist of a bunch of letters and numbers ... something like qfdashweo329sdfhqwwlshf
Using the example above:
cd /pathto/moodledata/filedir/
cd qf/da/
The first two characters of the contenthash value is a subdirectory of filedir
The second two characters are a subdirectory of the above.
then ls
See a qfdashweo329sdfhqwwlshf file?
If you do, then see if it's a PDF:
file -b qfdashweo329sdfhqwwlshf
The trouble with copying the old moodledata directory now is it will replace/misplace that which was already there then the current DB has a bunch more mis-information - more broken links I predict.
If you are desparate, might try an rsync from old server moodledata/filedir/ to new server where rsync puts only new files that don't exist already on new server but that's very risky.
'spirit of sharing', Ken