[英]How to recover deleted data from AWS PostgreSQL database for Django project?
I tried to add a new field in my existing Django project.我试图在我现有的 Django 项目中添加一个新字段。 I run the following command to do it:我运行以下命令来执行此操作:
manage.py makemigrations
manage.py migrate appname zero
manage.py makemigration
manage.py migrate
Now I have lost all my previous data from the database (PostgreSQL) for that application.现在我已经从该应用程序的数据库 (PostgreSQL) 中丢失了所有以前的数据。 The migration folder only has the most recent migration file.迁移文件夹只有最新的迁移文件。 How can I retrieve previous data?如何检索以前的数据? I am using AWS PostgreSQL in the project.我在项目中使用 AWS PostgreSQL。 Any help/suggestion will be appreciated.任何帮助/建议将不胜感激。
If you are using AWS RDS,如果您使用的是 AWS RDS,
Check for snapshots of RDS.检查 RDS 的快照。 Then, you can create a new RDS from that snapshot which must be having the schema at the time when snapshot was generated.然后,您可以从该快照创建一个新的 RDS,该快照必须具有生成快照时的架构。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.