Nextcloud restore fails because it tries to restore folders/links for already removed user

,

My YunoHost server

Hardware: Armbian on an oDroid XU4 with Yunohost installed
YunoHost version: 4.2.6
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Tried to update the Nextcloud instance to version 21, but it failed because I have to disable/remove all plugins beforehand and forgot to do this.
Fast forward, the upgrade failed and it removed Nextcloud completely while doing the upgrade but the restore is failing now as well, because it tries to restore folders associated with a user, which does not exist anymore and which was already removed months ago, so there seems to be a reference somewhere to this non-existing user and I want to know, how to remove all references to this old user in the backup.

Thanks in advance for any help!

EDIT: Here are the corresponding lines of the log from this issue:

2021-07-09 21:43:09,081: DEBUG - + ln -sfn /home/yunohost.multimedia/share /home/yunohost.multimedia/NONEXISTINGUSER/Share
2021-07-09 21:43:09,089: DEBUG - + ln -sfn /home/yunohost.multimedia/NONEXISTINGUSER /home/NONEXISTINGUSER/Multimedia
2021-07-09 21:43:09,097: WARNING - ln: failed to create symbolic link '/home/NONEXISTINGUSER/Multimedia': No such file or directory
2021-07-09 21:43:09,100: DEBUG - + ynh_exit_properly
2021-07-09 21:43:09,102: DEBUG - + local exit_code=1

Hi,

You can try to recreate the folder and see if the backup restore after that:

mkdir -p  /home/yunohost.multimedia/NONEXISTINGUSER
mkdir /home/NONEXISTINGUSER

If you can restore, then you can delete the previously created folders.
Next, create a new backup of Nextcloud.

I give it a try, but I thought this would not be sufficient because of permissions.
Will give feedback after that :slight_smile:

EDIT: It worked, thank you - that was an easy one ^^

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.