Nextcloud Box: possible data loss


here is a little report about my issues with NextCloud Box. Not very nice for a first message, but I was a bit disappointed about the default behaviors.

1/ I’ve ordered the box and installed it. Everything was already configured. So far, so good.
2/ It’s quite easy to use. I’ve put some files on it (hopefully, not very important).
3/ After a while, it stopped to work. When I booted the network lights didn’t show. If It connected a screen, I couldn’t see anything. I didn’t know yet if it was an issue with the network, the raspberry pi or the system. The sd card looked ok, there were all the files on it (maybe the boot was corrupted after all).

So I took another sd card, copied the latest image (rpi2 and rpi3 compatible) and booted again. I was wondering if I had to configure again everything or if the previous installation would be automagically recognised. But I didn’t expected the new system would delete everything on the hard drive instead!

I’ve opened an issue on github:

I was hoping a more robust system, which could store at least some settings on the hard drive and could reuse that.

I didn’t like also the new way to ssh on the system, we are forced to have a ubuntu account, it reminded me of windows 10.

So to avoid this kind of annoyance in the future, I think I’ll set up a classic Raspbian system on the raspberry pi, with a basic nextcloud installation, and won’t rely on ubuntu snap.

Did I get it right, that your nc data was/is on an external hdd instead of on the sd card?

If you install system+nextcloud new from an image without copying config and databases, the nextcloud files are not inside it’s database anymore and therefore will not show up on web interface/clients etc. You would need to rescan the data folder to rebuild the files database. Nothing should be removed by nextcloud!

Do #sudo -u www-data php /path/to/nextcloud/occ files:scan --all
Maybe there is another way for snap systems, don’t know about that.

Yeah, the concept of the nextcloud box is you have 1Tb hard drive for the data and the system is on the sd card.

I could understand that the files wouldn’t be in the new installation database. But I’ve ssh’ed to the system, and the external hard drive is now almost empty, therefore I think everything was wiped out upon first boot (there were some scripts running, but I thought it would be to merge the data, not destroy them). Anyway as I said it wasn’t sensible data so it’s not a loss. I might use photorec to recover the biggest files (movies).

What I wanted to emphasise, is it’s a pity there aren’t some protections in this case, especially if this box is for consumers. Making a backup of the sd card could be an idea, but in the case I add more data on it (like new appointments, contacts), I can’t make a copy of the sd card every day! I think the system and database should be kept on the external hard drive, and the sd card could be just to boot on the raspberry pi.

I got that thing too, I think I know why that happened to you.

As you reset you system the File
/boot/firmware/cmdline.txt (if booted) or cmdline.txt in the first partition if the SDCard is mounted to another system
has the entry
that runs the reset-from-scratch script.
If you don’t want to have that, change the part to:

Another thing is if you upgrade your nc with snappy and it has a too big version gap, you are screwed too and have to to manual work.

1 Like

You’re probably right. It would have done the job. So maybe a menu during boot up (expecially if it can detect a previous installation), with a question like “would you like to recover a previous installation or start for a new installation?” would be safer.

I’m sorry you’ve lost data, but this is covered off in the docs as a behaviour that will happen by default:

Oh yes, it’s in the doc. I don’t get angry for the data loss, first it wasn’t important, and I’ve recovered most of it with photorec. What I wanted to say is it’s not a very safe behaviour, there should be an idiot-proof script to check if some data are already present and give the choice either to start for new, or to merge the data, that’s all.

Most cleverly designed products take those cases into account before making important operations such as deleting some user data.

Also this information in the wiki, is in a chapter not really concerning what happened to me (trashed sd card):
I didn’t want to restart from scratch, just to make a new sd card to boot my system. Also while I was looking for the URL of the sd card image, I came along this precise chapter because I clicked everywhere in the wiki, and I didn’t even read in completely, because I didn’t feel concerned about this, it was another case for me.

For a technical aware user which deals with open source products every day, reading a wiki is an acceptable solution, but for general users (who bought a box and a software together), a more structured user manual, along with the idiot proof behaviour described above, would be better.

Thanks for that casual mention, I’ve been looking for a tool like this :slight_smile:

At this stage I think it’s still probably acceptable to call this whole product new. It’s still a little raw and due to issues with Ubuntu core and images for the Pi I think it’s been a little neglected. You’re right ultimately, it’s just not yet polished.

If you feel you can help to improve the situation for new and non-technical users and have a little time, the community would benefit immensely from contributions to the docs :slight_smile: