This article is not a well though out writeup- rather a dump of what to do when I fuck up again and need to reinstall my nextcloud.
I provisioned a 60 GB external hardisk to serve as my data folder in nextcloud.
- Check if the external device is mounted
df -h
It isnt
- check for storage decides:
lsblk
Now if you find the external disk, it’ll be in /dev, special filesystem that holds a reference to every device attached on your disk
I got the 60 gigs HDD that I provisioned as sdb1
Create a partition on the new disk. You can use gdisk or fdisk. Since I already have the partition I’ll move to next step.
Reformat the partition as ext4 just to be safe
mkfs.ext4 /dev/sdb1
add it to fstab
Get the UUID of the HDD
blkid
sudo nano /etc/fstab
add the new device:/dev/disk/by-uuid/c7c8c8b8-e9f5-4c21-8b74-a530db0f50dc /media/nextcloud ext4 defaults 0 2
This is how my fstab looks like: save it.
Make a dir media/nextcloud
5. mount it
sudo mount -a
- Check to make sure it’s mounted"
df -h
it is! We can now use it
change ownership of this folder to www-data
sudo chown -R www-data:www-data /media/nextcloud
While setting up netcloud thorugh the webinterface, just use
/media/nextcloud
as the Data folderTo check what port maria db is runnig on:
sudo netstat -tnlp