How to move data base in NextCloud?

Hi,
I am absolutely brand new to NextCloud.
I have installed NextCloudPi on my Rasberry Pi 3B on Rasbian Buster using command curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash

I have attached Sandisk Pendrive 128 Gb to my Rasberry Pi.
How can i move my NextCloud Data base to this pendrive ?
Could you help me and guide me step by step ?

When you say data base, do you mean the actual database that may be MySQL or MariaDB, or do you mean the actual data folder, that is referenced in the config.php file? The entry is “datadirectory”.

I suspect the second, but please specify.

What is the path of the mounted pendrive?

Second one, I meant data folder.
Path /dev/sda/

Careful, there’s hardcoded paths all over the DB tables pointing to the full data path. If you change the data dir in your config, you will also need to scrub your database manually doing a find/replace anywhere it references the old path. Suffice to say this is not supported. On the other hand, I have done this with success (NC11 I think).
A cheap trick is to just mount your new directory into your current data directory.
If this is a relatively new install, my recommendation would be to build a completely new instance with the desired data dir and move your data afterward. Plan ahead so you will never need to change the data dir.

/dev/sda is the device path. You have to mount it to a local directory. Did you do this? The entry can be made permanent in /etc/fstab.
Which file system is on your pendrive?