Short note for not forget. 1. Backup your data with pg_dump pg_dump -U postgres -h localhost -p 5432 -Fc -b -c -f ./backupname.dump databasename all options are described in pg_dump help -U username used to connect to