Backtrack:  
 
by lunarg on June 5th 2011, at 13:17

To have scripted automated backup of PostgreSQL databases on a linux platform, you can create a script like so:

#!/bin/bash
PGPASSWORD="your-password" /usr/bin/pg_dump -U user database > sql-file.sql

Replace user and your-password with your username and password; replace database with the database you want to backup. The output of the dump goes to stdout and can be piped to a plain text file or compressed to something else.

 
 
« December 2024»
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22232425262728
293031    
 
Links
 
Quote
« If the batteries of a TV remote run out, why do we press the buttons so much harder? »