First, update your system and install the required tools:
sudo apt update -y && sudo apt upgrade -y
sudo apt install -y python3 python3-pip python3-venv unzip wget git
This tool exports Admins, Users, and JWT keys from Marzban.
- Install Uv:
export PIP_BREAK_SYSTEM_PACKAGES=1
pip install uv
-
Prepare the Database:
- SQLite: Ensure Marzban is stopped.
- MySQL: Have your database credentials ready.
-
Download and Run:
cd && git clone https://github.com/erfjab/migration.git && cd migration && uv sync && uv run app/export/export.py
- Save marzban.json file your pc
This will generate a marzban.json
file with the exported data. For the next step, upload this file to the /root/import
directory.
- Delete Files
rm -rf /root/migration