Backups can´t be restored

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.12
How are you able to access your server: The webadmin
SSH

Describe your issue

After disc errors and a not working mysql installation i finally tried to set up a fresh new YNH Installation and restoring a large Hubziulla hub from a backup.

I have two backups but both do not work

Here is the log of one of them:

https://paste.yunohost.org/raw/ajahujoyem

this is the error i get on both backups

ERROR 1045 (28000): Access denied for user ‘hubzilla’@‘localhost’ (using password: YES)

what does this mean?

Some time ago i was able to fix a similar problem by editing the settings.yml file

What has to be fixed this time? I’m lost.

Thanks for any help.

Thanks a lot

Share relevant logs or error messages

https://paste.yunohost.org/raw/ajahujoyem

Hi rockylll,

Can you find out whether psql is already installed on your server?

I notice

2025-03-29 22:01:28,639: DEBUG - ++ echo yes
2025-03-29 22:01:28,639: DEBUG - + local psql_installed2=yes
...
2025-03-29 22:01:29,126: DEBUG - + ynh_psql_create_user hubzilla **********
2025-03-29 22:01:29,127: DEBUG - + local user=hubzilla
2025-03-29 22:01:29,127: DEBUG - + local pwd=**********
2025-03-29 22:01:29,127: DEBUG - + ynh_psql_execute_as_root '--sql=CREATE USER hubzilla WITH ENCRYPTED PASSWORD '\''**********'\'''
2025-03-29 22:01:29,143: DEBUG - + database=
2025-03-29 22:01:29,143: DEBUG - + '[' -n '' ']'
2025-03-29 22:01:29,143: DEBUG - ++ cat /etc/yunohost/psql
2025-03-29 22:01:29,147: WARNING - cat: /etc/yunohost/psql: No such file or directory
2025-03-29 22:01:29,150: DEBUG - + ynh_psql_connect_as --user=postgres --password=

in your logs.

It seems to imply that the database program is installed, but the file at /etc/yunohost/psql is missing. The script needs the contents of that file to log in to the database.

The file may be contained in a Yunohost system backup; if you have such a backup from your Yunohst 11 installation, you could download and open it to see if it is there, and copy it back to your server.

1 Like

psql would stay for a postgresql db i guess

but my installation was running with a mysql db since years

The YNH devs decided some time ago that new installations will be just possible with a postgresql db - so that is why the scripted looks first for that db i guess
__

i looked at the settings.yml file inside of the backup

there i see

db_pwd:

and

mysqlpwd:

with two different values.

i wonder for what the entire for

db_pwd:

is good for

Yes, Postgres indeed. It seems indeed that there has been a switch from MySQL/MariaDB to Postgres, but actually it looks for MySQL first and only after that defaults to Postgres

The check is made on the install dir, it verifies that a file ./mydb.sql exists there. If you open the backup file, can you find such a file? It is, as you’ll have guessed, the backup of MySQL. If it has another name, or is saved in another location in the backup, you could make a copy a the right location and replace the backup file.

So:

  • Copy the hubzilla backup to a convenient place
  • Rename the actual backup to something else, eg. hubzilla-pre-upgrade.tar to hubzilla-pre-upgrade.tar.bak or if it is a timestamp backup, from 20250234-123233.tar to 20250234-123233.tar.bak , in order to keep it safe when you place your edited version back
  • Open the copy of your backup and search if you can find the database backup file
    • Recalling that you had trouble with your MySQL installation, could it be that the backup of hubzilla misses the database backup?
    • In that case, is there an older backup from which you could use the mydb.sql file?
  • Once you have mydb.sql , restore the file to you server at /home/yunohost.backup/*original name without .bak*
  • Retry restore

Good luck!

1 Like

@wbk with the old mydb.sql DB i could restore the installation. Thanks for your hint