Upgrading Mattermost Ver 5.39.0

Attempting to upgrade Mattermost Version 5.39.0 to the most recent version 7.7.1. Attempted to upgrade to the most recent version, but kept getting an error message.
123Image Pasted at 2023-1-24 14-08

Hi @AlexGi and welcome to the Mattermost forums!

This is not the correct way to upgrade Mattermost, please have a look at the official upgrade instructions and please make sure to create a backup first.
Not sure what exactly happened here now, did you also move the /opt/mattermost folder away before or did you just try to move one folder over the other?

https://docs.mattermost.com/upgrade/upgrading-mattermost-server.html