Admin manual recommends placing data directory outside web root. Why?

Not correct: There are both supported and unsupported way’s of moving the data directory after installation as described in this post : Is there a safe and reliable way to move data directory out of web root? - #4 by JasonBayton

Quote from JasonBayton

Be aware, moving the data dir after installation is not supported and may cause issues.

Edit 2017 (as this is a popular topic):

If you have a fresh install, consider reinstalling with your preferred directory location.

Unofficially moving the data directory can be done as follows:

Make sure no cron jobs are running
Stop apache
Move /data to the new location
Change the config.php entry
Edit the database: In oc_storages change the path on the local::/old-data-dir/ entry
Ensure permissions are still correct
Restart apache

However this is not supported and you risk breaking your database. It’d be better if instead you:

Make sure no cron jobs are running
Stop apache
Move /data to the new location
Create a symlink from the original location to the new location
Ensure permissions are still correct
Restart apache

(Note, you may need to configure your webserver to support symlinks)

Which is supported by Nextcloud.

Unquote

I moved mine by using fstab to mount a copy of /ncdata on a new drive (in a NC-PI-Box) to the mount point where the old /ncdata was originally mounted to. So this is in essence the supported way, only the creating of the symlink isn’t required anymore.