It’s fairly simple.
1. The files for each user are located in the “files” directory you created when setting up the script. This would be /mnt/poolname/nextcloud/files/user1/files (this is just an example, but the files are in the nextcloud dataset)
2. The files from the old jail will be at /mnt/poolname/iocage/jails/nextcloud/root/pathtouser1/files
You will need to copy the files from inside the files folder from each user into the files folder of the new dataset you created.
Example
Inside Nextcloud you create 13 users with the same names (the new names can be different, just be sure to copy the correct files). Then you copy all the files from /jail/user1/files to the dataset /nextcloud/files/user1/files
I don’t exactly know where the files for the users are inside the plug-in jail, you you will have to adjust the paths accordingly.
Once this is done you can run this string from the command line inside the jail.
su -m www -c "php /usr/local/www/nextcloud/occ files:scan --all
to scan the files into the database.