Documents

PostgreSQL Migration
Install migration tools
$ brew install libpq
$ brew link --force libpq
$ echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.zshrc
Backup database
# backup
$ pg_dump -C -h <remote-database-server-url> -p 5432 -U sonar -W sonarqube > backup.sql
Password: *****
$ ls
backup.sql
Restore database
# restore
$ psql -h <remote-databse-server-url> -p 5432 -U sonar -W sonarqube < backup.sql
Password: *****