---
name: php186-skill-76992
description: "使用声明式加载文件、内置类型转换和可重复的迁移运行，将数据移入PostgreSQL，避免一次性导入脚本成为切换风险。"
---

# 使用pgloader在切换前通过可重复加载文件将MySQL、SQLite或CSV数据迁移到PostgreSQL

## 使用 pgloader 在切换前通过可重复加载文件将 MySQL、SQLite 或 CSV 数据迁移到 PostgreSQL

 

Move data into PostgreSQL with declarative load files, built-in type conversion, and repeatable migration runs before one-off import scripts become cutover risk.

 

## Prerequisites

 

pgloader and access to source systems plus a PostgreSQL target

 

## Installation

 

Use the upstream install or setup path that matches your environment:

 

- $ docker pull ghcr.io/dimitri/pgloader:latest
- $ docker run --rm -it ghcr.io/dimitri/pgloader:latest pgloader --version

 

Requirements and caveats from upstream:

 

- If you're using docker, you can use the latest version built by the CI at

 

Basic usage or getting-started notes:

 

- pgloader also implements data reformatting, a typical example of that
- --help -h boolean Show usage and exit.
- --dry-run boolean Only check database connections, don't load anything.
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/dimitri/pgloader/HEAD/README.md

 

## Documentation

 

- https://pgloader.readthedocs.io/en/latest/
