2021-07-29 PSQL PostgreSQL Ubuntu 20.04 PSQL sudo -i -u postgrespsql pg_dump database名 > backup_file名 psql dbname < infile pg_restore -U "ユーザー名" -C -d "DB名" db.dump