How to create persistent containers?

Hi,

I have a Raspberry Pi 4 and I have successfully installed OwnCloud, I have trouble setting the persistnet containers as I’m a casual coder and computers is not my full time job.

I have followed this:

https://doc.owncloud.com/server/admin_manual/installation/docker/

This part is confusing

All files stored in this setup are contained in Docker volumes, rather than a physical filesystem tree. It is the admin’s responsibility to persist the files. Use, e.g., docker volume ls | grep ownclouddockerserver to inspect the volumes. Use e.g., docker run -v ownclouddockerserver_files:/mnt ubuntu tar cf - -C /mnt . > files.tar to export the files as a tar archive.

In the YML file I have see the location for data on an external drive, why does this need to happen again? I don’t get it.

I have tried to use the volume section and changing it to:

Volumes:
  - /media/Data:/my/mount/point

But it doesn’t work, any ideas on how to change the data to move to the external disk?