Nextcloudpi backup and restore unclear/issues

nc15
backup
external_storage
#1

Hi everyone,

It’s a real pleasure to see the progress NextCloud made since I came across it two years ago. Big thanks to all the developers and contributors.

Somehow, I don’t get it working properly, as well as going through many help pages and youtube videos seem not to help me any further so far. I guess I am overlooking something or simply missing the understanding of how things work.

Situation
I can’t get backup and restore working. Even after a clean install, restoring a backed-up instance ends with “something went wrong” message or simply “done”. But it doesn’t do the trick. I am using Ubuntu 18.04 LTS (although I had the exact same behavior on Raspian as well).
What I do

  • Loading NextCloudPi-x86 with Docker on Ubuntu Desktop (or Raspbian)
  • Waiting for the “Init Done”
  • Do the login ncp-web, letsencrypt, nc-update, nc-update-nextcloud (until version 15.0.6.1)
  • Switch to the login on the cloud and wait for the first time login to finish
  • next I change the theme color to be sure I can see it is my configured Nextcloud version
  • return to ncp-web and perform a nc-backup including data to /data/backups and receive a .tar file

After that, I stop this docker container and load a fresh one (eg nextcloudpi2 instead of …1). Hence, once again I have a clean NextCloudPi instance running after “Init done”. Before loading the backup, I perform the updates (nc-update, nc-update,nextcloud) to ensure the same version as the backup (15.0.6.1).

  • now: restoring with nc-restore ends with either (ncp-web) “something went wrong” message or simply (ncp-config) “done”.

However/Questions

  • I guess the return message “something went wrong” from ncp-web is not normal behavior.
  • letsencrypt is not restored. Is this the normal behavior?
  • Is the backup file in the /data/backups folder an issue for a restore into the same /data directory?
  • Trying to do the backup on an external device seems not possible: USB stick is showing up in Ubuntu, however, the path /media/USBdrive is not working with the external storages app (red sign). Tried everything, even to refer to a /home folder. Nothing. It simply doesn’t work. Is this due to docker?

In short

  • I cannot replicate restoring as described by ownyourbits.com or in youtube videos. Both, on my Ubuntu and Raspbian docker container of NextCloudPi-x86
  • Can’t get external storages app to accept any drive that I plugin nor a folder on my home directory

Both should be simple when I look at videos and well written manual pages. However, I simply can’t replicate it. Is this due to the docker container or any other “simple” thing I am missing out?

I would really appreciate any hints from your side on how I could get around these issues.
Kind regards

#2

Some NCP functions are not available for the Docker version.
Some additional work maybe needed to documentation to clarify, what these differences between normal NCP and Docker container are exactly.

I use the -v (volume) option to mount the nc’s data and config to a system folder.

docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /media/ncdata:/data –name nextcloudpi ownyourbits/nextcloudpi-x86 sub.domain.tld

As described in docs

If I start a new fresh container with the same volume, after initializing, I just need to re-create users and run nc-scan.

#3

Dear OliverV
Thanks for your quick reply. Yeah, I followed the description and used the -v option with docker to mount the /data folder. That works fine.
I guess I didn’t completely understood that the docker instance has some limitations that caused the described behaviour.
Hence in my case to test case a loss of the server, I thought to install a new server instance (hence, a new docker container and removing the old instance) and the reload everything from backups (including or excluding data).
I was able to do some more testing today and can now confirm that

  • backup is working fine when using docker exec -it container ncp-config when data is included
  • will have to do some more reading and research about backup without data and then restoring the entire thing, including file attributes (eg comments, favourites, etc)
  • it looks like that letsencrypt needs to be run for each new docker container, as it is not restored from backups, nor can it be simply copied over from the old instance.

So, thanks again, you helped me that I continue on this track to get the NextCloudPi running on my server. Sure, I will have to do some more reading and investigation …sometimes it’s just good to get some confirmation that not everything is as bad as it may look in the first instance.

Kind regards