Can't restore Cryptpad after upgrade to yunohost 12

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.11
What app is this about: Cryptpad

Describe your issue

After updating to Yunohost 12, the CryptPad update failed. I can no longer restore it.

Exception: Original path for “/var/www/cryptpad” not found

Has anyone encountered this error?

thanks for your help

Share relevant logs or error messages

ended_at: 2025-03-15 16:15:40.719488
env:
BASH_XTRACEFD: ‘7’
YNH_APP_ACTION: restore
YNH_APP_BACKUP_DIR: /home/yunohost.backup/tmp/cryptpad-pre-upgrade2/apps/cryptpad/backup
YNH_APP_BASEDIR: /home/yunohost.backup/tmp/cryptpad-pre-upgrade2/apps/cryptpad/settings
YNH_APP_ID: cryptpad
YNH_APP_INSTANCE_NAME: cryptpad
YNH_APP_INSTANCE_NUMBER: ‘1’
YNH_APP_MANIFEST_VERSION: 5.3.0~ynh2
YNH_APP_PACKAGING_FORMAT: ‘2.0’
YNH_ARCH: amd64
YNH_BACKUP_CSV: /home/yunohost.backup/tmp/cryptpad-pre-upgrade2/backup.csv
YNH_BACKUP_DIR: /home/yunohost.backup/tmp/cryptpad-pre-upgrade2
YNH_CWD: /home/yunohost.backup/tmp/cryptpad-pre-upgrade2/apps/cryptpad/backup
YNH_DEBIAN_VERSION: bookworm
YNH_DEFAULT_PHP_VERSION: ‘8.2’
YNH_HELPERS_VERSION: ‘2’
YNH_INTERFACE: cli
YNH_STDRETURN: /tmp/tmpwpe8vpzd/stdreturn
error: An error occured inside the app restore script
interface: cli
operation: backup_restore_app
parent: null
related_to:

    • app
    • cryptpad
      started_at: 2025-03-15 16:15:39.322091
      success: false
      yunohost_version: 12.0.11

============

2025-03-15 17:15:39,326: INFO - Restoring cryptpad…
2025-03-15 17:15:39,362: DEBUG - initializing root ldap interface
2025-03-15 17:15:39,419: DEBUG - Permission ‘cryptpad.main’ updated
2025-03-15 17:15:39,422: DEBUG - To view the log of the operation ‘Update URL related to permission ‘cryptpad’’, use the command ‘yunohost log show 20250315-161539-permission_url-cryptpad’
2025-03-15 17:15:39,441: DEBUG - Permission ‘cryptpad.main’ created
2025-03-15 17:15:39,441: DEBUG - To view the log of the operation ‘Create permission ‘cryptpad’’, use the command ‘yunohost log show 20250315-161539-permission_create-cryptpad’
2025-03-15 17:15:39,460: DEBUG - The permission database has been resynchronized
2025-03-15 17:15:39,489: DEBUG - SSO and portal configurations regenerated
2025-03-15 17:15:39,498: DEBUG - Loading migration 0027_migrate_to_bookworm…
2025-03-15 17:15:39,499: DEBUG - Loading migration 0029_postgresql_13_to_15…
2025-03-15 17:15:39,499: DEBUG - Loading migration 0030_rebuild_python_venv_in_bookworm…
2025-03-15 17:15:39,499: DEBUG - Loading migration 0031_terms_of_services…
2025-03-15 17:15:39,500: DEBUG - Loading migration 0028_delete_legacy_xmpp_permission…
2025-03-15 17:15:39,513: DEBUG - Restoring the app ‘cryptpad’…
2025-03-15 17:15:39,530: INFO - Provisioning sources…
2025-03-15 17:15:39,530: INFO - Provisioning ports…
2025-03-15 17:15:39,548: INFO - Provisioning system_user…
2025-03-15 17:15:39,864: INFO - Provisioning install_dir…
2025-03-15 17:15:39,880: INFO - Provisioning permissions…
2025-03-15 17:15:39,892: DEBUG - Nothing to update in LDAP
2025-03-15 17:15:39,894: DEBUG - Permission ‘cryptpad.main’ updated
2025-03-15 17:15:39,894: DEBUG - To view the log of the operation ‘Update accesses for permission ‘cryptpad’’, use the command ‘yunohost log show 20250315-161539-user_permission_update-cryptpad’
2025-03-15 17:15:39,906: DEBUG - Nothing to update in LDAP
2025-03-15 17:15:39,906: DEBUG - Permission ‘cryptpad.main’ updated
2025-03-15 17:15:39,908: DEBUG - To view the log of the operation ‘Update URL related to permission ‘cryptpad’’, use the command ‘yunohost log show 20250315-161539-permission_url-cryptpad’
2025-03-15 17:15:39,914: DEBUG - The permission database has been resynchronized
2025-03-15 17:15:39,941: DEBUG - SSO and portal configurations regenerated
2025-03-15 17:15:39,951: DEBUG - Executing command ‘[‘sh’, ‘-c’, ‘/bin/bash -x “/var/cache/yunohost/app_tmp_work_dirs/app_m3eieqkr/restore” 7>&1’]’
2025-03-15 17:15:39,955: DEBUG - + source …/settings/scripts/_common.sh
2025-03-15 17:15:39,955: DEBUG - ++ nodejs_version=16.14.2
2025-03-15 17:15:39,955: DEBUG - + source /usr/share/yunohost/helpers
2025-03-15 17:15:39,956: DEBUG - ++++ dirname – /usr/share/yunohost/helpers
2025-03-15 17:15:39,957: DEBUG - +++ cd – /usr/share/yunohost
2025-03-15 17:15:39,957: DEBUG - +++ pwd
2025-03-15 17:15:39,957: DEBUG - ++ SCRIPT_DIR=/usr/share/yunohost
2025-03-15 17:15:39,957: DEBUG - ++ YNH_HELPERS_VERSION=2
2025-03-15 17:15:39,960: DEBUG - ++ readonly ‘XTRACE_ENABLE=set -o xtrace’
2025-03-15 17:15:39,960: DEBUG - ++ XTRACE_ENABLE=‘set -o xtrace’
2025-03-15 17:15:40,057: INFO - [+++++++…] > Restoring the app main directory…
2025-03-15 17:15:40,058: DEBUG - + ynh_restore_file --origin_path=/var/www/cryptpad
2025-03-15 17:15:40,083: DEBUG - + origin_path=/var/www/cryptpad
2025-03-15 17:15:40,083: DEBUG - + dest_path=/var/www/cryptpad
2025-03-15 17:15:40,083: DEBUG - + not_mandatory=0
2025-03-15 17:15:40,083: DEBUG - + local archive_path=/home/yunohost.backup/tmp/cryptpad-pre-upgrade2/apps/cryptpad/backup/var/www/cryptpad
2025-03-15 17:15:40,083: DEBUG - + ‘[’ ‘!’ -d /home/yunohost.backup/tmp/cryptpad-pre-upgrade2/apps/cryptpad/backup/var/www/cryptpad ‘]’
2025-03-15 17:15:40,083: DEBUG - + ‘[’ ‘!’ -f /home/yunohost.backup/tmp/cryptpad-pre-upgrade2/apps/cryptpad/backup/var/www/cryptpad ‘]’
2025-03-15 17:15:40,083: DEBUG - + ‘[’ ‘!’ -L /home/yunohost.backup/tmp/cryptpad-pre-upgrade2/apps/cryptpad/backup/var/www/cryptpad ‘]’
2025-03-15 17:15:40,083: DEBUG - + ‘[’ 0 == 0 ‘]’
2025-03-15 17:15:40,083: DEBUG - ++ _get_archive_path ‘“/var/www/cryptpad”’
2025-03-15 17:15:40,084: DEBUG - ++ python3 -c ’
2025-03-15 17:15:40,084: DEBUG - import sys
2025-03-15 17:15:40,084: DEBUG - import csv
2025-03-15 17:15:40,084: DEBUG - with open(sys.argv[1], ‘'‘r’'’) as backup_file:
2025-03-15 17:15:40,084: DEBUG - backup_csv = csv.DictReader(backup_file, fieldnames=[‘'‘source’'’, ‘'‘dest’'’])
2025-03-15 17:15:40,084: DEBUG - for row in backup_csv:
2025-03-15 17:15:40,084: DEBUG - if row[‘'‘source’'’]==sys.argv[2].strip(‘'’“‘'’):
2025-03-15 17:15:40,084: DEBUG - print(row[‘'‘dest’'’])
2025-03-15 17:15:40,084: DEBUG - sys.exit(0)
2025-03-15 17:15:40,084: DEBUG - raise Exception(‘'‘Original path for %s not found’'’ % sys.argv[2])
2025-03-15 17:15:40,084: DEBUG - ’ /home/yunohost.backup/tmp/cryptpad-pre-upgrade2/backup.csv '”/var/www/cryptpad"’
2025-03-15 17:15:40,109: WARNING - Traceback (most recent call last):
2025-03-15 17:15:40,110: WARNING - File “”, line 10, in
2025-03-15 17:15:40,110: WARNING - Exception: Original path for “/var/www/cryptpad” not found
2025-03-15 17:15:40,111: DEBUG - ++ return 1
2025-03-15 17:15:40,112: DEBUG - + archive_path=/home/yunohost.backup/tmp/cryptpad-pre-upgrade2/
2025-03-15 17:15:40,112: DEBUG - + ynh_exit_properly
2025-03-15 17:15:40,113: DEBUG - + [[ restore =~ ^install$|^upgrade$|^restore$ ]]
2025-03-15 17:15:40,719: ERROR - Could not restore cryptpad: An error occured inside the app restore script

I couldn’t update the application, so I uninstalled CryptPad and did a fresh install.

Then i extracted data from backup file and I followed the CryptPad documentation on how to restore data: Backup and Migration.