YunoHost-Apps / calckey_ynh

Calcket package for YunoHost
https://i.calckey.cloud/
GNU Affero General Public License v3.0
9 stars 7 forks source link

Unable to restore from backup or get admin for a fresh install. #46

Closed Zeitverschreib closed 1 year ago

Zeitverschreib commented 1 year ago

I just moved my Yunohost setup to a new machine. Everything worked quite nicely, except the restore of the Calckey backup.

There's been a similar report a few weeks ago:

https://github.com/YunoHost-Apps/calckey_ynh/issues/40#issue-1760538141

I get the very same error message when trying to restore the backup and I also cannot make the first user on a fresh install admin.

oufmilo commented 1 year ago

Which version of calckey do you try to restore ? Can you give me the log ?

Zeitverschreib commented 1 year ago

It's the latest, should be 14.0.0 RC3. 

I'll share the logs when I get home from work, but the restore fails when trying to create a .cargo/bin directory. I think that's related to Rust, right?

Zeitverschreib commented 1 year ago

Yunohost 11.1.22 (stable) Calckey 14.0.0rc3-ynh1

So far I see only one error:

2023-07-14 18:02:26,564: DEBUG - error: could not create bin directory: '/var/www/calckey/.cargo/bin': Permission denied (os error 13)

Complete log:

ended_at: 2023-07-14 16:02:28.078955 env: BASH_XTRACEFD: '7' YNH_APP_ACTION: restore YNH_APP_BACKUP_DIR: /home/yunohost.backup/tmp/20230712-194147/apps/calckey/backup YNH_APP_BASEDIR: /home/yunohost.backup/tmp/20230712-194147/apps/calckey/settings YNH_APP_ID: calckey YNH_APP_INSTANCE_NAME: calckey YNH_APP_INSTANCE_NUMBER: '1' YNH_APP_MANIFEST_VERSION: 14.0.0rc3~ynh1 YNH_APP_PACKAGING_FORMAT: '2.0' YNH_ARCH: amd64 YNH_BACKUP_CSV: /home/yunohost.backup/tmp/20230712-194147/backup.csv YNH_BACKUP_DIR: /home/yunohost.backup/tmp/20230712-194147 YNH_CWD: /home/yunohost.backup/tmp/20230712-194147/apps/calckey/backup YNH_DEBIAN_VERSION: bullseye YNH_INTERFACE: api YNH_STDRETURN: /tmp/tmp_sklfmhx/stdreturn error: Im Wiederherstellungsskript der Applikation ist ein Fehler aufgetreten interface: api operation: backup_restore_app parent: null related_to:

    • app
    • calckey started_at: 2023-07-14 16:02:08.643962 success: false yunohost_version: 11.1.22

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

2023-07-14 18:02:08,652: INFO - calckey wird wiederhergestellt... 2023-07-14 18:02:09,046: DEBUG - Berechtigung 'calckey.main' aktualisiert 2023-07-14 18:02:09,174: DEBUG - Vollständiges Log dieser Operation: 'Aktualisiere URL, die mit der Berechtigung 'calckey' verknüpft ist' 2023-07-14 18:02:09,459: DEBUG - Berechtigung 'calckey.main' erstellt 2023-07-14 18:02:09,459: DEBUG - Vollständiges Log dieser Operation: 'Erstelle Berechtigung 'calckey'' 2023-07-14 18:02:09,616: DEBUG - The permission database has been resynchronized 2023-07-14 18:02:09,853: DEBUG - SSOwat-Konfiguration neu generiert 2023-07-14 18:02:09,861: DEBUG - Lade Migrationen 0025_global_settings_to_configpanel... 2023-07-14 18:02:09,862: DEBUG - Lade Migrationen 0022_php73_to_php74_pools... 2023-07-14 18:02:09,863: DEBUG - Lade Migrationen 0026_new_admins_group... 2023-07-14 18:02:09,863: DEBUG - Lade Migrationen 0024_rebuild_python_venv... 2023-07-14 18:02:09,864: DEBUG - Lade Migrationen 0023_postgresql_11_to_13... 2023-07-14 18:02:09,864: DEBUG - Lade Migrationen 0021_migrate_to_bullseye... 2023-07-14 18:02:09,885: DEBUG - App 'calckey' wird wiederhergestellt... 2023-07-14 18:02:09,913: INFO - Provisionning sources... 2023-07-14 18:02:09,913: INFO - Provisionning system_user... 2023-07-14 18:02:10,193: INFO - Provisionning install_dir... 2023-07-14 18:02:10,228: INFO - Provisionning permissions... 2023-07-14 18:02:10,513: DEBUG - Nothing to update in LDAP 2023-07-14 18:02:10,639: DEBUG - Berechtigung 'calckey.main' aktualisiert 2023-07-14 18:02:10,640: DEBUG - Vollständiges Log dieser Operation: 'Aktualisiere Zugriffe für Berechtigung 'calckey'' 2023-07-14 18:02:10,940: DEBUG - Nothing to update in LDAP 2023-07-14 18:02:10,941: DEBUG - Berechtigung 'calckey.main' aktualisiert 2023-07-14 18:02:11,069: DEBUG - Vollständiges Log dieser Operation: 'Aktualisiere URL, die mit der Berechtigung 'calckey' verknüpft ist' 2023-07-14 18:02:11,207: DEBUG - The permission database has been resynchronized 2023-07-14 18:02:11,416: DEBUG - SSOwat-Konfiguration neu generiert 2023-07-14 18:02:11,422: INFO - Provisionning ports... 2023-07-14 18:02:11,434: INFO - Provisionning apt... 2023-07-14 18:02:11,455: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./provision_or_update_apt" 7>&1']' 2023-07-14 18:02:11,468: DEBUG - + source /usr/share/yunohost/helpers 2023-07-14 18:02:11,468: DEBUG - +++ set +o 2023-07-14 18:02:11,468: DEBUG - +++ grep xtrace 2023-07-14 18:02:11,470: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace' 2023-07-14 18:02:11,470: DEBUG - ++ XTRACE_ENABLE='set -o xtrace' 2023-07-14 18:02:11,491: DEBUG - + ynh_abort_if_errors 2023-07-14 18:02:11,491: DEBUG - + trap ynh_exit_properly EXIT 2023-07-14 18:02:11,491: DEBUG - + ynh_install_app_dependencies ffmpeg postgresql build-essential curl 2023-07-14 18:02:11,491: DEBUG - + local 'dependencies=ffmpeg postgresql build-essential curl' 2023-07-14 18:02:11,491: DEBUG - ++ echo 'ffmpeg postgresql build-essential curl' 2023-07-14 18:02:11,491: DEBUG - ++ sed 's/([^\<=>])\ ([^(])/\1, \2/g' 2023-07-14 18:02:11,493: DEBUG - + dependencies='ffmpeg, postgresql, build-essential, curl' 2023-07-14 18:02:11,493: DEBUG - + local 'dependencies=ffmpeg, postgresql, build-essential, curl' 2023-07-14 18:02:11,493: DEBUG - ++ ynh_read_manifest --manifest_key=version 2023-07-14 18:02:11,508: DEBUG - ++ '[' '!' -e '' ']' 2023-07-14 18:02:11,508: DEBUG - ++ '[' -e /var/cache/yunohost/app_tmp_work_dirs/app_f_h0czi5/manifest.json ']' 2023-07-14 18:02:11,508: DEBUG - ++ '[' -e /var/cache/yunohost/app_tmp_work_dirs/app_f_h0czi5/manifest.toml ']' 2023-07-14 18:02:11,509: DEBUG - ++ manifest=/var/cache/yunohost/app_tmp_work_dirs/app_f_h0czi5/manifest.toml 2023-07-14 18:02:11,509: DEBUG - ++ echo /var/cache/yunohost/app_tmp_work_dirs/app_f_h0czi5/manifest.toml 2023-07-14 18:02:11,509: DEBUG - ++ grep -q '.json$' 2023-07-14 18:02:11,510: DEBUG - ++ cat /var/cache/yunohost/app_tmp_work_dirs/app_f_h0czi5/manifest.toml 2023-07-14 18:02:11,510: DEBUG - ++ jq .version --raw-output 2023-07-14 18:02:11,511: DEBUG - ++ python3 -c 'import json, toml, sys; print(json.dumps(toml.load(sys.stdin)))' 2023-07-14 18:02:11,583: DEBUG - + local version=14.0.0rc3~ynh1 2023-07-14 18:02:11,583: DEBUG - + '[' -z 14.0.0rc3~ynh1 ']' 2023-07-14 18:02:11,583: DEBUG - + '[' 14.0.0rc3~ynh1 == null ']' 2023-07-14 18:02:11,584: DEBUG - + local dep_app=calckey 2023-07-14 18:02:11,584: DEBUG - + [[ ffmpeg, postgresql, build-essential, curl =~ [<=>] ]] 2023-07-14 18:02:11,584: DEBUG - ++ echo ffmpeg, postgresql, build-essential, curl 2023-07-14 18:02:11,584: DEBUG - ++ grep -oP '(?<=php)[0-9.]+(?=-|>)' 2023-07-14 18:02:11,584: DEBUG - ++ sort -u 2023-07-14 18:02:11,586: DEBUG - + local specific_php_version= 2023-07-14 18:02:11,587: DEBUG - + grep --quiet php 2023-07-14 18:02:11,588: DEBUG - ++ ynh_package_is_installed postgresql-13 2023-07-14 18:02:11,595: DEBUG - ++ ynh_wait_dpkg_free 2023-07-14 18:02:11,885: DEBUG - ++ return 0 2023-07-14 18:02:11,885: DEBUG - ++ dpkg-query --show '--showformat=${Status}' postgresql-13 2023-07-14 18:02:11,885: DEBUG - ++ grep --count 'ok installed' 2023-07-14 18:02:11,901: DEBUG - ++ echo yes 2023-07-14 18:02:11,902: DEBUG - + local psql_installed=yes 2023-07-14 18:02:11,902: DEBUG - + [[ true == \t\r\u\e ]] 2023-07-14 18:02:11,902: DEBUG - + YNH_INSTALL_APP_DEPENDENCIES_REPLACE=false 2023-07-14 18:02:11,902: DEBUG - + cat 2023-07-14 18:02:11,903: DEBUG - + ynh_package_install_from_equivs /tmp/calckey-ynh-deps.control 2023-07-14 18:02:11,903: DEBUG - + local controlfile=/tmp/calckey-ynh-deps.control 2023-07-14 18:02:11,904: DEBUG - ++ grep '^Package: ' /tmp/calckey-ynh-deps.control 2023-07-14 18:02:11,904: DEBUG - ++ cut '--delimiter= ' --fields=2 2023-07-14 18:02:11,905: DEBUG - + local pkgname=calckey-ynh-deps 2023-07-14 18:02:11,906: DEBUG - ++ grep '^Version: ' /tmp/calckey-ynh-deps.control 2023-07-14 18:02:11,906: DEBUG - ++ cut '--delimiter= ' --fields=2 2023-07-14 18:02:11,907: DEBUG - + local pkgversion=14.0.0rc3~ynh1 2023-07-14 18:02:11,907: DEBUG - + [[ -z calckey-ynh-deps ]] 2023-07-14 18:02:11,907: DEBUG - + [[ -z 14.0.0rc3~ynh1 ]] 2023-07-14 18:02:11,907: DEBUG - + ynh_package_update 2023-07-14 18:02:11,908: DEBUG - + ynh_apt update 2023-07-14 18:02:11,908: DEBUG - + ynh_wait_dpkg_free 2023-07-14 18:02:12,175: DEBUG - + return 0 2023-07-14 18:02:12,175: DEBUG - + LC_ALL=C 2023-07-14 18:02:12,175: DEBUG - + DEBIAN_FRONTEND=noninteractive 2023-07-14 18:02:12,175: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update 2023-07-14 18:02:12,374: DEBUG - Hit:1 http://ftp.debian.org/debian bullseye InRelease 2023-07-14 18:02:12,374: DEBUG - Hit:2 http://security.debian.org/debian-security bullseye-security InRelease 2023-07-14 18:02:12,375: DEBUG - Hit:3 http://ftp.debian.org/debian bullseye-updates InRelease 2023-07-14 18:02:12,403: DEBUG - Hit:4 http://forge.yunohost.org/debian bullseye InRelease 2023-07-14 18:02:12,476: DEBUG - Hit:5 https://packages.sury.org/php bullseye InRelease 2023-07-14 18:02:13,586: DEBUG - Reading package lists... 2023-07-14 18:02:13,601: DEBUG - ++ mktemp --directory 2023-07-14 18:02:13,602: DEBUG - + local TMPDIR=/tmp/tmp.uQvHPXLZp3 2023-07-14 18:02:13,602: DEBUG - + rm -f /usr/share/equivs/template/debian/compat 2023-07-14 18:02:13,603: DEBUG - + ynh_wait_dpkg_free 2023-07-14 18:02:13,863: DEBUG - + return 0 2023-07-14 18:02:13,863: DEBUG - + cp /tmp/calckey-ynh-deps.control /tmp/tmp.uQvHPXLZp3/control 2023-07-14 18:02:13,865: DEBUG - + cd /tmp/tmp.uQvHPXLZp3 2023-07-14 18:02:13,865: DEBUG - + LC_ALL=C 2023-07-14 18:02:13,865: DEBUG - + equivs-build ./control 2023-07-14 18:02:14,050: DEBUG - dpkg-buildpackage: info: source package calckey-ynh-deps 2023-07-14 18:02:14,050: DEBUG - dpkg-buildpackage: info: source version 14.0.0rc3~ynh1 2023-07-14 18:02:14,050: DEBUG - dpkg-buildpackage: info: source distribution unstable 2023-07-14 18:02:14,050: DEBUG - dpkg-buildpackage: info: source changed by Equivs Dummy Package Generator root@maindomain.tld 2023-07-14 18:02:14,092: DEBUG - dpkg-source --before-build . 2023-07-14 18:02:14,093: DEBUG - dpkg-buildpackage: info: host architecture amd64 2023-07-14 18:02:14,196: DEBUG - debian/rules clean 2023-07-14 18:02:14,199: DEBUG - dh clean 2023-07-14 18:02:14,282: DEBUG - dh_clean 2023-07-14 18:02:14,317: DEBUG - debian/rules binary 2023-07-14 18:02:14,319: DEBUG - dh binary 2023-07-14 18:02:14,385: DEBUG - dh_update_autotools_config 2023-07-14 18:02:14,413: DEBUG - dh_autoreconf 2023-07-14 18:02:14,455: DEBUG - create-stamp debian/debhelper-build-stamp 2023-07-14 18:02:14,455: DEBUG - dh_prep 2023-07-14 18:02:14,485: DEBUG - dh_install 2023-07-14 18:02:14,518: DEBUG - dh_installdocs 2023-07-14 18:02:14,556: DEBUG - dh_installchangelogs 2023-07-14 18:02:14,643: DEBUG - dh_perl 2023-07-14 18:02:14,679: DEBUG - dh_link 2023-07-14 18:02:14,714: DEBUG - dh_strip_nondeterminism 2023-07-14 18:02:14,782: DEBUG - dh_compress 2023-07-14 18:02:14,823: DEBUG - dh_fixperms 2023-07-14 18:02:14,864: DEBUG - dh_missing 2023-07-14 18:02:14,890: DEBUG - dh_installdeb 2023-07-14 18:02:14,924: DEBUG - dh_gencontrol 2023-07-14 18:02:15,034: DEBUG - dh_md5sums 2023-07-14 18:02:15,070: DEBUG - dh_builddeb 2023-07-14 18:02:15,098: DEBUG - dpkg-deb: building package 'calckey-ynh-deps' in '../calckey-ynh-deps_14.0.0rc3~ynh1_all.deb'. 2023-07-14 18:02:15,123: DEBUG - dpkg-genbuildinfo --build=binary 2023-07-14 18:02:15,690: DEBUG - dpkg-genchanges --build=binary >../calckey-ynh-deps_14.0.0rc3~ynh1_amd64.changes 2023-07-14 18:02:15,771: DEBUG - dpkg-genchanges: info: binary-only upload (no source code included) 2023-07-14 18:02:15,774: DEBUG - dpkg-source --after-build . 2023-07-14 18:02:15,874: DEBUG - dpkg-buildpackage: info: binary-only upload (no source included) 2023-07-14 18:02:15,878: DEBUG - 2023-07-14 18:02:15,878: DEBUG - The package has been created. 2023-07-14 18:02:15,879: DEBUG - Attention, the package has been created in the current directory, 2023-07-14 18:02:15,879: DEBUG - not in ".." as indicated by the message above! 2023-07-14 18:02:15,880: DEBUG - + LC_ALL=C 2023-07-14 18:02:15,880: DEBUG - + dpkg --force-depends --install ./calckey-ynh-deps_14.0.0rc3~ynh1_all.deb 2023-07-14 18:02:15,880: DEBUG - + tee ./dpkg_log 2023-07-14 18:02:15,936: DEBUG - Selecting previously unselected package calckey-ynh-deps. 2023-07-14 18:02:16,193: DEBUG - (Reading database ... 63040 files and directories currently installed.) 2023-07-14 18:02:16,197: DEBUG - Preparing to unpack .../calckey-ynh-deps_14.0.0rc3~ynh1_all.deb ... 2023-07-14 18:02:16,208: DEBUG - Unpacking calckey-ynh-deps (14.0.0rc3~ynh1) ... 2023-07-14 18:02:16,271: DEBUG - Setting up calckey-ynh-deps (14.0.0rc3~ynh1) ... 2023-07-14 18:02:16,339: DEBUG - + ynh_package_install --fix-broken 2023-07-14 18:02:16,339: DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install --fix-broken 2023-07-14 18:02:16,340: DEBUG - + ynh_wait_dpkg_free 2023-07-14 18:02:16,630: DEBUG - + return 0 2023-07-14 18:02:16,631: DEBUG - + LC_ALL=C 2023-07-14 18:02:16,631: DEBUG - + DEBIAN_FRONTEND=noninteractive 2023-07-14 18:02:16,631: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install --fix-broken 2023-07-14 18:02:16,835: DEBUG - Reading package lists... 2023-07-14 18:02:16,992: DEBUG - Building dependency tree... 2023-07-14 18:02:16,994: DEBUG - Reading state information... 2023-07-14 18:02:17,186: DEBUG - 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2023-07-14 18:02:17,186: DEBUG - + [[ -n /tmp/tmp.uQvHPXLZp3 ]] 2023-07-14 18:02:17,186: DEBUG - + rm --recursive --force /tmp/tmp.uQvHPXLZp3 2023-07-14 18:02:17,187: DEBUG - + ynh_package_is_installed calckey-ynh-deps 2023-07-14 18:02:17,196: DEBUG - + ynh_wait_dpkg_free 2023-07-14 18:02:17,483: DEBUG - + return 0 2023-07-14 18:02:17,483: DEBUG - + dpkg-query --show '--showformat=${Status}' calckey-ynh-deps 2023-07-14 18:02:17,483: DEBUG - + grep --count 'ok installed' 2023-07-14 18:02:17,496: DEBUG - + rm /tmp/calckey-ynh-deps.control 2023-07-14 18:02:17,498: DEBUG - ++ ynh_package_is_installed postgresql-13 2023-07-14 18:02:17,506: DEBUG - ++ ynh_wait_dpkg_free 2023-07-14 18:02:17,771: DEBUG - ++ return 0 2023-07-14 18:02:17,772: DEBUG - ++ dpkg-query --show '--showformat=${Status}' postgresql-13 2023-07-14 18:02:17,772: DEBUG - ++ grep --count 'ok installed' 2023-07-14 18:02:17,785: DEBUG - ++ echo yes 2023-07-14 18:02:17,786: DEBUG - + local psql_installed2=yes 2023-07-14 18:02:17,786: DEBUG - + [[ yes != \y\e\s ]] 2023-07-14 18:02:17,786: DEBUG - + ynh_exit_properly 2023-07-14 18:02:17,786: DEBUG - + [[ provision_or_update_apt =~ ^install$|^upgrade$|^restore$ ]] 2023-07-14 18:02:18,789: INFO - Provisionning database... 2023-07-14 18:02:19,119: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./provision_database" 7>&1']' 2023-07-14 18:02:19,125: DEBUG - + source /usr/share/yunohost/helpers 2023-07-14 18:02:19,126: DEBUG - +++ set +o 2023-07-14 18:02:19,126: DEBUG - +++ grep xtrace 2023-07-14 18:02:19,127: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace' 2023-07-14 18:02:19,127: DEBUG - ++ XTRACE_ENABLE='set -o xtrace' 2023-07-14 18:02:19,144: DEBUG - + ynh_abort_if_errors 2023-07-14 18:02:19,144: DEBUG - + trap ynh_exit_properly EXIT 2023-07-14 18:02:19,144: DEBUG - + ynh_psql_create_user calckey d6e281fcae7ae98dfb539507 2023-07-14 18:02:19,144: DEBUG - + local user=calckey 2023-07-14 18:02:19,144: DEBUG - + local pwd=** 2023-07-14 18:02:19,144: DEBUG - + ynh_psql_execute_as_root '--sql=CREATE USER calckey WITH ENCRYPTED PASSWORD '\''**'\''' 2023-07-14 18:02:19,157: DEBUG - + database= 2023-07-14 18:02:19,158: DEBUG - + '[' -n '' ']' 2023-07-14 18:02:19,158: DEBUG - ++ cat /etc/yunohost/psql 2023-07-14 18:02:19,159: DEBUG - + ynh_psql_connect_as --user=postgres --password=** 2023-07-14 18:02:19,196: DEBUG - + database= 2023-07-14 18:02:19,196: DEBUG - + sudo --login --user=postgres PGUSER=postgres PGPASSWORD=** psql '' 2023-07-14 18:02:19,324: DEBUG - CREATE ROLE 2023-07-14 18:02:19,326: DEBUG - + ynh_psql_create_db calckey calckey 2023-07-14 18:02:19,326: DEBUG - + local db=calckey 2023-07-14 18:02:19,326: DEBUG - + local user=calckey 2023-07-14 18:02:19,327: DEBUG - + local 'sql=CREATE DATABASE calckey;' 2023-07-14 18:02:19,327: DEBUG - + '[' -n calckey ']' 2023-07-14 18:02:19,327: DEBUG - + sql+='ALTER DATABASE calckey OWNER TO calckey;' 2023-07-14 18:02:19,327: DEBUG - + sql+='GRANT ALL PRIVILEGES ON DATABASE calckey TO calckey WITH GRANT OPTION;' 2023-07-14 18:02:19,327: DEBUG - + ynh_psql_execute_as_root '--sql=CREATE DATABASE calckey;ALTER DATABASE calckey OWNER TO calckey;GRANT ALL PRIVILEGES ON DATABASE calckey TO calckey WITH GRANT OPTION;' 2023-07-14 18:02:19,347: DEBUG - + database= 2023-07-14 18:02:19,347: DEBUG - + '[' -n '' ']' 2023-07-14 18:02:19,347: DEBUG - ++ cat /etc/yunohost/psql 2023-07-14 18:02:19,349: DEBUG - + ynh_psql_connect_as --user=postgres --password=** 2023-07-14 18:02:19,389: DEBUG - + database= 2023-07-14 18:02:19,390: DEBUG - + sudo --login --user=postgres PGUSER=postgres PGPASSWORD=** psql '' 2023-07-14 18:02:19,760: DEBUG - CREATE DATABASE 2023-07-14 18:02:19,763: DEBUG - ALTER DATABASE 2023-07-14 18:02:19,766: DEBUG - GRANT 2023-07-14 18:02:19,772: DEBUG - + ynh_exit_properly 2023-07-14 18:02:19,773: DEBUG - + [[ provision_database =~ ^install$|^upgrade$|^restore$ ]] 2023-07-14 18:02:20,777: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "/var/cache/yunohost/app_tmp_work_dirs/app_3k23ctqe/restore" 7>&1']' 2023-07-14 18:02:20,792: DEBUG - + source ../settings/scripts/_common.sh 2023-07-14 18:02:20,794: DEBUG - ++ NODEJS_VERSION=19 2023-07-14 18:02:20,794: DEBUG - + source /usr/share/yunohost/helpers 2023-07-14 18:02:20,794: DEBUG - +++ set +o 2023-07-14 18:02:20,795: DEBUG - +++ grep xtrace 2023-07-14 18:02:20,799: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace' 2023-07-14 18:02:20,799: DEBUG - ++ XTRACE_ENABLE='set -o xtrace' 2023-07-14 18:02:20,908: INFO - [+...................] > Restoring the app main directory... 2023-07-14 18:02:20,909: DEBUG - + ynh_restore_file --origin_path=/var/www/calckey 2023-07-14 18:02:20,929: DEBUG - + origin_path=/var/www/calckey 2023-07-14 18:02:20,929: DEBUG - + dest_path=/var/www/calckey 2023-07-14 18:02:20,929: DEBUG - + not_mandatory=0 2023-07-14 18:02:20,930: DEBUG - + local archive_path=/home/yunohost.backup/tmp/20230712-194147/apps/calckey/backup/var/www/calckey 2023-07-14 18:02:20,930: DEBUG - + '[' '!' -d /home/yunohost.backup/tmp/20230712-194147/apps/calckey/backup/var/www/calckey ']' 2023-07-14 18:02:20,930: DEBUG - + [[ -e /var/www/calckey ]] 2023-07-14 18:02:20,930: DEBUG - ++ du --summarize --bytes /var/www/calckey 2023-07-14 18:02:20,930: DEBUG - ++ cut --delimiter=/ --fields=1 2023-07-14 18:02:20,936: DEBUG - + [[ 4096 -le 500000000 ]] 2023-07-14 18:02:20,937: DEBUG - ++ date +%Y%m%d.%H%M%S 2023-07-14 18:02:20,941: DEBUG - + local backup_file=/var/cache/yunohost/appconfbackup//var/www/calckey.backup.20230714.180220 2023-07-14 18:02:20,942: DEBUG - ++ dirname /var/cache/yunohost/appconfbackup//var/www/calckey.backup.20230714.180220 2023-07-14 18:02:20,945: DEBUG - + mkdir --parents /var/cache/yunohost/appconfbackup//var/www 2023-07-14 18:02:20,949: DEBUG - + mv /var/www/calckey /var/cache/yunohost/appconfbackup//var/www/calckey.backup.20230714.180220 2023-07-14 18:02:20,954: DEBUG - ++ dirname /var/www/calckey 2023-07-14 18:02:20,955: DEBUG - + mkdir --parents /var/www 2023-07-14 18:02:20,957: DEBUG - + mountpoint --quiet /home/yunohost.backup/tmp/20230712-194147 2023-07-14 18:02:20,960: DEBUG - + mv /home/yunohost.backup/tmp/20230712-194147/apps/calckey/backup/var/www/calckey /var/www/calckey 2023-07-14 18:02:20,962: DEBUG - + [[ /var/www/calckey == \/\e\t\c\/\n\g\i\n\x\/\c\o\n\f.\d\/ ]] 2023-07-14 18:02:21,023: INFO - [#+++++++............] > Reinstalling dependencies... 2023-07-14 18:02:21,023: DEBUG - + ynh_install_nodejs --nodejs_version=19 2023-07-14 18:02:21,031: DEBUG - + mkdir --parents /opt/node_n 2023-07-14 18:02:21,032: DEBUG - + CLEAR_PATH=/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 2023-07-14 18:02:21,033: DEBUG - ++ echo /opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 2023-07-14 18:02:21,033: DEBUG - ++ sed s@/usr/local/bin:@@ 2023-07-14 18:02:21,035: DEBUG - + PATH=/opt/node_n/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin 2023-07-14 18:02:21,035: DEBUG - + test -x /usr/bin/node 2023-07-14 18:02:21,035: DEBUG - + mv /usr/bin/node /usr/bin/node_n 2023-07-14 18:02:21,036: DEBUG - + test -x /usr/bin/npm 2023-07-14 18:02:21,037: DEBUG - + mkdir -p /opt/node_n/bin/ 2023-07-14 18:02:21,038: DEBUG - + cp /usr/share/yunohost/helpers.d/vendor/n/n /opt/node_n/bin/n 2023-07-14 18:02:21,040: DEBUG - + ynh_replace_string '--match_string=^N_PREFIX=${N_PREFIX-.}$' '--replace_string=N_PREFIX=${N_PREFIX-/opt/node_n}' --target_file=/opt/node_n/bin/n 2023-07-14 18:02:21,095: DEBUG - + sed --in-place 's^N_PREFIX=${N_PREFIX-.}$N_PREFIX=${N_PREFIX-/opt/node_n}g' /opt/node_n/bin/n 2023-07-14 18:02:21,097: DEBUG - + PATH=/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 2023-07-14 18:02:21,097: DEBUG - + test -x /usr/bin/node_n 2023-07-14 18:02:21,097: DEBUG - + mv /usr/bin/node_n /usr/bin/node 2023-07-14 18:02:21,099: DEBUG - + test -x /usr/bin/npm_n 2023-07-14 18:02:21,099: DEBUG - ++ uname --machine 2023-07-14 18:02:21,101: DEBUG - + uname=x86_64 2023-07-14 18:02:21,101: DEBUG - + [[ x86_64 =~ aarch64 ]] 2023-07-14 18:02:21,101: DEBUG - + [[ x86_64 =~ arm64 ]] 2023-07-14 18:02:21,101: DEBUG - + n 19 2023-07-14 18:02:21,333: DEBUG - installing : node-v19.9.0 2023-07-14 18:02:21,468: DEBUG - mkdir : /opt/node_n/n/versions/node/19.9.0 2023-07-14 18:02:21,475: DEBUG - fetch : https://nodejs.org/dist/v19.9.0/node-v19.9.0-linux-x64.tar.xz 2023-07-14 18:02:24,133: DEBUG - copying : node/19.9.0 2023-07-14 18:02:25,492: DEBUG - installed : v19.9.0 (with npm 9.6.3) 2023-07-14 18:02:25,493: DEBUG - ++ sort --version-sort 2023-07-14 18:02:25,493: DEBUG - ++ find /opt/node_n/n/versions/node/19 /opt/node_n/n/versions/node/19.9.0 -maxdepth 0 2023-07-14 18:02:25,493: DEBUG - ++ tail --lines=1 2023-07-14 18:02:25,495: DEBUG - + real_nodejs_version=/opt/node_n/n/versions/node/19.9.0 2023-07-14 18:02:25,496: DEBUG - ++ basename /opt/node_n/n/versions/node/19.9.0 2023-07-14 18:02:25,497: DEBUG - + real_nodejs_version=19.9.0 2023-07-14 18:02:25,497: DEBUG - + '[' '!' -e /opt/node_n/n/versions/node/19 ']' 2023-07-14 18:02:25,497: DEBUG - + echo calckey:19 2023-07-14 18:02:25,497: DEBUG - + tee --append /opt/node_n/ynh_app_version 2023-07-14 18:02:25,498: DEBUG - calckey:19 2023-07-14 18:02:25,499: DEBUG - + ynh_app_setting_set --app=calckey --key=nodejs_version --value=19 2023-07-14 18:02:25,499: DEBUG - + local _globalapp=calckey 2023-07-14 18:02:25,552: DEBUG - + app=calckey 2023-07-14 18:02:25,553: DEBUG - + [[ nodejsversion =~ (unprotected|protected|skipped) ]] 2023-07-14 18:02:25,553: DEBUG - + ynh_app_setting set calckey nodejs_version 19 2023-07-14 18:02:25,598: DEBUG - + ynh_cron_upgrade_node 2023-07-14 18:02:25,598: DEBUG - + cat 2023-07-14 18:02:25,599: DEBUG - + chmod +x /opt/node_n/node_update.sh 2023-07-14 18:02:25,600: DEBUG - + cat 2023-07-14 18:02:25,601: DEBUG - + chmod +x /etc/cron.daily/node_update 2023-07-14 18:02:25,602: DEBUG - + ynh_use_nodejs 2023-07-14 18:02:25,603: DEBUG - ++ ynh_app_setting_get --app=calckey --key=nodejs_version 2023-07-14 18:02:25,603: DEBUG - ++ local _globalapp=calckey 2023-07-14 18:02:25,628: DEBUG - ++ app=calckey 2023-07-14 18:02:25,629: DEBUG - ++ [[ nodejsversion =~ (unprotected|protected|skipped) ]] 2023-07-14 18:02:25,629: DEBUG - ++ ynh_app_setting get calckey nodejs_version 2023-07-14 18:02:25,670: DEBUG - + nodejs_version=19 2023-07-14 18:02:25,670: DEBUG - + nodejs_path=/opt/node_n/n/versions/node/19/bin 2023-07-14 18:02:25,670: DEBUG - + shopt -s expand_aliases 2023-07-14 18:02:25,670: DEBUG - + ynh_node=/opt/node_n/n/versions/node/19/bin/node 2023-07-14 18:02:25,671: DEBUG - + alias ynh_node=/opt/node_n/n/versions/node/19/bin/node 2023-07-14 18:02:25,671: DEBUG - + ynh_npm=/opt/node_n/n/versions/node/19/bin/npm 2023-07-14 18:02:25,671: DEBUG - + alias ynh_npm=/opt/node_n/n/versions/node/19/bin/npm 2023-07-14 18:02:25,671: DEBUG - + [[ :/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: != \:\/\o\p\t\/\n\o\d\e_\n\/\n\/\v\e\r\s\i\o\n\s\/\n\o\d\e\/\1\9\/\b\i\n* ]] 2023-07-14 18:02:25,671: DEBUG - + PATH=/opt/node_n/n/versions/node/19/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 2023-07-14 18:02:25,671: DEBUG - + node_PATH=/opt/node_n/n/versions/node/19/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 2023-07-14 18:02:25,671: DEBUG - + ynh_node_load_PATH=PATH=/opt/node_n/n/versions/node/19/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 2023-07-14 18:02:25,671: DEBUG - + ynh_node_load_path=PATH=/opt/node_n/n/versions/node/19/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 2023-07-14 18:02:25,730: INFO - [########+...........] > Reinstalling pnpm + rust... 2023-07-14 18:02:25,730: DEBUG - + pushd /var/www/calckey 2023-07-14 18:02:25,731: DEBUG - /var/www/calckey /home/yunohost.backup/tmp/20230712-194147/apps/calckey/backup 2023-07-14 18:02:25,731: DEBUG - + curl https://sh.rustup.rs -sSf 2023-07-14 18:02:25,731: DEBUG - + ynh_exec_warn_less ynh_exec_as calckey sh -s -- -y 2023-07-14 18:02:25,731: DEBUG - + [[ 6 -eq 1 ]] 2023-07-14 18:02:25,731: DEBUG - + ynh_exec_as calckey sh -s -- -y 2023-07-14 18:02:25,731: DEBUG - + local user=calckey 2023-07-14 18:02:25,731: DEBUG - + shift 1 2023-07-14 18:02:25,731: DEBUG - ++ whoami 2023-07-14 18:02:25,733: DEBUG - + [[ calckey = root ]] 2023-07-14 18:02:25,733: DEBUG - + sudo -u calckey sh -s -- -y 2023-07-14 18:02:26,028: DEBUG - info: downloading installer 2023-07-14 18:02:26,564: DEBUG - error: could not create bin directory: '/var/www/calckey/.cargo/bin': Permission denied (os error 13) 2023-07-14 18:02:26,570: DEBUG - + ynh_exit_properly 2023-07-14 18:02:26,570: DEBUG - + [[ restore =~ ^install$|^upgrade$|^restore$ ]] 2023-07-14 18:02:28,077: ERROR - Konnte calckey nicht wiederherstellen: Im Wiederherstellungsskript der Applikation ist ein Fehler aufgetreten

oufmilo commented 1 year ago

@Zeitverschreib can you try to restore again please ?

Zeitverschreib commented 1 year ago

You mean from the same backup file?

Still fails at:

2023-07-18 07:58:41,282: DEBUG - error: could not create bin directory: '/var/www/calckey/.cargo/bin': Permission denied (os error 13)

A fresh install on this machine works, except for the no-admin-user issue.

lapineige commented 1 year ago

Oh, I have a similar issue #44, with .config and not .cargo. It happens even if you destroy the .config directory first.

lapineige commented 1 year ago

@Zeitverschreib can you try to restore again please ?

You merged in testing only, so it can be applied for @Zeitverschreib, right ? I believe you should make the same PR for master, as merging Testing to Master is not possible (it's v14 RC3 in testing)

Zeitverschreib commented 1 year ago

Codeberg seems to have some issues at the moment.

oufmilo commented 1 year ago

You mean from the same backup file?

Still fails at:

2023-07-18 07:58:41,282: DEBUG - error: could not create bin directory: '/var/www/calckey/.cargo/bin': Permission denied (os error 13)

Can you try this before restore please :

chmod 750 /var/www/calckey/
chmod -R o-rwx /var/www/calckey/
chown -R calckey:www-data /var/www/calckey/

A fresh install on this machine works, except for the no-admin-user issue.

And do you have some logs for the no-admin-user issue ?

Zeitverschreib commented 1 year ago

There's no /var/www/calckey, since there's no active installation and no restored backup.

As to the no-admin issue: no, unfortunately not. But I noticed that this problem seems to be gone after upgrading the 13.4.1 from the app catalogue to 14.0.0rc3.

oufmilo commented 1 year ago

There's no /var/www/calckey, since there's no active installation and no restored backup.

Yes normally with merged this can't reproduce in the futur #47

As to the no-admin issue: no, unfortunately not. But I noticed that this problem seems to be gone after upgrading the 13.4.1 from the app catalogue to 14.0.0rc3.

I'll try this ...

Zeitverschreib commented 1 year ago

Ok, after shuffling lots of GB from one machine to the other....

I have now updated the old installation to the Testing version, did a new backup and was able to restore this on the new machine. Seems to be working, but I'll keep an eye on it.

Thanks for you help, @oufmilo

oufmilo commented 1 year ago

Ok i closed for the moment !