-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Bug Report: very slow migration #5891
Comments
Hi! |
@AidenY69, what versions are you upgrading between?
When running migrations, the database schema and documents are updated and Appwrite must iterate over everything. |
Right now I am using these PowerShell scripts because I need to export data into JSON format. That method is simple and guarantee the data to be readable, combinable from deferent sources and storable in Git |
@joeyouss I think JSON format export feature will be quite useful for AppWrite CLI for (const collection of collections) {
console.log(`Making backup of ${collection.$id}`);
await fs.mkdir(`backup/databases/${database.$id}/${collection.$id}`, {
recursive: true,
});
for await (const document of listDocuments(database.$id, collection.$id)) {
console.log(
`Writing ${document.$id} from ${collection.$id} from ${database.$id}`
);
await fs.writeFile(
`backup/databases/${database.$id}/${collection.$id}/${document.$id}.json`,
JSON.stringify(document, null, 2)
);
}
} |
馃憻 Reproduction steps
When upgrading my current AppWrite to the newest version, the migration takes multiple days.
馃憤 Expected behavior
Faster migration regardless of record size
馃憥 Actual Behavior
When upgrading my current AppWrite to the newest version, the migration takes multiple days. I have ~30 million records, but I feel like that shouldn't be impacting the migration since the database itself isn't changing, just the AppWrite code. Is there any solutions on how I can make this process faster, or is there something on AppWrite's end that you can do to optimize large migrations?
The platform has to be down during a migration, and with a 4 day estimation, that's pretty extreme for a scheduled downtime.
馃幉 Appwrite version
Version 1.3.x
馃捇 Operating system
Linux
馃П Your Environment
No response
馃憖 Have you spent some time to check if this issue has been raised before?
馃彚 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: