Database Migration
Learn how to migrate the database, from the old Iancu Sniper's Business-Bot to the New one!
Only do these steps if you were using the old version of the Business Bot. Note that this only works for our official version of the Bot, it will NOT work with any other ones rather than our official.
Download
First, you need to download the files necessary, download by clicking here
Config
Learn how to configure the Migration script!
You will notice an .env
file in the download. That's the Config File. You will notice this content:
-
MONGO_URL: This is the connection link to your MongoDB database
-
DATABASE_OLD: This is the collection name of the old database, containing data that will have to be merged
-
DATABASE_NEW: This is the collection name of the new database. Note that you need to make sure this is a new collection, which doesn't exist already. This is the collection you are going to use in the new business bot
How do I find the MongoDB connection link
Jump on MongoDB Dashboard and LOGIN. You will be redirected to an Overview page. If you are not, then look on the left panel, and click "Overview". This page will show you an overview of your Database Cluster(s).
Locate the "Connect" button on your Database Cluster and follow these steps:
1: Click the "Connect" button, a popup will appear.
2: Press "Drivers" and make sure you have chosen "Go" Driver (for Version, the latest stable version is fine). Untoggle (make sure it's disabled) the "View full code sample" switch, so you only see the URL. Now you can copy the URL (usually in a format like: mongodb+srv://username:<password>@cluster/?retryWrites=true&w=majority
).
3: You will need to replace <password>
(<
and >
included) with the password of the user that has access to the database. Note: This is NOT the account password. If you close the popup, on the left panel you will see under Security a tab called Database Access, that's where you will see the user details. If you do not know the password, then you might want to "Edit" and set a new password for the user.
Database OLD
This is the collection name of the old database, containing data that will have to be merged. You must know which one it is already, but if you don't then follow these steps.
1: Browse Cluster Collections
2: You'll see a list of Collections. Find out which is the one that your (old) Business Bot has been using until now, and there you have it's name.
Database NEW
This is the collection name of the new database. Note that you need to make sure this is a new collection, which doesn't exist already. This is the collection you are going to use in the new business bot!
Merge
After you've configured the .env
, just run the script (the .exe
) file, and it will start merging the database. This process might take a while.
The existing keys will be merged, same with order details. The existing queue members will be refunded remaining claims in their bank.
After you're done merging, Browse collections and see if it merged successfully. If it failed (which happens really rarely), just delete the new collection, and retry.