Supervisely
AboutAPI ReferenceSDK Reference
  • 🤖What's Supervisely
  • 🚀Ecosystem of Supervisely Apps
  • 💡FAQ
  • 📌Getting started
    • How to import
    • How to annotate
    • How to invite team members
    • How to connect agents
    • How to train models
  • 🔁Import and Export
    • Import
      • Overview
      • Import using Web UI
      • Supported annotation formats
        • Images
          • 🤖Supervisely JSON
          • 🤖Supervisely Blob
          • COCO
          • Yolo
          • Pascal VOC
          • Cityscapes
          • Images with PNG masks
          • Links from CSV, TXT and TSV
          • PDF files to images
          • Multiview images
          • Multispectral images
          • Medical 2D images
          • LabelMe
          • LabelStudio
          • Fisheye
          • High Color Depth
        • Videos
          • Supervisely
        • Pointclouds
          • Supervisely
          • .PCD, .PLY, .LAS, .LAZ pointclouds
          • Lyft
          • nuScenes
          • KITTI 3D
        • Pointcloud Episodes
          • Supervisely
          • .PCD, .PLY, .LAS, .LAZ pointclouds
          • Lyft
          • nuScenes
          • KITTI 360
        • Volumes
          • Supervisely
          • .NRRD, .DCM volumes
          • NIfTI
      • Import sample dataset
      • Import into an existing dataset
      • Import using Team Files
      • Import from Cloud
      • Import using API & SDK
      • Import using agent
    • Migrations
      • Roboflow to Supervisely
      • Labelbox to Supervisely
      • V7 to Supervisely
      • CVAT to Supervisely
    • Export
  • 📂Data Organization
    • Core concepts
    • MLOps Workflow
    • Projects
      • Datasets
      • Definitions
      • Collections
    • Team Files
    • Disk usage & Cleanup
    • Quality Assurance & Statistics
      • Practical applications of statistics
    • Operations with Data
      • Data Filtration
        • How to use advanced filters
      • Pipelines
      • Augmentations
      • Splitting data
      • Converting data
        • Convert to COCO
        • Convert to YOLO
        • Convert to Pascal VOC
    • Data Commander
      • Clone Project Meta
  • 📝Labeling
    • Labeling Toolboxes
      • Images
      • Videos 2.0
      • Videos 3.0
      • 3D Point Clouds
      • DICOM
      • Multiview images
      • Fisheye
    • Labeling Tools
      • Navigation & Selection Tools
      • Point Tool
      • Bounding Box (Rectangle) Tool
      • Polyline Tool
      • Polygon Tool
      • Brush Tool
      • Mask Pen Tool
      • Smart Tool
      • Graph (Keypoints) Tool
      • Frame-based tagging
    • Labeling Jobs
      • Labeling Queues
      • Labeling Consensus
      • Labeling Statistics
    • Labeling with AI-Assistance
  • 🤝Collaboration
    • Admin panel
      • Users management
      • Teams management
      • Server disk usage
      • Server trash bin
      • Server cleanup
      • Server stats and errors
    • Teams & workspaces
    • Members
    • Issues
    • Guides & exams
    • Activity log
    • Sharing
  • 🖥️Agents
    • Installation
      • Linux
      • Windows
      • AMI AWS
      • Kubernetes
    • How agents work
    • Restart and delete agents
    • Status and monitoring
    • Storage and cleanup
    • Integration with Docker
  • 🔮Neural Networks
    • Overview
    • Inference & Deployment
      • Overview
      • Supervisely Serving Apps
      • Deploy & Predict with Supervisely SDK
      • Using trained models outside of Supervisely
    • Model Evaluation Benchmark
      • Object Detection
      • Instance Segmentation
      • Semantic Segmentation
      • Custom Benchmark Integration
    • Custom Model Integration
      • Overview
      • Custom Inference
      • Custom Training
    • Legacy
      • Starting with Neural Networks
      • Train custom Neural Networks
      • Run pre-trained models
  • 👔Enterprise Edition
    • Get Supervisely
      • Installation
      • Post-installation
      • Upgrade
      • License Update
    • Kubernetes
      • Overview
      • Installation
      • Connect cluster
    • Advanced Tuning
      • HTTPS
      • Remote Storage
      • Single Sign-On (SSO)
      • CDN
      • Notifications
      • Moving Instance
      • Generating Troubleshoot Archive
      • Storage Cleanup
      • Private Apps
      • Data Folder
      • Firewall
      • HTTP Proxy
      • Offline usage
      • Multi-disk usage
      • Managed Postgres
      • Scalability Tuning
  • 🔧Customization and Integration
    • Supervisely .JSON Format
      • Project Structure
      • Project Meta: Classes, Tags, Settings
      • Tags
      • Objects
      • Single-Image Annotation
      • Single-Video Annotation
      • Point Cloud Episodes
      • Volumes Annotation
    • Developer Portal
    • SDK
    • API
  • 💡Resources
    • Changelog
    • GitHub
    • Blog
    • Ecosystem
Powered by GitBook
On this page
  • Configuration
  • Database migration

Was this helpful?

  1. Enterprise Edition
  2. Advanced Tuning

Managed Postgres

PreviousMulti-disk usageNextScalability Tuning

Last updated 1 year ago

Was this helpful?

Sometimes you want to use your own PostgreSQL database instead of the one provided by Supervisely. For example, you may want to use your own database for security reasons or because you already have a PostgreSQL database running in your infrastructure, or you require high availability and fault tolerance.

In this case, you will have to configure Supervisely to use your own database instead of the one provided by default.

Managed Postgres providers examples: Amazon RDS, Google Cloud SQL, Azure Database for PostgreSQL, etc.

Configuration

To configure Supervisely to use your own database, you will have to edit the .env file which you can find in the workdir of your Supervisely installation. You can find the folder by running this command:

cd $(sudo supervisely where)

The .env file contains the following lines:

POSTGRES_DATABASE=clicker
POSTGRES_HOST=postgres
POSTGRES_PASSWORD=<password>
POSTGRES_PORT=5432
POSTGRES_SHM_SIZE=1gb
POSTGRES_SSL=false
POSTGRES_USER=postgres
POSTGRES_VERSION=11.0

which is used in docker-compose.yml as:

POSTGRES_URL: psql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}

In case you don't have POSTGRES_SSL in your configuration, you will have to your Supervisely installation to the latest version (at least 6.8.47).

You will have to change the values of the variables to match your database configuration. For example, if you are using Amazon RDS, you will have to change the values to something like this:

POSTGRES_DATABASE=clicker
POSTGRES_HOST=supervisely.123456789012.us-east-1.rds.amazonaws.com
POSTGRES_USER=supervisely
POSTGRES_SSL=true

After that you will need to redeploy Supervisely services:

sudo supervisely up -d

Database migration

In case you already have your valuable data in a local Supervisely database then you will need to transfer it to the new database. The migration is rather simple and can be done in a few steps:

  1. Stop Supervisely services and export your local database using pg_dump:

sudo supervisely stop
sudo supervisely start postgres
sudo supervisely exec postgres pg_dump -U postgres -C clicker > supervisely_postgres_dump.sql
  1. Restore the database dump to your own database:

PGPASSWORD=your_rds_password psql -h your_rds_endpoint -U your_rds_username -f /path/to/host/supervisely_postgres_dump.sql

In case you get errors or "License not found", please contact Supervisely support and attach the

If you're migrating to Amazon RDS you can follow as well.

👔
upgrade
troubleshoot archive
this guide