Database Upgrade & Migration
How to migrate an older unCoded-bot database to the latest version.
Upgrade your unCoded version
How to migrate an older bot database to the latest version. Step-by-step guide to migrating an older bot database to the latest version. Learn how to safely migrate an older bot database to the newest version.
Before performing any new installation, make sure to back up your old database first. See Step 4.
If you already know how to use DBeaver, jump to: Restore the old database to the new bot.
🖥️ Server configuration
Make sure you have already installed the latest Linux version, including CapRover integration, on your server.
If not, please follow the correct setup guide here: Setup your Server.
🤖 Create an unCoded bot
Create a new trading bot in unCoded. You can find the detailed instructions here: Create your unCoded Bot.
Make sure you are signed in to the website with your Google account.
Also make sure that you have added your Binance UID.
🗂️ Prepare your Database
This guide is based on DBeaver, but other database tools can be used as well.
Download the software to your device and install it.
Open the database port for DBeaver
Before downloading the database, you need to expose a port for DBeaver first.
In your bot, open “YOUR-BOT-NAME-db”.

Then navigate to “App Configuration” and add a Port mapping.

Set both fields to "5432".
Click Save & Restart to apply the changes.
🛜 Connect DBeaver to your database and Backup your Data
Now connect your database to DBeaver to gain access.
Open DBeaver and click “New Database Connection” in the top left corner.

Select "PostgreSQL"and click “Next”.

Then enter the following details:
Host: Your server IP
Port:
5432Authentication → Password: Your
POSTGRES_PASSWORDfrom CapRover
Click “Finish”.

Your server should now appear in the left sidebar. Select it and click “Connect” in the top left corner. If the connection is successful, a green checkmark will appear and you will be able to open the database.
Open the database named uncoded_db.

If it does not appear, right-click your server connection and select “Edit Connection”.

Then enable “Show all databases” and press "OK". Reconnect your Database.

After that, uncoded_db should be visible.
Right-click the database and select Tools → Global Backup.

Choose the database and click “Next”.

Under “Output folder”, select the location where the backup should be saved and give the backup file any name you want.
Then click “Start”. Your database will now be backed up to your device.

Repeat the database connection steps for the new app so you can restore the backup there.
⚙️ Restore the old database to the new bot
Once you have successfully connected the new bot to DBeaver, right-click the uncoded_db database you want to replace, then select Tools → Restore.

Enable "Clean Database", then select the backup file from your computer. After that, click "Start".

Once the restore is complete, restart your unCoded trading bot in your Caprover App. The migration is now finished.
HAPPY TRADING!
Last updated