Hi! So, I was trying to create some indexes, here's what I did:
- Pull all the collections data using
appwrite init collection --all - Add some indexes in the
appwrite.jsonfile - Run
appwrite deploy collectionThat removed all the attributes, but recreated them as well according to theappwrite.jsonfile. But unfortunately, while the documents remain, all the attribute values are gone. How can I recover them? This is super important. I'm using Appwrite cloud.
Sounds like you lost data after redeploying your collection using the Appwrite CLI. This is because the attributes are deleted and recreated.
As for restoring the data, do you have any sort of backup of the data? Like exported using server SDK and stored as JSON or something?
No, unfortunately I don't have a backup.
There was a warning, that I "might" lose some data. I thought the implications were that, I would only lose data for the attributes I removed, since I wasn't removing any, I thought my data would still be there.
This is why cloud should have backups too
Sorry not much can be done then.
How do one do this as to be on safer side always
Don't use the CLI to deploy collections if you already have data you care about in those collections
ok, though I use console not cli
but can you be clearer? So I don't make mistakes
I mean appwrite deploy collection. See https://appwrite.io/docs/command-line-deployment#deployCollections
@dammy Can I mark this as solved?
Or do you need additional help?
Sure
If he's satisfied
Also, sorry for the data lost
I've thought you where the original poster 😅
thanks for sympathizing with him
@nightwielder Do you need additional help?
It's so sad losing data. Lived that and it's probably one of the most undesirable situations I've had in my life. That's why I do backups following 3,2,1 methodology now 😅
Yes, you can. We are in the same team.
Okay, and sorry again 😢
[CLOSED] I lost data. HELP.
Recommended threads
- unlike any other provider, your sites DN...
your nameservers dont work with a funny little CNAME error, which is a weird bug but thats what you get when you try to be the kitchen sink, funny errors.
- Weird Table Causes Console to break
I dont even know how this even happened looks like the $createdAt and , $id got switched? <@831428608895615056>
- I recently switched to TablesDb. When li...
olddb.list_documents( queries =[ Query.order_desc("timestamp"), Query.equal("isPosted",[False]) ] ) Above works fine and reruns documents But below don't return...