Upgrade 18.03 to 19.1x (pelican-stretch)

Good morning all,
I found myself in this same situation, and did my research with an installation under a “VM”.
And after several hours, I found the reason for the problem !
The problem deprives the data construction of the backup, which does not keep the .config/wazo-auth-cli/050-credentials.yml.
This means that if you do a new installation, and you restore a backup, you will have on the one hand, a password restores in the database, and another password which comes from a new installation. .
What I did, therefore, was to make a backup in “PLAIN” mode of the asterisk database, then prepare an update request, which I used after, having restored my backup for version 18.03:
sudo -u postgres psql -d asterisk -c "UPDATE public.auth_user SET password_hash = '********************************************************************************************************************************'::text, password_salt = '\x********************************************************************************************************************************'::bytea WHERE username = 'wazo-auth-cli';"

In conclusion, we can talk about a bug, but which is just linked to this command under version 18.03 :
xivo-backup data /var/tmp/data-manual

To automatically solve this problem, you should create a script, which can regenerate a new password for the auth_user table, and the user wazo-auth-cli, as well as write it in the .config/wazo-auth-cli/050-credentials.yml.

If you want to solve this problem right away, while keeping in mind that I am sharing a password which should be private, here is the solution :
sudo -u postgres psql -d asterisk -c "UPDATE public.auth_user SET password_hash = ‘dad8bc990f0bd6d91d66d0c5b9e6de7b82d270cde9f0c7bb346d099d9c54292220c41b01c2fd1a9a09e1e17401039811e6862cb934d79b1bb4129494b56c0d75’::text, password_salt = ‘\x8b5b24fa13f1babb551bae1de65698e4021e5bb69d3537bdd1babfebbadf769c251685fb49eeb2a4a628bb8b4ffabb4162b7ec5b01a466ceeb6df7a280ac7aea’::bytea WHERE username = ‘wazo-auth-cli’;"

New password in .config/wazo-auth-cli/050-credentials.yml file
password: ADOPUPhZq9jAw4d9MsCQ

Modification test:
curl -kX POST -u wazo-auth-cli:ADOPUPhZq9jAw4d9MsCQ --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"backend": "wazo_user", "expiration":10}' 'https://localhost:9497/0.1/token'

I advise you to follow my first tips, which will allow you to have your own password.

Hope this will help many people !