You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firestore数据库突发删除求助:数据恢复与原因排查

Firestore数据库全部数据消失,请求排查原因及恢复方案

本地测试新开发功能时,发现对Firestore数据库的请求无任何反馈。登录Firebase项目控制台查看后,确认数据库及所有文档、记录已完全消失。

当前影响

  • 用户仅能完成认证操作,无法使用依赖Firestore数据的其他功能
  • 项目进度受阻,新功能无法开展测试

已采取行动

已联系谷歌官方,但尚未收到回复

需求

  1. 排查Firestore数据库被删除的可能原因
  2. 确认是否可以恢复数据库及全部文档、记录(数据恢复至关重要,绝不可接受数据丢失)

相关代码片段

firebase.service.ts

async getCustomerProjects(customerId) {
    const querySnapshot = await this.db
      .collection("projects", (ref) =>
        ref.where("customer", "==", customerId)
      )
      .get()
      .toPromise();

    const projects = [];
    querySnapshot.forEach((doc) => {
      const project: any = doc.data();
      project.id = doc.id;
      projects.push(project);
    });

    return projects;
  }

integration.component.ts

this.customerSubscription = this._storageService
      .getSelectedCustomer()
      .subscribe(async (customer) => {
        this.selectedCustomer = customer;
        if (customer) {
          const customerProjects = await this.firebaseService.getCustomerProjects(customer.id);
          this.showContent = false;
          if (customerProjects.length > 0) {
            this.showSelectProject = true;
            this.showCustomerHasNoProject = false;
            this.showProjectHasNoCampaign = false;
          } else {
            this.showSelectProject = false;
            this.showCustomerHasNoProject = true;
            this.showProjectHasNoCampaign = false;
          }
        }
      });

内容的提问来源于stack exchange,提问作者Ricardo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 11:12:42