Back

[CLOSED] I lost data. HELP.

  • 0
  • Databases
  • Cloud
nightwielder
25 Aug, 2023, 16:06

Hi! So, I was trying to create some indexes, here's what I did:

  1. Pull all the collections data using appwrite init collection --all
  2. Add some indexes in the appwrite.json file
  3. Run appwrite deploy collection That removed all the attributes, but recreated them as well according to the appwrite.json file. 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.
TL;DR
User lost data while redeploying a collection using the Appwrite CLI. They thought they would only lose data for removed attributes, but all attribute values are gone. They do not have a backup. Solution: It is recommended to create backups using the server SDK and store them as JSON or similar. Unfortunately, in this case, there is no solution for data recovery.
Drake
25 Aug, 2023, 18:22

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?

nightwielder
25 Aug, 2023, 19:15

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.

D5
25 Aug, 2023, 19:18

This is why cloud should have backups too

Drake
25 Aug, 2023, 19:21

Sorry not much can be done then.

dammy
25 Aug, 2023, 21:22

How do one do this as to be on safer side always

Drake
25 Aug, 2023, 21:29

Don't use the CLI to deploy collections if you already have data you care about in those collections

dammy
25 Aug, 2023, 21:30

ok, though I use console not cli

but can you be clearer? So I don't make mistakes

Drake
25 Aug, 2023, 22:02
D5
25 Aug, 2023, 22:42

@dammy Can I mark this as solved?

D5
25 Aug, 2023, 22:42

Or do you need additional help?

dammy
25 Aug, 2023, 22:42

Sure

dammy
25 Aug, 2023, 22:43

If he's satisfied

D5
25 Aug, 2023, 22:43

Also, sorry for the data lost

D5
25 Aug, 2023, 22:43

I've thought you where the original poster 😅

dammy
25 Aug, 2023, 22:44

thanks for sympathizing with him

D5
25 Aug, 2023, 22:44

@nightwielder Do you need additional help?

D5
25 Aug, 2023, 22:45

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 😅

Friend
26 Aug, 2023, 14:20

Yes, you can. We are in the same team.

D5
26 Aug, 2023, 14:25

Okay, and sorry again 😢

D5
26 Aug, 2023, 14:25

[CLOSED] I lost data. HELP.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more