In scenarios when a support case is raised that seems to be dependent on a current data state (e.g. data duplication, data loss) it is preferable to attach a DB dump to the Zendesk ticket to support reproduction of a bug.
The backup should be stored at the http://files.intigua.com., for example, and a link to it should be provided inside the Zendesk ticket.
- Obtain DB details by accessing the backend of the JetPatch server. Run
cat intigua.properties | grep db.url
Given a URL that looks like jdbc:postgresql://30.30.XX.XXX/stakeholder_temp, note that 30.30.XX.XXX is the database IP and the last part ('stakeholder_temp') is a DB name
2. Via pgAdmin:
- Right click and choose 'Create' → 'Server'.
- On the 'General' tab name a connection whatever you like. On 'Connection' tab: Host name/address should contain the DB IP. Port: 5432. Obtain username and password from an administrator or one of the backend developers.
- On advanced tab under 'DB Restriction' insert a DB name ('stakeholder_temp')
- Press Save. Right click on the newly created server and choose 'Connect Server'
- Choose 'Databases'. Right click on a DB name and select 'Backup'. In an opened dialog give a name to a backup and press 'Backup'
3. Via DBeaver (community edition):
- Install PostgreSQL
- Select 'File' → 'New' → 'Database connection' → 'Popular' → 'PostgreSQL'.
- 'Host': DB IP. Port: 5432. 'Database': DB name. Obtain username and password from an administrator or one of the backend developers. Press 'Finish'
- Right click on a DB name, select 'Tools' → 'Backup'. Add a PostgreSQL client in a 'Client configuration'. Select 'Objects' → 'public'. Select 'Next' to check the output folder. Press 'Start'
4. Via pg_dump linux utility :
pg_dump -U <USER> -h <HOST> -p <PORT> <DBNAME> | gzip > db_dump.gz