Back

Collections and functions data are missing out of a sudden

  • 0
  • Cloud
kennyki
16 Jul, 2023, 10:48

😢

TL;DR
Title: Collections and functions data missing, possible bug with database creation Messages: User is experiencing missing data in collections and functions. User asks if backup and restore features are available and if there is a UI button for them. User also mentions a code snippet related to database creation and wonders if it should delete and recreate the same database if it already exists. User suspects that the problem may be related to things being deleted and recreated with the same ID. User discovers that the main database was deleted on a specific date and realizes that the issue may only be visible in the console. User requests access to the activity for their console account. User clar
Drake
16 Jul, 2023, 15:33

Are you doing any deletes anywhere?

kennyki
16 Jul, 2023, 17:18

no, I don't

Drake
16 Jul, 2023, 18:09

Wait the project id isn't tinyhands-dev 👀 this is a different project than from the original post

kennyki
17 Jul, 2023, 16:14

yes, I created a separate project (still keeping the old one) just to ensure a clean slate, but the same issue happen again on the new project, albeit after a longer period

kennyki
17 Jul, 2023, 16:15

I have another project used for the hackathon, that is unaffected and everything is still fine for it

Drake
17 Jul, 2023, 16:54

Can you share the activity for your console account? You should be able to get to it by clicking the top right drop down > my account > activity

kennyki
17 Jul, 2023, 17:10

sure

kennyki
17 Jul, 2023, 17:10
Drake
17 Jul, 2023, 17:54

doh..i think this actually only shows for the console and not for the projects 😣

Drake
17 Jul, 2023, 18:22

ok so looks like that main database was deleted on 2023-07-15T15:48:01.845764809Z

Drake
17 Jul, 2023, 18:52

Ok so I think I found the problem....it seems like it has to do with things being deleted and recreated with the same ID

kennyki
18 Jul, 2023, 01:50

cool, where do you see that? and what/who is deleting them?

kennyki
18 Jul, 2023, 02:15

I have this code in my bootstrap script:

TypeScript
try {
  db = await databases.get(process.env.DB_ID)
} catch (error) {
  db = await databases.create(process.env.DB_ID, process.env.DB_NAME)
}

The ENV vars are

TypeScript
DB_NAME=Main
DB_ID=main

I think it shouldn't delete and recreate the same database if one exists, right?

Drake
18 Jul, 2023, 02:53

You're fine. It's a problem with Appwrite. I'm working on a bug fix

Drake
18 Jul, 2023, 02:54

Did you have a GitHub issue for this problem?

kennyki
18 Jul, 2023, 03:26

alright

kennyki
18 Jul, 2023, 03:26

I didn't create an issue for it yet, should I?

Drake
18 Jul, 2023, 03:27

It's okay

kennyki
18 Jul, 2023, 03:29

alright, thank you very much

Olivier Pavie
19 Jul, 2023, 08:05

will this <<backup/restore>> be only available for the cloud ? will there be some button in the Ui for this?

D5
19 Jul, 2023, 08:23

Both

D5
19 Jul, 2023, 08:23

Cloud and self-hosted

Olivier Pavie
19 Jul, 2023, 08:23

Cool, thanks 😊

D5
19 Jul, 2023, 08:24

For now they said there will not be cloud-specific features, except if essential

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