@Reiner_Nippes Thanks for your suggestion. Here is my view of events:
I set up the Nextcloud server on Ubuntu 18.04 as described above. I moved the data directory of Nextcloud to a directory in
/home to accommodate the large size.
sudo systemctl stop apache2
mv /var/www/nextcloud/data /home/nextcloud_data
I reconfigure the Nextcloud server so that it knows its data directory by editing the file
/var/www/nextcloud/config/config.php such that it now contains the following line:
'datadirectory' => '/home/nextcloud_data',
I then set the correct filesystem permissions such that Apache has full access to the Nextcloud files and directories.
chown -R www-data: /home/nextcloud_data
I restart Apache and go through the web interface as administrator, set up an non-administrator user etc.
systemctl start apache2
On my local machine, I switch off Dropbox, delete Dropbox dot files etc. Now I just have a directory
~/Dropbox. I launch the Nextcloud client on Ubuntu 16.04 and create the directory
~/.Nextcloud. I move the contents of the old Dropbox directory to the new Nextcloud directory and the Nextcloud client seems to start off doing its syncing thing. Excellent. I let it do its thing overnight.
Next morning I begin to notice files are missing. Like, very important files like my
.tex files. I am finding it difficult even to quantify the damage caused and I cannot understand why Nextcloud should act in this way.
Now, as per your suggestion (and thank you again for your continued assistance) I have checked the directory
/home/nextcloud_data/wbm/files. I can see files being synced there, but there are no
.tex files there either where there should be. So I am distraught and confused.
Do you have any idea what might have happened? Is there any recovery from this? I would welcome any even tentative suggestions. This is making my days really bad.