CB Response: How to save a table from Postgres as CSV
book
Article ID: 290601
calendar_today
Updated On:
Products
Carbon Black EDR (formerly Cb Response)
Issue/Introduction
Export a Postgres table to CSV
Environment
- CB Response Server: All Versions
Resolution
- Open a connection to the Response back-end as root or a user with sudo rights
- Export the table to CSV, substitute table_name with the name of the table to be exported
Additional Information
- File will be saved in current working directory unless the path is specified in the name section
- A list of tables can be shown using the \dt command
- Using 'with CSV HEADER' will include the column names in the export
- Specific fields can be specified in the command by substituting the table name with a select query
Feedback
thumb_up
Yes
thumb_down
No