Database completely reset randomly

System Information
  • Strapi Version: 4.1.7
  • Operating System: Amazon Linux 2/5.5.2
  • Database: PostgreSQL 12
  • Node Version: 14.19.1
  • NPM Version:
  • Yarn Version:

Strapi v4 is setup on ElasticBeanstalk with RDS (PostgreSQL).
It runs in development mode with command

NODE_ENV=production npm run build && NODE_ENV=production npm run develop

Occasionally (already 3rd time), database has completely reset, all content and categories, users etc removed. Only thing that’s left is admin user and API key.

Please suggest what can be an issue here or where to look for.
Thank you

bump, anyone can suggest anything to try out ?

I am experience something similar but not entire reset.
I have users and a few datasets left but majority is being reset when I add dependent package while running strapi dev mode.
I have typescript setup for my dev env and I suspect that’s the reason.