Upgrade from webhosting to docker with database problem

Hello,

I’m trying to upgrade my hosted install (ovh) to a docker install (vps) but it doesn’t work.

I don’t have ssh access, so I can’t do a mysqldump, and phpmyadmin doesn’t export my database correctly (random filesize).
I tried to use the backup file from ovh (187Mb) and rename it to import.sql and I used mysqldumper to create a backup file (363Mb). With both I don’t even get to the login screen.

When I run the following commands:

UPDATE `setting` SET `value`="/var/www/cms/library/", userSee=0, userChange=0 WHERE `setting`="LIBRARY_LOCATION"; UPDATE `setting` SET `value`="tcp://cms-xmr:50001", userSee=0, userChange=0 WHERE `setting`="XMR_ADDRESS"; UPDATE `setting` SET `value`="Apache" WHERE `setting`="SENDFILE_MODE";

I get this:

Query OK, 0 rows affected (0.01 sec) Rows matched: 1 Changed: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Rows matched: 0 Changed: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0
So I suppose there is something wrong with my sql file. What can i do?

During these tests, I didn’t delete the folder in /opt when changing my import file, but just

docker-compose down rm -rf shared/backup/* cp import.sql docker-compose up -d

Any idea?

Thanks

You need to start with a good backup, otherwise nothing is going to work out well.

I’d suggest using phpmyadmin to clear the log table, and if you don’t use proof of play stats, then also the stats table. That will resolve the majority of export issues.

To do so, run the following SQL via phpmyadmin:

TRUNCATE `log`;

and optionally

TRUNCATE `stat`;

Then export, and use that as your import.sql file.

You’ll need to also delete the imported database between tests - ie

docker-compose down
rm -rf shared/db
cp mybackup.sql shared/backup/import.sql
docker-compose up -d

Thanks, I got a reliable backup with

TRUNCATE `stat`;
I got the same size after multiple backups. (64mb). I can now connect with my old login, but I still get an error. The URL goes to www.URL.com/update and I get this

and when I run the update commands on the database, I still get 0 changed.

(I tried changing my password with

UPDATE user set UserPassword = MD5(‘password’), CSPRNG = 0 WHERE UserID = 1 LIMIT 1;
and it worked.)

Try deleting the CMS side cache.

So in the shared/cms/library/cache directory, delete everything, but not the cache directory itself.

I just did, but nothing changed.
The same folder reappeared in /cache after I connected. ( 0fea6a13c52b4d47)

That’s fine (it re-appearing). That’s what I would expect.

If you can PM me credentials I’m happy to have a look for you. I will need access to the server as well as the CMS interface.

I don’t seem to be able to message you, maybe my account isn’t old enough?