
Hello, is there an easy way to export the entire data of just a single collection using the cli or docker mariadb commands other than querying from api?
Example I have a Tasks and Projects collection, I just want to export all data from the Tasks collection using cli.

I did this with cloud function. it goes through all the documents of a collection and inserts in a csv. At the end save the file in storage. Help you?


@hosni.hotelkilow can we Mark it as solved?

Hello! Sorry I forgot to get back, thank you for this snippet ill use it as reference soon. In the end what I did was to echo out from the mariadb container as I did't want to call the api for it, I had to figure out the correct table name though
docker exec appwrite-mariadb sh -c 'exec mysql -B -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" appwrite -e "SELECT * FROM _1_database_1_collection_6;"' \
| sed "s/\"/\"\"/g;s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > medias.csv

[SOLVED] Export Entire Data of Collection
Recommended threads
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
- 1.7.0 Self Hosted Upgrade
Hi, I've tried a fresh install on 1.7.0 and I've also done a fresh install on 1.6.2. 1.6.2 is working fine fresh, update to 1.7.0 and migrate fails Fresh inst...
- Functions not work on Server only Localh...
Hi, I successfully upgraded from 1.4 to 1.7, but I'm having a problem. The functions no longer work with the settings I had. I assume some changes were made. It...
