Parse migration tool
If you hosted your app on Parse and are now aware of the fact that Parse is shutting down by Jan 2017, you should be searching an alternative to Parse. Parse has open-sourced their technology and paved a way to migrate your app’s backend to another BaaS provider. Back4app is one of the best BaaS providers that can efficiently support IoT, mobile apps or API’s. Try it out right away as the deadline for data migration has elapsed and you must be getting minor traffic on your app.
Even if you are looking for developing a new app, Back4app has an easy wizard to create and maintain your app. Back4app still supports Parse SDK and offers most features that were loved by Parse users including Push notifications on Dashboard, Global Config, Hooks, automatic emails, and cloud code.
Easy and quick data migration
Parse announced its shut down in January 2016. They released a database migration tool that lets you migrate your data from Parse to a self-hosted MongoDB and suggested to complete the migration by April 28th, 2016 failing which your app’s traffic will be given lower priority. This deadline has passed. The next step according to their suggestion was to release a new app pointing to the new backend by July 28th, 2016. Also, as promised, Parse has open-sourced their server so that you run most of the Parse API from your own Node.js server. We have talked about the Pros and Cons of self-hosting and Parse hosting pros and cons of self-hosting and Parse hosting providers in our previous blog.
If you are convinced about using a Parse hosting provider, you should try Back4app. It provides an easy wizard to migrate your data from Parse to Back4app and all you need is five minutes to complete this task. You can read the Parse migration guide to know more about data migration. Once your data is migrated you can use the latest Parse SDK version pointing to the new Back4app API address and continue to use the Parse client SDKs
Four simple steps to migrate
If you are not a Back4app user yet, sign up by and create your account, else sign in with your user credentials.
Fill in some basic information such as email, password, confirm the password, accept the terms of service and you become a Back4app user.
Once you sign in, you will be taken to the dashboard.
Click on the Migrate Parse App button.
You are taken to the Parse Migration Wizard.
You will need to fill in your App Id and App Name. If you are not aware of these details, you can get it from the Parse dashboard. Click on the app that you would like to migrate. Go to Security & Keys under App Settings. You will have the App Id and App Name here.
Here’s how you can find the App Id and App Name
On filling the details and clicking the Next button, Back4app will create the backend for your app by setting up the Database and Parse Server.
The wizard will inform you about the creation of the infrastructure for your app. It will also display the new URI for your database. Make a note of it and go back to the Parse dashboard.
Here’s how Back4app manages to migrate your app’s data.
As per Parse recommendation, it is better to point your app to a server that is not dependent on Parse. The first step in this migration is the Database migration. Parse uses MongoDB for the backend. So users can try setting up a MongoDB instance that conforms to the database specifications which has its own pros and cons or rely on BaaS like Back4app for data migration.
Here are few things that should be considered before migration.
Due to data being compressed in the hosted Parse database, the size of the hosted database should be at least three times the current amount of data storage your app is using. The Analytics overview page can give the information on data usage.
The user in the connection string should have admin privileges. If the user in the connection string does not have admin privileges, the failIndexKeyTooLong parameter should be set to false. It can be changed back to true after the migration is completed.
Latency between Parse and your self-hosted MongoDB should not exceed 20ms. Back4app has the DB instance in US East. So it will not create any latency issue.
Once you finalize the migration, you can trim down your data, drop duplicated indexes, and finally downsize your instance. You may have to pay more for a high-performance line. But it’s worth over-provisioning your database during the migration. If your migration job takes to long to achieve sync, you’re probably using insufficient hardware.
To start your migration, go to App Settings -> General, where you will find the subtitle Migrate to External Database.
Once you are there, insert the database URI that you made note of earlier.
Parse will start the Database migration. Connections from Parse’s servers will use IP addresses in the following range: 18.104.22.168/20
Mainly three processes happen.
Copy Snapshot – The database migration tool first takes a snapshot of your existing data and transfers it to the Back4app’s database instance.
You can keep track of the progress.
Sync – Next, it will pause to allow manual verification, while continuing to maintain things in sync with writes that are coming in from your live app. While you are in this state, your app continues to read and write from your Parse hosted database.
Verify – Connect to the Mongo instance and browse through the collections in the newly created database. Check the collection counts and do a few spot checks to ensure that your data was migrated successfully.
You may stop the migration and try again as many times as you need (until you click on Finalize). The tool will keep things in sync for up to 24 hours after the migration started. You can go to App Settings → General → Migrate to an external database and click on “Migrate” to start over after cleaning up your target database.
Once you’re satisfied with the database migration, you can finalize the transfer in the migration UI and your app will be using the new MongoDB instance.
Once you finish migration from the Parse dashboard go to Back4app wizard and check I completed and tested my database migration and click Next button.
That completes the database migration.
Now you have your data in Back4app’s database, and you can see it anytime in Core -> Migration what you have migrated.
These keys are the unique identifiers used to access each app. Each app has its own keys.
Why we need Parse’s apps keys to migrate your app?
If you don’t choose to import your parse keys, we will generate new ones for you. Either of the two options, as you migrate your Parse app to our platform, no data will be lost.
Where I can find them?
You can find them following our’s steps.
Once you are in your Parse’s dashboard, choose the app you want to migrate and click on it. Go to App Settings -> Security & Keys, where you will find all the keys required to complete your migration.
After copy the Keys you should paste on the screen bellow:
The final step is to update your application with the new API address. The latest version of Parse SDK supports updating the API address. Install it and update your app and start using the Back4app API. Here’s how you can update the Parse SDK how you can install the Parse SDK and update your API address.
Click on the Finish button and that concludes the app migration.
Once you are done, all the details about the app such as App Id, App Name, Parse API address, and Database URI are presented.
5-Verify your data on Back4app dashboard
Your app is listed under “Apps” on the Back4app Dashboard.
Click on the View app button to see your App Management panel.
You get the App Id and App Name and the App Management panel. You can add the new features from this dashboard.
To know more about Back4app click here. Share it with your friends, especially if they are in need of a BaaS provider!