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
- coolify docs dont help installing latest...
coolify has older version of appwrite, how do i install latest version of appwrite
- Unable to create records with other user...
are we able to create records in collections with permissions of different user than the caller of this request? (with document security on) I have backend func...
- 500 Internal Error when Project is opene...
After migrating from 1.6.1 to 1.7.4 I noticed this strange behaviour: When I open a project in a separate tab I get a 500 internal error. However, then I simpl...