Baikal failed backup when upgrading

What app is this about, and its version: Baikal 0.9.4~ynh3
What YunoHost version are you running: 12.1.39 stable
What type of hardware are you using: Old laptop or computer

Describe your issue

When attempting to upgrade from 0.9.4~ynh3 to 0.11.1~ynh1 (WebAdmin), fails due to backup error.

Share relevant logs or error messages

Error: “500”
Action: “PUT” /yunohost/api/apps/baikal/upgrade

Error message:
Aborting the upgrade, because a safety backup could not be created (Failed to collect files to be backed up)

While processing the action the server said:
Collecting files to be backed up for baikal…
Declaring files to be backed up…
/var/cache/yunohost/app_tmp_work_dirs/app_2x696kvg/scripts/backup: line 28: phpversion: unbound variable
Failed to collect files to backed up for baikal.

Logs here: https://paste.yunohost.org/raw/lupeyojaco

Thank you

Hi,

Exactly same problem for me on an ARM board.

In my case it even broke the already installed Baikal version.

I am wondering if it might be related to one of the PHP modules version.

Here are my logs: https://paste.yunohost.org/raw/dumadomame

1 Like

i’m on a VPS and same problem AND broke the previous version

(i restore from backup)

I have same issue with VPS, and same message as the issue mentioned here
Echec de mise à jour de RoundCube - #11 by Jean31
I tried to resolve the same way, but upgrading did not restore my calendars and contacts (empty contacts/calendars in baikal admin console)
I restore to 0.9.4 , upgrade all system and package and upgrade applied 0.11.1 but impossible to load contacts and calendars with my client

I restore to 0.9.4
don’t known what to do …

Could you share the output of cat /etc/yunohost/apps/baikal/settings.yml (only the final section with php_version or phpversion) ?

Probably it’s an error related to php version, which had an issue recently due to expirated keys, you should be able to restore the previous backup, fix the issue and then update, check this:

exactly what i have done but after that new baikal version did not show me my calendars/contacts … so rollback

I had the same trouble when upgrading baikal.

After manually removing GPG key and update package list following Yarn and Sury APT keys issues , baikal now work again. But I can’t access my calendar :roll_eyes: .

In order to access baikal admin page (baikal.domain.tld/admin) I need to add admins to yunohost app config → baikal → ‘admin’ authorization, like below:

Now, in baikal admin panel I can see there is users, calendars and address books.

But i can’t access them, like if there is a password error.

In www/baikal/config/baikal.yamlI can see auth use LDAP, that look fine for me.

# Auth Backend LDAP-UserBind; LDAP URI
dav_ldap_uri: 'ldap://127.0.0.1/'
# Auth Backend LDAP-UserBind; Template for userbind
# %n => username
# %u => user part of username when it is an email
# %u => domain part of username when it is an email
dav_ldap_dn_template: 'uid=%n,ou=users,dc=yunohost,dc=org'
# Auth Backend LDAP-UserBind; attribute for displayname
dav_ldap_displayname_attr: 'cn'
# Auth Backend LDAP-UserBind; attribute for email
dav_ldap_email_attr: 'mail'

Do you have advice ?

PHP version is 8.0

Yes same behavior here, failed to backup (although pre-upgrade backup archive was created), and broke installation.

Had to restore from previous backup.

I’m asking about the key name (phpversion or php_version ?) since the backup script complains about an unbound variable.

Oh that

php_version: ‘8.0’

In any case, the yunohost package was downgraded to 0.9.4 yesterday…

[In your case, the backup script is referencing the phpversion variable while the configuration settings use the php_version variable.
If this error happens again and if you’ve got a valid backup, maybe try the upgrade without creating backup (upgrade with option -b). Other solution would be to a) download/save your valid backup b) set the new value in the settings (yunohost app setting baikal phpversion -v ‘8.0’)] and then c) try to upgrade.

Hello,

for my user auth problem, I find that last update brake LDAP user auth, see commit on github

Upgrade done and successfull !
THX all and contributors :slight_smile:

Sorry, I forgot to mention that the ldap issue has been fixed and upgrade was available.

1 Like

No problem I was on holiday :slight_smile:

EDIT: I fixed the issue. I am however leaving this post here, in case it could be useful to anyone in the future. The fix eventually was following @otm33 post and then just “taking a leap of faith” :stuck_out_tongue: I uninstalled the app and used the backup that was created somehow before/on the failed upgrade tentative. That worked and I was back on 0.9.4~ynh3. From there I proceeded to update to latest version and this time it worked.

Thanks @otm33 for everything :folded_hands:

Hello,

Sorry about reviving this thread, but I was just attempting to upgrade 0.9.4~ynh3 to 0.11.1~ynh1, and I got the following error (which have been mentioned here I believe):

/var/cache/yunohost/app_tmp_work_dirs/app_78fjc7s3/scripts/backup: line 28: phpversion: unbound variable

Many of the issues that have been raised here are also present: 500 on PUT (/upgrade), failed while creating safety backup, I’m facing some auth issues (getting 403 when trying to access the admin baikal admin portal). On top of that, trying to synchronise my calendars gives me a 502.

Am I missing something? Is there anything I can do? Any help would be highly appreciated :folded_hands:

Edit: another thing, the first time I tried to upgrade, apparently it created a backup, but I don’t know how reliable it is, so I’m afraid to restore it and get stuck with a dysfunctional app. Also, the preceding backup is rather old (I know, shame on me :frowning: ). I can use it and re-synchronise using an ics file, but I want to be on the new version anyway.

2 Likes

Thank you…

Unfortunately issues persists…

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

Did you update the sury repo key ?

1 Like