Backup

For the following commands, make sure to replace <postgres-user> with your database user.

Save

docker exec -u postgres db_entitylist pg_dump -U <postgres-user> -Fc -c entitylist > dump_entitylist_`date +%d-%m-%Y"_"%H_%M_%S`.sql

Restore

docker exec -u postgres -i db_entitylist pg_restore -U <postgres-user> -Fc -c -d entitylist < <dump-file>