No access to my resources after import database

Hello,

I have a problem in my new server Passbolt.
My old server version : 2.13.0
My new server version : 3.5.0

I have create my new server with the same parameters to old server and i have import the serverkey.
After that, i have import mysql database on my new server. And I have no problem.
I look in database and I have correctly all my resources.

But in browser I’m not access in my resources, I have just access in users and groups.

Like this :

Loading gets stuck in this state

For users and groups i have no problem

Someone have a idea ?
Thanks

Hi @azrod,

Can you try to run a cleanup and datacheck see if there are any broken records?

sudo su -s /bin/bash -c "/var/www/passbolt/bin/cake passbolt cleanup" www-data
sudo su -s /bin/bash -c "/var/www/passbolt/bin/cake passbolt datacheck --hide-success-details" www-data

I have not /bin folder in /var/www , so I can’t try this commands.

I see that, I can’t create resource :
image

I thinks the problem is in resources table I have not the columm “resource_type_id”.

In new server version this columm is present. I try add this columm in my database and and I’ll come back to you to tell you if it solved my problem.

Hi,

The correct path if you installed passbolt from our Ubuntu package is /usr/share/php/passbolt/bin/cake:

sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt cleanup" www-data
sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt datacheck --hide-success-details" www-data

Can you provide a healthcheck and migrations status ?

sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt healthcheck" www-data
sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake migrations status" www-data

Maybe did you forgot the step 5 of this documentation: Passbolt Help | Migrate an existing Passbolt CE to a new Ubuntu server ?

Best,

Hello,

I ran these commands and it gave me the following error:

This confirms my hypothesis of the missing “resource_type_id” column in the “resources” table.

I’m trying to add this column in the database and I’m getting back to you to say if it works or not.

Thanks

Hi,

Please don’t do that, there is chance you will break future migrations.

Can you give us the output of these commands:

sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt healthcheck" www-data
sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake migrations status" www-data

Best regards,

The first commands retunrn this :

[FAIL] SSL certificate it’s normal
[FAIL] The database schema is not up to date it’s no normal

The second command :

Again the second command :

Thanks for the output.

You have an error with the missing resource_type_id because database migrations have not been done.

You can perform them with this command:

sudo -H -u www-data bash -c "/usr/share/php/passbolt/bin/cake migrations migrate --no-lock"

Or the command written in the help:

This missing column is added in 20200806110201 V300AddResourceTypeIdField migration.

Best,

Ok thanks,

I have many error if I try this command :

PS : I try migrate Passbolt to new server on Debian 11 is not just an update

Did you created this table manually ? This table is created by the migrations who have not passed.

Do you have some entries in this table ?

SELECT * FROM account_settings;

If you got an empty result, you can drop this table:

DROP TABLE account_settings;

Then re-run the migration command.

Of course, ensure you have backups: Passbolt Help | Backing up a Passbolt package installation

Best,

Ok, I have delete table ‘account_setting’ ‘avatars’ ‘resource_types’ and ‘transferts’ after delete this I launch this command :

data bash -c "/usr/share/php/passbolt/bin/cake migrations migrate --no-lock"

After that, my migration worked

Thanks very much @AnatomicJC for helping me

Great ! :partying_face:

Thank you for the feedback. :+1: