Back

Database Migration Failure Between Two Appwrite Instances (Both on Version 1.5.5)

  • 1
  • Self Hosted
Husnain_bashir
2 May, 2024, 12:14

I am attempting to migrate data for backup purposes from our production Appwrite server to another server, but I consistently encounter migration failures specifically related to databases. Details:

  • Initial Issue: No activity logs were visible in the console.
  • Diagnostic Steps: After consulting community posts and inspecting our worker audit logs, we discovered errors related to "missing internal IDs."
  • Background: It seems we missed a crucial migration step after the release of a patch in version 1.3.8, which was supposed to address this issue.
  • Support Advice: Following the recommendation of the Appwrite support team on GitHub, we planned to downgrade to version 1.3.8 from 1.5.5.
  • Safety Measures: To prevent downtime, we are redirecting traffic to our backup server and attempting to migrate the databases there first, so we can apply the necessary fixes to the production server safely.
  • Current Problem: During the migration process, we received an error indicating the migration had failed.

Migration Log Output:

TypeScript
{
  "$id": "66337e2226451aa88066",
  "$createdAt": "2024-05-02T11:50:58.157+00:00",
  "$updatedAt": "2024-05-02T11:52:56.707+00:00",
  "status": "failed",
  "stage": "finished",
  "source": "Appwrite",
  "resources": ["database", "collection", "attribute", "index", "document"],
  "statusCounters": {
    "database": {"pending": 0, "success": 8, "error": 0, "skip": 0},
    "collection": {"pending": 1185, "success": 139, "error": 0, "skip": 0},
    "attribute": {"pending": 845, "success": 0, "error": 0, "skip": 0},
    "document": {"pending": 4611, "success": 0, "error": 0, "skip": 0}
  },
  "errors": ["Call to a member function getId() on null"]
}

I appreciate any guidance or suggestions from the community. Thank you!

TL;DR
Database migration between Appwrite instances on version 1.5.5 is failing due to missing internal IDs. The solution is to downgrade to version 1.3.8 as recommended by Appwrite support. Ensure redirection of traffic to the backup server to avoid downtime and apply fixes there first before attempting migration on the production server. Error log indicates a specific error related to "Call to a member function getId() on null."
Raman
2 May, 2024, 12:33

Well it's hapenning with us also

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more