Back4App

How can I migrate my Parse Server App to Back4App?

Introduction

Thinking about migrating an existing Parse app to Back4App?

If you are a Parse user looking for a suitable Backend-as-a-Service (Baas) replacement, Back4App might be an ideal choice for your Parse server app. In this guide, we will show you in practice how you can Migrate an existing Parse App and tens of thousands of on-premises workloads to Back4App smoothly.

Prerequisites

To begin with this tutorial, you will need:

How will the Migration work?

In this, the migration process is divided into two steps: Database Migration and File Migration. Parse Server uses MongoDB to store data so we will need to set-up our own database first for starting the migration. And later, we will complete this process by moving the files such as images and pdf documents to the storage.

Step 1 - Create a New Back4App App

First of all, it’s necessary to make sure that you have an existing existing app created at Back4App. However, if you area a new user, you can check this tutorial to learn how to create one.

Step 2 - Checking your Database

The very first and most important step is to check the Database infrastructure of your previous BaaS provider. Go to the database section of your current hosting account’s control panel and locate your Connection String and copy the code. This string will help us export data from Parse database into self-hosted MongoDB of the Back4App. In order to do so, follow the instructions given below:

Open your Back4App Dashboard, go to the Server Settings > Core Settings > Settings and then scroll to the bottom of the page to spot shown in the image:

Owner Account

Next, click on the button Edit details, go to the (MongoDB Database URI) and click on Change database URI link. By doing so, you will be able to replace the Connection String with the same that you copied above earlier from your application.

Step 3 - Upload your Cloud Code

If your app has Cloud Code files, you will need to upload these files under the cloud directory. To make sure that all the files are working perfectly work without a glitch. You can update your Coud Code files using our CLI (Command Line Interface) Tool or upload them directly from Server Settings > Cloud Code > Settings. The logs with respect to the cloud code will appear in the Server Settings > Logs > Settings > Server System Log.

Until this step we are preventing any trouble that can happen before to migrate your Parse App completely to us!

Step 4 - Migrate your Parse Files

Our servers are located at Amazon AWS, and if you have AWS S3 files from your App, we’ll need to migrate them to the object storage. Pack all the objects into a zip file or within your S3 bucket and send it to us to migrate them for you.

Note: If you have files saved directly on Mongo, please, let us know, because we will need to modify some things to “accept” them in your app.

If you are using any another service, it’s required to send a Zip file comprising your files to our team.

Step 5 - Updating your frontend!

Now, you need to modify your Frontend in order to update the keys and server URL of your app and release a new version. In this scenario, you have two versions of your app: a new one with Back4App and the old one that uses Parse. There will be two situations regarding it:

  • The non-updated users will be still appointed to your “old” database and any change they make will appear in both databases.
  • The updated users will be appointed to Back4app only and the changes will not appear in the old database.

Step 6 - To finish the process

Before initializing this process, make sure you absolutely comfortable about migrating your database to us. In our side, this means when you have a large number of Frontend upgraded and when the files have been migrated to Back4App. For that, we’ll be requiring your old connection string and your app ID (Back4app), and then we’ll migrate your data. By migrating your database to Back4App, you will be able to:

  • Increase performance of queries (and thereby your app) by devoting large amounts of dedicated processing power and memory to your database
  • Eliminate the risk of another app impacting the performance of your app’s queries
  • Gain direct, raw access to your application’s data
  • Modify, add, or fine-tune indexes on your most popular or complex queries

It’s done!

With the guide described above, you’ll be able to migrate your Parse App to the Back4App and work with our various full-fledged, excellent features!

In case you need any help or a link doesn’t work, please contact our team via chat!