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
- Next.js SSR Site Times Out on First Visi...
Hey everyone, I'm running a Next.js SSR site on a self-hosted Appwrite server (v1.9.0), and I've noticed a strange behavior that I'm hoping someone can help me...
- Quota not resetting
hi, im using appwrite's free tier plani hit my read limts last month and the billing cycle said it would reset on june 4th but that is today, the billing cycle ...
- Appwrite migration stuck on pending
Migration an existing self hosted 1.9.0 to a new VPS tuning self hosted 1.9.0.. import data recognises the api url, project id and api and then when I create, i...