Seems like a mess.
You could try running a discourse-doctor to see if it gives any idea. I have a few but without access to the server, it would take too much time from someone in my modest level to help you.
I probably would reinstall everything if I was in your shoes
1 Backup
cd /var/discourse
./launcher enter app
discourse backup
Retrieve the backup via sftp (sftp protocol, port 22, host : ip of your server, login : root, password : root password)
Make sure you have the uploads folder in the backup. If you don’t, make a local copy of the folder in your hardrive.
2 Delete, reinstall your vps, or use another vps
Use the discourse setup install, if everything is ok: log in, upload and restore a backup
(you can also restore the backup from command line, it’s quicker : Restore a backup from command line)
If you’re not sure about this, it’s best to wait from someone more qualified