pgsync icon indicating copy to clipboard operation
pgsync copied to clipboard

How to use docker to run pgsync?

Open tankxxl opened this issue 1 year ago • 1 comments

image How to pass yml file to docker command?

tankxxl avatar Apr 16 '24 03:04 tankxxl

See if https://github.com/ankane/pgsync/issues/198#issue-1901324389 helps

zhangcheng avatar Apr 26 '24 03:04 zhangcheng

someone can use docker compose with the following docker-compose.yml

services:
  pgsync:
    image: ankane/pgsync
    container_name: pgsync
    volumes:
      - ./pgsync.yml:/opt/.pgsync.yml
    working_dir: /opt
    command:
      "--schemas public --no-sequences --preserve"

and ./pgsync.yml

from: <connection string source>
to: <connection string target>
to_safe: true # just in case

you can then do:

docker compose run pgsync --debug # or --list or any other additional commands 

magixus avatar Jan 03 '25 13:01 magixus