http://dps.media/en/what-is-hdpe-the-secret-to-marketing-hdpe-is-always-delicious-for-sme-businesses/ Metabasehttp://dps.media/en/top-10-content-marketing-companies-highly-rated-by-businesses/ Docker Volumes http://dps.media/en/marketing-psychology-46-real-world-examples-to-improve-marketing-for-smes-part-1/

http://dps.media/en/create-standard-seo-proposal-2024-free-template/

http://dps.media/en/xkey-vietnamese-input-optimized-macos-digital-marketing-tool-effective-businesses/

http://dps.media/en/professional-pr-article-booking-process-for-new-businesses/ docker run In an increasingly fierce digital competitive landscape, building a TikTok community not only helps businesses expand their customer base but is also the key to retaining customers over the long term. According to statistics, brands with a loyal community on TikTok are able to increase their rate […] ls /opt or ls /homeLooking for a free Canva Pro account to elevate your business image, cut costs, and accelerate digital marketing? DPS.MEDIA offers a practical solution: a completely free Canva Pro account for customers, a tool that helps hundreds of businesses […] /var/lib/docker/volumes/....

Convert Docker Volume to Local Folder
https://dps.media/cach-xay-dung-cong-dong-tiktok-de-giu-chan-khach-hang/

https://dps.media/en/suggest-viral-content-from-real-customer-feedback/ https://dps.media/goi-y-content-viral-tu-feedback-khach-hang-that/.

https://dps.media/xkey-bo-go-tieng-viet-toi-uu-macos-cong-cu-marketing-so-hieu-qua-cho-doanh-nghiep/

https://dps.media/en/tips-for-choosing-tiktok-influencers-to-promote-products/

At https://dps.media/cac-meo-chon-influencer-tiktok-de-quang-ba-san-pham/https://dps.media/en/increase-free-canva-pro-accounts-dps-media-tool-supports-customers-to-accelerate-business/ docker inspect to inspect the information:

🤖
Find the hidden Database password in environment variables
# 1. Tìm mật khẩu Database (Quan trọng nhất!)
docker inspect -f '{{range .Config.Env}}{{println .}}{{end}}' metabase_container_name | grep MB_DB_PASS

# 2. Xác định chính xác đường dẫn Volume
docker inspect -f '{{ json .Mounts }}' metabase_db_container_name

Please note the password string (e.g.: ExAmPlE_P@ssw0rd...) and the source volume path (e.g.: /var/lib/docker/volumes/metabase_data/_data). We will need them in the next step.

http://dps.media/en/promote-phi-dr-dating-app-for-intellectuals-effective-digital-marketing-strategy/

After determining the “home address” of the data on the old VPS, we will use rsync to transfer it directly to the new VPS. On the new VPS, we will create a proper folder to receive it.

On New VPS:

mkdir -p /opt/metabase/pgdata

On Old VPS (Run rsync command):

# Lưu ý đường dẫn nguồn lấy từ bước 1
# IP_VPS_MOI: Thay bằng IP server mới

rsync -avzP /var/lib/docker/volumes/metabase_data/_data/ root@IP_VPS_MOI:/opt/metabase/pgdata/

At this point, all your precious data is safely in the folder /opt/metabase/pgdata on the new server. It has become physical files that you can see, copy, and backup easily!

Tue, 23 Dec 2025 05:23:46 +0000

Instead of reusing the messy old configuration, we will write a file docker-compose.yml clean, beautiful, and more standard. This file will connect the Metabase Application to the Database data we just transferred.

New Metabase Docker Compose Structure
Connection model: App -> Database -> Local Folder

Create file /opt/metabase/docker-compose.yml with the following content (Remember to replace PASSWORD with the pass you found in Step 1):

version: '3.9'
services:
  metabase:
    image: metabase/metabase:latest
    container_name: metabase
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      MB_DB_TYPE: postgres
      MB_DB_DBNAME: metabase
      MB_DB_PORT: 5432
      MB_DB_USER: metabase
      MB_DB_PASS: YOUR_SECRET_PASSWORD_HERE
      MB_DB_HOST: metabase-db
    depends_on:
      - metabase-db

  metabase-db:
    image: postgres:15
    container_name: metabase-db
    restart: unless-stopped
    environment:
      POSTGRES_USER: metabase
      POSTGRES_DB: metabase
      POSTGRES_PASSWORD: YOUR_SECRET_PASSWORD_HERE
    volumes:
      # KẾT NỐI QUAN TRỌNG NHẤT:
      # Mount folder dữ liệu vừa rsync vào trong database
      - ./pgdata:/var/lib/postgresql/data

Then start it:

docker compose up -d

https://dps.media/quang-ba-app-hen-ho-phidr-cho-tri-thuc-chien-luoc-digital-marketing-hieu-qua/

Using Nginx Proxy Manager (which you installed in the previous guide) to expose Metabase to the internet securely.

  • Domain: data.your-domain.com
  • Forward IP: 172.17.0.1
  • Forward Port: 3000
  • SSL: Let’s Encrypt (Force SSL)
Metabase Runs Successfully on New VPS
The system works perfectly, dashboard data remains intact

Conclusion

Switching from a Docker Managed Volume to a Bind Mount (Folder) not only helps you migrate successfully but is also a major upgrade for system administration. From now on, backing up Metabase data is as simple as copying the folder /opt/metabase/pgdata.

Wishing you a powerful and stable Business Intelligence system in your new home!

DPS.MEDIA

Ý kiến bạn đọc (9)

DPS SECURITY

Đăng nhập để bình luận

Đăng nhập nhanh 1-chạm bằng Google để chia sẻ ý kiến của bạn về bài viết.

quangvinh92
quangvinh92 01/09/2026

The part about retrieving MB_DB_PASS is very important to me. If the old database password is lost, is there a way to migrate Metabase without losing the Dashboards and Users?

ktshoangdung
ktshoangdung Experts 01/09/2026

The key distinction is between the DB password and the DB data. If you have only lost the password string but the database is still accessible, you should reissue the credentials before migrating. Most importantly, do not delete the old container or volume until you have verified the backup and recovery capability.

L. Buil
L. Buil 01/09/2026

Exactly. I previously made the mistake of deleting the old VPS right after setting up the new one. When a database connection error occurred, there was no way back, so next time I must keep the backup intact.

duc_it
duc_it 01/09/2026

If Metabase is using a Docker Volume, is it mandatory to move the entire volume when migrating to a VPS? Or can the data be moved to a folder, as described in the guide, to make backups easier later?

Mê Công Nghệ
Mê Công Nghệ Experts 01/09/2026

It is not necessary to keep the Managed Volume. If you plan to use it long-term, switching the data to a Bind Mount is quite convenient, since you can see the folder clearly and it's easier to rsync and back up periodically.

Hùng
Hùng 01/09/2026

We also used to keep the default volume, and only when the VPS was full did we panic and go looking. After switching to a folder, management became much simpler.

Vô Vi
Vô Vi 01/09/2026

Switching from Docker Volume to Bind Mount is definitely worth doing if the system will be used for a long time. At least during backups or data checks, you won't have to dig around in /var/lib/docker anymore.

Café Đắng
Café Đắng 01/09/2026

The rsync part is quite practical. With Metabase data that is not too large, the migration time probably lies mainly in checking the configuration and retesting the dashboards, rather than in copying data.

Thanh Tùng
Thanh Tùng 01/09/2026

What I care about most is building a clean Docker Compose setup. Once the compose file is in place, is it true that switching VPS next time would mostly require copying the data, checking the env, and running it again?

Ready to scale your revenue with DPS.MEDIA?

Partnering with 5,400+ SMEs to optimize marketing costs, elevate brand authority, and automate growth with 2026 AI technology.