1. 单个数据库备份
pg_dump -h host -p 5432 dbname > file.sql
2. 整个库备份
tar -cf backup.tar /usr/local/pgsql/data
/var/lib/docker/volumes/printersdbdata/_data --> /var/lib/postgresql/data
/var/lib/docker/volumes/printersdblogs/_data --> /var/log/postgresql
1. 单个数据库备份
pg_dump -h host -p 5432 dbname > file.sql
2. 整个库备份
tar -cf backup.tar /usr/local/pgsql/data
/var/lib/docker/volumes/printersdbdata/_data --> /var/lib/postgresql/data
/var/lib/docker/volumes/printersdblogs/_data --> /var/log/postgresql