Reinstaller App nextcloud à partir de sa sauvegarde

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.9
What app is this about: Nextcloud

Describe your issue

Suite à des déboires de mise à jour mal passée,
Qui se finalise par nextcloud totalement supprimée.

Je souhaiterais réinstaller nextcloud.

Je tente donc via une récupération via la GUI :

Mais cela fini en rouge par

Nous n’avons pas trouvé nextcloud dans la liste des applications installées :
*

et en CLI

root@maison:~# yunohost backup restore nextcloud-pre-upgrade2
Info: Preparing archive for restoration…
Info: Restoring nextcloud…
Error: Could not restore nextcloud: Something unexpected went wrong: 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/yunohost/backup.py", line 1433, in _restore_app
    permission_create(
  File "/usr/lib/python3/dist-packages/yunohost/log.py", line 486, in func_wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/yunohost/permission.py", line 404, in permission_create
    raise YunohostValidationError("permission_already_exist", permission=permission)
yunohost.utils.error.YunohostValidationError: Permission 'nextcloud.api' already exists

Info: The operation 'Restore 'nextcloud' from a backup archive' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241221-161921-backup_restore_app-nextcloud' to get help
Error: Could not find nextcloud in the list of installed apps: 
 * 

Share relevant logs or error messages

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

root@maison:~#  yunohost user permission list
permissions: 
  mail.main: 
    allowed: all_users
  nextcloud.api: 
    allowed: 
      - visitors
      - all_users
  nextcloud.main: 
    allowed: 
      - lolotte
      - visitors
      - all_users
  sftp.main: 
    allowed: 
  ssh.main: 
    allowed: 
      - denis
      - backupbelar
root@maison:~#  yunohost user permission remove nextcloud.api
Info: The operation 'Update accesses for permission 'nextcloud'' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241221-175659-user_permission_update-nextcloud' to get help
Error: Could not find nextcloud in the list of installed apps: 
 * 
root@maison:~#  yunohost user permission remove nextcloud.api

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

Essai un truc de ce genre How to manually remove permission from system - #2 by tituspijean
En adaptant à ta situation

Merci !!!

root@maison:~# yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('nextcloud.api', force=True)"
root@maison:~# yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('nextcloud.main', force=True)"
root@maison:~# yunohost backup restore nextcloud-pre-upgrade2
Info: Preparing archive for restoration…
Info: Restoring nextcloud…
Info: Provisioning sources...
Info: Provisioning system_user...
Info: Provisioning install_dir...
Info: Provisioning data_dir...
Info: Provisioning permissions...
Warning: This permission is currently granted to all users in addition to other groups. You probably want to either remove the 'all_users' permission or remove the other groups it is currently granted to.
Info: Provisioning apt...
Info: Provisioning database...
Info: [....................] > Restoring the app main directory...
Info: [++..................] > Restoring the MySQL database...
Info: [##+++++++++++++.....] > Reconfiguring PHP-FPM...
Warning: grep: /etc/nginx/conf.d/maison.shnoulle.net.d/nextcloud.d: Is a directory
Info: [###############.....] > Restoring cron job...
Info: [###############.....] > Restoring the logrotate configuration...
Info: [###############+....] > Restoring data directory...
Info: [################+...] > Adding multimedia directories...
Info: [#################+..] > Restoring the Fail2Ban configuration...
Info: [##################+.] > Reloading NGINX web server...
Info: [####################] > Restoration completed for nextcloud
Success! Restoration completed
apps: 
  nextcloud: Success
system: 

Donc on revient sur [Broke] Nextcloud Update to 30.0.4 : broken, backup broken too (".ocdata" file) - #4 by Shnoulle

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