Reputation: 406
I have successfully migrated my parse db to aws but the urls of image files still like http://files.parsetfss.com/77447afb-f681-4b55-afad-6bceeb2e155a/tfss-79297c86-bd48-4d7f-87ab-c43e02d1a8f3-photo.png
it means files are still on parse s3 cloud or something their own storage so what will happen to those files after parse shutdown. what is the way to migrate the images to new database/storage on my own AWS. I am worried because I have apprx 14.5 k images on parse.
Please provide you valuable guidance on this.
Upvotes: 3
Views: 1261
Reputation: 1559
As you know, Parse Files is a feature allowing developers to upload files (up to 10 megabytes each) and reference those files from objects in Parse Core data classes or directly by URL provided in the API response from Parse.
Behind-the-scenes, Parse is uploading your files to a Parse-owned S3 bucket (files.parsetfss.com) and prefixing the file objects with your application “File key”.
To answer your questions directly, there's active solutions in-the-works and here’s the latest addressing the migration and optional Parse File storage options post migration.
How do I migrated my legacy Parse Files over to Parse Sever? Migrating legacy Parse Files from Parse-owned S3 bucket to developer-owned Parse Sever: https://github.com/ParsePlatform/parse-server/issues/8
What NON database options do I have for storing my Parse Files after migrating to Parse Server? Add support to upload Parse Files directly to Amazon Simple Storage (S3) via S3 adapter running Parse Server: https://github.com/ParsePlatform/parse-server/pull/113
Migration Considerations for Parse Files: When a user first uploads a file, Parse service uploads it to files.parsetfss.com and responds with a link directly to the file. At this point, there is NO POINTER or METADATA referencing this file object in Parse Core or other data classes. The developer would need to keep a reference to this file in their own data class OR make another API call to create an object or update an existing object and associate the Parse File with that object. Otherwise, the file is orphaned. Parse does allow you to "Clean Up Files" in the App Settings of your application. This option will delete any files that are not referenced by any objects. Orphaned files can only be deleted by using the Master Key and there is currently no way to search ALL your uploaded Parse Files per account or application unless it’s associated with a class object.
What happens to EXISTING Parse Files during the migration to Parse Server? During the migration, the files stay on Parse's S3 bucket, but the newly migrated Parse Server knows how to continue serving them up post migration. NO FILES HAVE BEEN MIGRATED! Only the pointers to the S3 bucket owned by Parse AND only if those files are associated with an object. So, if the developer DOES NOT MIGRATE the “legacy” pre-migration Parse Files from Parse prior to Parse shutdown in 2017, they could lose access to these files. Parse and the open source Parse Server community is ACTIVELY working on providing migration solutions. See here.
What happens to NEW Parse Files uploaded after the migration to Parse Server? New Parse Files uploaded to a Parse Server after migration are hosted in MongoDB GridStore(Mongo). Only files uploaded through api.parse.com API endpoint are hosted by Parse. In other words, if you migrated your app to Parse Server but have not updated the clients to use the new Parse Server API endpoint, those Parse Files will still get uploaded to the Parse owned S3 bucket. For those clients that upload Parse Files using their new Parse Server API endpoint, the files will be stored directly into the developers MongoDB database.
I hope you found this information useful.
Upvotes: 16