Snap - Nextcloud
December 23, 2019
11:27 PM
f you have already created an admin user
Decide where you want the new data to live. We'll use /media/my/new/data. Make sure root has write access, for example:
 $ sudo chown -R root:root /media/my/new/data
Update the Nextcloud config to use the new data directory by editing [file] and making sure the datadirectory setting is pointing to the right place, e.g.:
 // ...
 'datadirectory' => '/media/my/new/data',
 // ...
Stop the snap from running for a moment:
sudo snap disable nextcloud
Move (or copy) the current data directory to the new place:
 $ sudo mv /var/snap/nextcloud/common/nextcloud/data /media/my/new/data
Re-enable the snap:
sudo snap enable nextcloud
sudo snap remove nextcloud
snap set nextcloud ports.http=8080
/dev/sda2
this is where Nextcloud stores all its media files 
[file]
nextcloud trashbin
sudo -u www-data php occ trashbin:cleanup