Nextcloud 23 Update

root@syncloud:~# snap refresh nextcloud
error: cannot perform the following tasks:

  • Run configure hook of “nextcloud” snap if present (run hook “configure”:

2022-01-03 19:01:21,073 - nextcloud_config - INFO - setting value: datadirectory = /opt/disk/internal/nextcloud
{“reqId”:“tiGdYDWPnVQr7QZ8NYeQ”,“level”:3,“time”:“2022-01-03T19:01:22+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“Exception: Not installed at /snap/nextcloud/211228447/nextcloud/lib/base.php#277”,“userAgent”:"–",“version”:""}
2022-01-03 19:01:22,081 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c “ALTER USER nextcloud WITH PASSWORD ‘nextcloud’;”
2022-01-03 19:01:22,266 - database - INFO - ALTER ROLE
2022-01-03 19:01:22,800 - nextcloud_occ - ERROR - occ error: Cannot write into “apps” directory
This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /snap/nextcloud/211228447/nextcloud/lib/private/Console/Application.php:164
Stack trace:
#0 /snap/nextcloud/211228447/nextcloud/console.php(98): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /snap/nextcloud/211228447/nextcloud/occ(11): require_once(’/snap/nextcloud…’)
#2 {main}
Traceback (most recent call last):
File “/snap/nextcloud/211228447/meta/hooks/configure”, line 7, in
Installer().configure()
File “/snap/nextcloud/211228447/hooks/installer.py”, line 110, in configure
self.initialize(app_storage_dir)
File “/snap/nextcloud/211228447/hooks/installer.py”, line 195, in initialize
self.occ.run(‘maintenance:install --database pgsql --database-host {0}:{1}’
File “/snap/nextcloud/211228447/hooks/octools.py”, line 19, in run
raise e
File “/snap/nextcloud/211228447/hooks/octools.py”, line 13, in run
output = check_output(’{0} {1}’.format(self.occ_runner_path, args), shell=True).decode().strip()
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘/snap/nextcloud/current/bin/occ-runner maintenance:install --database pgsql --database-host /var/snap/nextcloud/current/database:5436 --database-name nextcloud --database-user nextcloud --database-pass nextcloud --admin-user installer --admin-pass 4a1aaf72201c470bba55d22c080c04a7 --data-dir /opt/disk/internal/nextcloud’ returned non-zero exit status 1.
-----)
root@syncloud:~#

Do you know what the problem is with my Nextcloud?

I can’t install the Nextcloud update either.

Can you run this:

snap run nextcloud.occ status

root@syncloud:~# snap run nextcloud.occ status
Nextcloud is not installed - only a limited number of commands are available
Cannot write into “apps” directory
This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /snap/nextcloud/211225439/nextcloud/lib/private/Console/Application.php:164
Stack trace:
#0 /snap/nextcloud/211225439/nextcloud/console.php(98): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /snap/nextcloud/211225439/nextcloud/occ(11): require_once(’/snap/nextcloud…’)
#2 {main}root@syncloud:~#

Hi Boris
Do you know what the problem is with my Nextcloud?
Thanks for your help
Chris

What is the ouput of df -h now?

root@syncloud:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 1.8T 116G 1.7T 7% /
udev 10M 0 10M 0% /dev
tmpfs 770M 80M 691M 11% /run
tmpfs 1.9G 16K 1.9G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/loop0 47M 47M 0 100% /snap/syncthing/21050830
/dev/loop1 171M 171M 0 100% /snap/platform/2112291188
/dev/loop2 583M 583M 0 100% /snap/nextcloud/211225439
/dev/loop3 100M 100M 0 100% /snap/users/210524196
/dev/loop4 576M 576M 0 100% /snap/nextcloud/211119415
/dev/loop5 171M 171M 0 100% /snap/platform/2112231186
/dev/loop6 171M 171M 0 100% /snap/platform/1203

Sorry for asking again. Have you found out anything yet? I’m pretty blocked, as all my data is synchronised via Nextcloud.
Thank you very much and have a nice weekend.

it is not clear, maybe lack of disk space caused something else to break in Nextcloud.
There is always an option to remove and install again, which will clear all settings like calendar/contacts but all files will be preserved, just have to be probably synced after the fresh install with this command if you do not see them:

snap run nextcloud.occ files:scan --all

Can you try remove/install?

Hi Boris

I have now reinstalled my NC. Unfortunately, the system cannot find all the data - even with the command you recommended.

Since I have made a backup with NC Backup, I would like to try to use it. Unfortunately, I have noticed that Syncloud S is not structured quite the same as the instruction video.

Could you tell me what I need to change in these instructions.

Thank you very much for your efforts!

Chris

can you run this command to see if files are there?
ls -la /data/nextcloud

All users are there. However, these are from the old user administration (17.1.21) with a large initial letter “user” and new with a small initial letter “user”.
There is no data for the version with the small initial letter.

I have now copied the data - now they are available again.

Can I delete the old user names (17.1.21)?

Yes, just be careful and check what you are deleting.