All Collections
Self-Hosted Setup
Linux Native
Steps to Migrate Data to new Kendis Linux Instance and Externally hosted MongoDB
Steps to Migrate Data to new Kendis Linux Instance and Externally hosted MongoDB

Moving from internal Kendis DB to externally hosted MongoDB server

Kendis Team avatar
Written by Kendis Team
Updated over a week ago

This guide explains the steps you need to take to move your data from Kendis's internally hosted MongoDB to an externally hosted MongoDB with a new Linux Server.

Step 1) Install Kendis on the new Linux Server

  • Follow standard Kendis installation steps and start the server.
    Important: Don't proceed to the sign-up of Kendis account when you see the form (this instruction is also repeated in Step 3)

Step 2) Install MongoDB

Kendis supports MongoDB v 4.4 and v5.0. It's better to install v5.0 or higher

Step 3) Connect Kendis with new MongoDB installed

This is the most important step.

  • Once the Kendis is started with the empty data on your new server, you will see the Sign-up form. You need to IGNORE this and don't register a new account. Follow to the next step to the system area.

  • Go to the System admin area by typing <yourKendisURL>/system
    The default username is sysadmin. In case you don't have those default credentials, ask them from support@kendis.io

  • Now click on the Database Settings tab on the left navigation

  • Fill up the form with all the required details.
    - You must use the Host/URL for MongoDB in this format
    mongodb://<user>:<password>@host/<db>

    e.g., if your host IP is an example 123.122.121.1 then the value would be
    mongodb://<user>:<password>@123.122.121.1/<db>
    In case your MongoDB server has hostname, just replace IP with hostname

  • Once the connection is successful to the MongoDB connection, you can proceed to restore your backup to the externally hosted MongoDB.

How to Restore Data from your backup into MongoDB

  • Get the latest backup file from the host machine where you have Kendis running. Command to take backup is

    > sudo sh bin/backup.sh

    Backup files are created at this location (it may change if you have different Linux version)

    kendis-server-linux-x86_64/bin/kendis/kendis_backup

  • Use the following command to restore the latest backup into MongoDB
    > mongorestore --drop --gzip --archive=<backup-file-name>.tar.gz

Once the restoration is done, just refresh the browser and you should see the login page. You can log in with your username and password that you have for your current setup, it should work without any issues.

Did this answer your question?