I use a SQLITE database but it gets reset every time

My flask website uses a sqlite database to store the messages, but what happens is that after a period of time, the database gets reset and all the data gets deleted, is there some way to prevent that file from being deleted?

Hey!

A feature exists for that. You can use koyeb CLI’s koyeb instances cp .

First, you need to install the koyeb CLI: Installing the Koyeb CLI | Koyeb.

Then, login using koyeb login.

Finally, use the koyeb cp command:

  • To copy a file from your local machine to a remote koyeb instance: koyeb instance cp file.txt <instance_id>:/tmp/
  • To copy a file form your koyeb instance to your local machine koyeb instance cp <instance_id>:/tmp/file.txt .

If you’re looking for your instance id, you can get it by running koyeb instances list

I see that you edited your question.

SQlite uses local storage and Koyeb does not offer persistent local storage on the Instances. I would suggest you to create a Database service: Databases | Koyeb. You can get a small one for free.