I think that maybe I was having trouble with automount competing with my fstab mounting instructions, so I flashed my image again, reformatted the USB drive partitions and re-did the mounting, and again the move DB and move datadir scripts failed and resulted in a broken instance.
Started again from scratch, and this time followed this guide
1. sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --on
2. mkdir -p /new/path/to/data
3. cp -a /path/to/data/. /new/path/to/data
4. chown -R www-data:www-data /new/path/to/data
5. nano /path/to/nextcloud/config/config.php
'datadirectory' => '/new/path/to/data',
6. mysqldump -u<rootuser> -p > /path/to/dbdump/dump.sql
7. Adjust "oc_storages"database table to reflect the new data folder location:
mysql -u<rootuser> -p
//enter mysql root password, then within mysql console:
use <nextclouddb>;
update oc_storages set id='local::/new/path/to/data/' where id='local::/path/to/data/'; //take care about backslash at the end of path!!
quit;
8. sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --off
to move my datadir, all good. The I used the ncp-config script to move the db, and that too went well.
So then I scp’d the most recent backup over from the pi and dropped that in my backup partition on the R64, pointed the restore script at it and crossed my fingers.
[ nc-restore ]
check free space...
extracting backup file /media/ncbackup_mount/nextcloud-bkp_20190608_1559962582.tar...
restore files...
restore database...
restore datadir to /media/USBdrive/ncdata...
Bastard. /media/USBdrive/ncdata is the datadir of the RPi instance. The R64 is /media/ncdata_mount.
The script forged ahead anyway, made a folder called USBdrive/ncdata on the 8GB uSD card, filled it up and crashed the system.
Start again. This time I’ll make my mount point names match the RPi instance