psql -U moodle_user -d moodle <<EOF
\copy mdl_files(id,contenthash,pathnamehash,contextid,component,filearea,itemid,filepath,filename,userid,filesize,mimetype,status,source,author,license,timecreated,timemodified,sortorder,referencefileid) FROM '/moodlefilerecord.csv' (DELIMITER ',', FORMAT 'csv', HEADER)
EOF