Error production-urgent

Hi, I have deployed my erpnext on AWS Linux ec2 instance. However when I try to set up production by “Sudo bench setup production” it returns that my site_config.json is broken. I went into my site which is site1.local and tried to open site_config.json but I don’t know why it is empty. How can I solve this problem? I tried to write the contents of site_config.json but how do I write the DB password and the encryption key which are in hashed form. Is there any way to rebuild my site_config.json automatically.

Somebody pls help me, I’m stuck!

You may try this method to recover the database

  1. Check the site1.local database name by accessing the database server

mysql -uroot -p

  1. Dump the database

mysqldump -uroot -p [database_name] > dump.sql

  1. Create new site and restore the database dump to the new site

bench new-site site2.local
bench --site site2.local --force restore ./dump.sql

*unfortunately you may not be able to recover the deleted hash