Getting Started
Getting Started
Follow these steps to get started with RosettaDB:
1. Download and initialize RosettaDB
Linux/MacOS:
- Linux (x64): Compatible with 64-bit Intel/AMD processors.
- MacOS (x64): For Intel-based Mac systems.
- MacOS (Arch64): For Apple Silicon (M1/M2) Mac systems.
Run the following command to download and set up RosettaDB:
curl -L "https://github.com/AdaptiveScale/rosetta/releases/download/v2.6.0/rosetta_setup.sh" -o rosetta_setup && chmod u+x rosetta_setup && ./rosetta_setup
Windows (x64)
Compatible with 64-bit Intel/AMD processors running Windows
curl -L "https://github.com/AdaptiveScale/rosetta/releases/download/v2.6.0/rosetta_setup.bat" -o rosetta_setup.bat && .\rosetta_setup.bat
2. Initialize a New Project
This step is automatically executed if you completed Step #1.
Create a new RosettaDB project with the following command:
rosetta init database-migration
This will create a database-migration
directory containing the main.conf
file, which is used to configure connections to data sources.
The rosetta init
command also prompts you to specify source and target databases and automatically downloads the necessary drivers.
3. Configure connections in main.conf
An example configuration for connecting to PostgreSQL and MySQL:
# Automatically commit and push changes if linked to a Git repository (default: false).
git_auto_commit: false
connections:
- name: mysql
databaseName: sakila
schemaName:
dbType: mysql
url: jdbc:mysql://root:sakila@localhost:3306/sakila
userName: root
password: sakila
- name: pg
databaseName: postgres
schemaName: public
dbType: postgres
url: jdbc:postgresql://localhost:5432/postgres?user=postgres&password=sakila
userName: postgres
password: sakila
4. Extract and Transpile Your Schemas
Extract the schema from PostgreSQL and transpile it to MySQL:
rosetta extract -s pg -t mysql
Migrate the translated schema to the target MySQL database:
rosetta apply -s mysql
Need More Help?
For detailed installation instructions and advanced setup, refer to the Installation Guide here.