Problem switching from mattermost docker to mattermost omnibus

Summary
I have problem switching from mattermost docker to mattermost omnibus

Steps to reproduce
I have deployed an old mattermost instance using this description Deploy Mattermost via Docker - Mattermost documentation for version mattermost 6.4 version and now I want to migrate my mattermost instance to the new server, upgrade it to the latest version and switch it to use mattermost omnibus . What I did:

  1. creates postgreSQL dump with:

docker exec -t postgres_mattermost pg_dump -U mattermost mattermost > backup.sql

  1. copied my volumes/data directory to the fresh server to /opt/mattermost_backup/data
  2. installed fresh copy of mattermost omnibus then stopped it
  3. deleted, re created and import database from the postgreSQL dump to the new instance with below commands:
sudo -u postgres psql

DROP DATABASE mattermost;
CREATE DATABASE mattermost;
GRANT ALL PRIVILEGES ON DATABASE mattermost TO mmuser;
\q
sudo -u postgres psql mattermost < mattermost.sql

then copied the content of /opt/mattermost_backup/data to /opt/data

  1. then I issued systemctl restart mattermost followed by mmomni reconfigure.

Expected behavior
Describe your issue in detail
after this I can login to the mattermost instance and I can see the channels / messages etc however I cannot open any message attachment because following error appear

{"id":"api.file.file_reader.app_error","message":"Cannot open file reader.","detailed_error":"","request_id":"txsioib3hpdqfpoufbqz3aoc4h","status_code":404}

Observed behavior
I cannot open files attached to messages witch the error I mentioned above - here it is again

{"id":"api.file.file_reader.app_error","message":"Cannot open file reader.","detailed_error":"","request_id":"txsioib3hpdqfpoufbqz3aoc4h","status_code":404}

6.4 is really, really old! You’ll want to update that instance, as the updates will include schema changes and updates to the migration tool. You’ll want to get to the first available ESR (7.1.9) and then ESR to ESR until you’re at 10.5.2