Nextcloudpi backup and restore unclear/issues

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

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.

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

@favoria

Well I have used nextcloudpi on a odroid hc1 box, which was doing a great job before the last two versions came out. Since that my odyssey with frustration started and as the image creator and main supporter just closed the open issue and wrote it is a hardware problem… Well when I look at github at the nextcloudpi issues it seems to be quite too often a “hardware” issue.

Long story short, luckily i found a fresh and very detailed how-to on setting up an instance with nginx as hardening the box with fail2ban, ufw and some other tunings. Since I setup the box through this guide the box is running stable and the webserver isn’t crashing anymore.

However probably you should give a try a for a manual setup and clean install by your own instead of using an image where you have not that much control what happens in the background. In my case my last dev board where i was running the nextcloud before was an odroid-x and it did a great job for 5 years. No issues and stable running 24/7.

I hope to achieve now the same with the manual setup based on armbian bionic for the newer board as the older isn’t supported anymore sadly.

Kind Regards

here is the link to the tutorial if you want to give it a try:

https://www.c-rieger.de/nextcloud-installation-guide-debian/