Hi All
I have what I think must be quite a common issue. I setup my Nextcloud instance using Nextcloud Pi OS image for the raspberry Pi back in 2019. It has been running mostly without hiccup since, but only on a single USB drive. Which is a glaring red siren flashing beacon of an issue when it comes to backup strategy and I now need to do something about it. (I previously posed about the in 2021 and then life gets in the way so I really, really need to sort it now)
Im currently up to date on Nextcouldpi version V1.51.0 running nextcloud 23.0.6.1 (I think my version of PHP is stopping me going further but that’s for another day).
I have a second USB drive to use as a backup and followed this guide (How to periodically backup to a second USB drive with NextCloudPi) to format it by taking the old drive out and putting the new one in to get next cloud to format it properly for me. I gave it the mybackup label using nc-format-usb tool so that the new drive is /media/mybackup.
However as when I originally setup everything I don’t believe I added a label to the original drive and just relied on Automount. So this is what is seen for my existing drive.
NCP System info lists my datadir as /media/USBdrive/ncdata
NC settings page shows it as /media/myCloudDrive
When I plug in my new drive that I want to use as a backup it all gets confused as ncp seems to forget my original drive and it can’t find my datadir. When I unplug the backup drive and restart with only my original drive, all is back and working, so I think it is a label issue with my original drive.
Previously I have been pointed to using UUID and fstab but that seems more like for moving the datadir to a new disk.
I have also seen mention of manually editing the config.php file to add the label of the datadir so it is set on the right drive which would be /media/myCloudDrive (I think from what is shown in NC settings) and not relying on automount and there only being 1 drive in the system. But I don’t know how to go about it.
However, I will freely admit (much to my annoyance) I am not greatly linux literate, but I can follow instructions and learn from them. However, whilst I have read posts on this forum and generally, online there are bits of information that are relevant to what I need to do, but not a guide or complete post that does it all and the last thing I want to do is in attempting to secure my data with a backup strategy, screw it up as Im getting a command wrong.
I was wondering if it is as simple as using nc-datadir in the NCP panel and just putting /media/myCloudDrive in there rather than /media/USBdrive/ncdata? but I don’t want to move the directory just set it where it is on that drive.
So I humbly ask for the collective help and guidance this forum has on tap, with an idiots guide…
Please. Thanks in advance.
I hope that it is as simple as editing the config.php in a terminal (I can plug in keyboard etc and work directly on the Pi rather than SSH) but its how I go about it on a Pi install based on the SD image rather than snappy or docker etc.
Equally, if there is already an exact guide for this, link it and call me an even bigger idiot but I couldn’t find what I needed, maybe I’m not asking the right question though.
Cheers.