Cannot update NextCloudPi (1.25 to latest)

I decided it is time to update my ncp and nc.
I was on ncp1.20 and nc 18.

What I did:

  • nc-update (to latest) --> it went to only 1.25. But works
  • further updates do not work (It gets green, no log and goes back to info page)
  • So i did nc-update-nextcloud to 19 and then to latest (20.0.4). Works.

What information do you need? Here is my info page:

Additional info: I am on x86 and using the docker image

What information do you need to investigate?

Latest version of ncp is available for Debian 10 only.
Maybe make backups and upgrade to 10, by pulling the latest image,.

Are there instructions? I do not trust my docker knowledge.

  1. nc-backup (its ~150MB as tar.gz. Is this ok?)
  2. docker remove image
  3. docker ?
  4. nc-restore

Help please. How to update?

I need support since my nextcloud is broken now :frowning:

No updates for an image from 2019/Debian(9)Strech

  1. Could be ? Is with or without data?

  2. Yes, you have to remove the image before starting a new one.

  3. This always works for me to start a new container.

  4. Run nc-restore

150 MB is without data.

I read between your lines, its the easiest to backup with data (even if it takes ages) and restore with data?
This will restore all files, user, setting, calendars etc in nextclound? What if the nc version changed in the new image?

yes, but not required to restore everything except files. Which would take a few additional steps (set path to ncdata in config and run nc-scan)

yes

Not if, it will restore NC to the version of/in the backup, you then use nc-update-nextcloud to update

Id did not work :frowning:

root@c2e91fc7cb93:/# ncp-restore /data/backups/ncp-backups/nextcloud-bkp_20210501_1619859993.tar.gz 
check free space...
extracting backup file /data/backups/ncp-backups/nextcloud-bkp_20210501_1619859993.tar.gz...
restore files...
Stopping redis-server: redis-server.
Starting redis-server: redis-server.
restore database...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Cleanup...
root@c2e91fc7cb93:/# exit
exit
framold@homeserver:~$ docker container list
CONTAINER ID   IMAGE                     COMMAND                  CREATED       STATUS       PORTS                                                              NAMES
c2e91fc7cb93   ownyourbits/nextcloudpi   "/run-parts.sh ncfra…"   3 hours ago   Up 3 hours   0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp   nextcloudpi_210501
framold@homeserver:~$ docker restart c2e91fc7cb93
c2e91fc7cb93
framold@homeserver:~$ 

Reboot did not help. It is still in “activate” mode.

ncp-report:

Is not very informative …
What steps did you take exactly?
First create a new container and activate it, then use ncp-config>BACKUPS>nc-restore.
nc-restore is to be executed from either ncp-config or ncp-web

Ok. I redid everything:

  1. Update image (docker pull)
  2. Start new container:
    docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /media/seagate/nextcloud/_data_210501/:/data --name nextcloudpi_210501 ownyourbits/nextcloudpi MYDOMAIN.duckdns.org
  3. attach to container
    docker exec -it nextcloudpi_210501 bash
  4. ncp-config
    → BACKUP → nc-restore
    (same log/error as above)

→ files are extracted to /data/nextcloud/data/<user>/..
→ NCP-web (4443) can not be opened, Nextcloud (443) redirects to ACTIVATE

  1. restart container

→ NCP-web (4443) can not be opened, Nextcloud (443) redirects to ACTIVATE

→ <--! Paste this in GitHub report --><details><summary>NextCloudPi diagnost - Pastebin.com

Step 3 should be visit activation page.
You can not restore if not activated first

I repeated 1 +2, then tried activation via https://local-hostname (redirects to activate page)

Activation does not work :frowning:

image
I waited 5 minutes here, and refreshing takes me back to:
image

Can I activate via command line? How long should I wait? Do I need to refresh?
What logs will help you?
(Cannot find any help in FAQ/Doc about activate page)

btw: Thanks for your help so far!

step 1 should be: remove current container? forgot to mention or forgot to do?
check with “docker ps -a”

Doesnt work if forgot “docker rm nextcloudpi”

and from yr pastebin:

/data/database (doesn’t exist)

Is that path writable for the container?

Well, i really do not know why deleting my old (stopped!) container should be necessary, but since I am out of options, I did it.

user@homeserver:/media/seagate/nextcloud/_data_210501$ docker ps -a
CONTAINER ID   IMAGE          COMMAND                  CREATED         STATUS                  PORTS     NAMES
280bb67ab9c4   1b558faf4038   "/run-parts.sh 192.1…"   15 months ago   Exited (0) 7 days ago             nextcloudpi_seagate
user@homeserver:/media/seagate/nextcloud/_data_210501$ docker rm 280bb67ab9c4
280bb67ab9c4
user@homeserver:/media/seagate/nextcloud/_data_210501$ ls
backups  bin  etc  ncp
user@homeserver:/media/seagate/nextcloud/_data_210501$ sudo rm -rf bin/ etc/ ncp/
[sudo] password for user: 
user@homeserver:/media/seagate/nextcloud/_data_210501$ docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /media/seagate/nextcloud/_data_210501/:/data --name nextcloudpi_210501 ownyourbits/nextcloudpi ncuser.duckdns.org
3f3e8c409758e2d701630290174f1528a28ccbcd206a833a27cfc721742cb427
user@homeserver:/media/seagate/nextcloud/_data_210501$ ls
backups  bin  etc  ncp

Still did not work (not activating).
And is /data not supposed to be empty initially?
Yes it is writable. The container always creats bin, etc and ncp
Is my parameter for DOMAIN correct? Should this be my duckdns domain (which I cannot use until I activated and configured/restored duckdns and letsencrypt settings)
If I recall correctly, DOMAIN was not necessary in old versions of the container.

They will have the exposed ports and path reserved, and you will be unable to connect to the new one, unless you choose to expose alternate ports (example 14443:4443 1443:443 1080:80)

No, any data, db and config will be used again.

I think it is not required, but you can use the internal IP address or a domain

I started without the data mount and it worked. Then I started with an empty /data mount (no backup folder). Activating also worked!
I am now restoring!

→ It looks like /data must be completely empty and may not contain any folders!

Restoring was successful, but it did not restore duckdns and letsencrypt settings. Is this normal?

:champagne: Good to here :wink:

These are not part of NC, they are NCP apps
The settings are saved using nc-export-ncp and
restored with nc-import-ncp