The latest release of NextCloudPi is out!
This release brings us the latest NextCloud 12 release. Check the new stuff here.
In order to improve support for upgrading, three new tools have been added to nextcloudpi-config.
These tools will allow you to save or restore a backup of your NextCloud instance, and even download and install any NextCloud version from the internet.
Last but not least, the automount feature aims to make the setting up process easier, specially for less experienced Linux users.
As usual, please report any problems here, and feedback is welcome.
Upgrade NextCloudPi to NextCloud 12
If you are already running NextCloudPi chances are you will not want to start from scratch in order to get the latest update.
Also, NextCloud internal updater is not as reliable as we would like as of today, so there is a risk of breaking things if we try to upgrade from the admin panel. I have found and reported a couple bugs myself.
For users wanting to upgrade to NC 12 I recommend:
- run ncp-update , in order to get the latest features
- run nc-backup from nextcloudpi-config
- try the internal updater app in the admin panel
- if it fails, restore the backup with nc-restore, then
- Copy your files somewhere else, and export your contacts, calendars, news and such
- run nc-nextcloud to download and install NextCloud 12
- Copy your files back. Import contacts, calendars, news and such
Backup and Restore
There is a newer version of this feature. This documentation for backups is obsolete.
You can use nc-backup to create a backup of your files and database.
This includes all users’ files unless you have moved your data directory with nc-datadir.
A .bak file will be generated.
You can restore an exact copy of your NextCloud instance any NextCloudPi instance through nc-restore.
nc-restore will overwrite any existing NextCloud installation
NextCloud online installation
This feature can also be handy and save us time and trouble in certain situations.
nc-nextcloud simply downloads and installs whatever NextCloud version we want. This means that the day NextCloud 14 comes out, we will be able to install it in our NextCloudPi. This would not be an upgrade, but a clean installation.
It provides an easy way of replacing or updating our NextCloud instance without having to start from scratch if we have other customizations in place that we don’t want to lose.
nc-nextcloud will overwrite any existing NextCloud installation
Note: the feature has been rewritten and the behaviour is slightly different now but the usage holds the same
Since NextCloudPi came out, the configuration step where the most people are having trouble by far is mounting their external USB hard drive to host their files. This involves editing /etc/fstab and being careful with permissions.
It is a fairly common setup, so I decided that it would be helpful to make it easier.
Just activate it and your /media folder will be populated with an entry such as /media/USBdrive that will be already mounted for you for each connected USB drive. If the filesystem contains a label, a symbolic link will also appear in /media/.
$ ls -l /media
lrwxrwxrwx 1 root root 16 May 24 15:23 cloudDrive -> /media/USBdrive1
drwxrwxr-x+ 11 pi pi 4096 May 24 15:23 USBdrive
drwxr-xr-x 4 root root 4096 Jan 1 1970 USBdrive1
In this example, the first inserted USB drive does not have a label, but the second does, so a symbolic link appears to uniquely identify it.
If you want to use several USB mounts, you should reference the drive by its label in order to have a predictable path to it. This way, your configuration will not depend on the order in which USB sticks were plugged in.
For instance if we want to move the data folder to a connected USB drive with label cloudDrive with nc-datadir
Be aware that if we want to move the data folder to an external drive, NTFS and FAT filesystems should be avoided. The reason is that they are not standard Unix like filesystems and do not support Linux style owners and permissions.
For security reasons, the data directory should be restricted to be used by the www-data user, whereas the database directory has to belong to the mysql user. Mounting on a filesystem that does not support permissions would mean breaking that security layer. Not recommended at all.
On top of that, the performance of the NTFS driver compared to an ext4 in Linux is lousy. Last time I tried it hogged my Raspberry B CPU very badly.
Note that you still have to either unmount the drive or halt the system in order to extract the USB