Subversion Repositories scripts

[/] [backup_pgsql] - Diff between revs 2 and 3

Show entire file | Ignore whitespace | Details | Blame | View Log

Rev 2 Rev 3
Line 19... Line 19...
        echo "Usage:    $0 <database to backup> "
        echo "Usage:    $0 <database to backup> "
        echo ""
        echo ""
        exit
        exit
fi
fi
#Define the backup directory, and target filename.
#Define the backup directory, and target filename.
BACKUP_DIR="/backups/pgsql/"
BACKUP_DIR="/tmp/"
FILENAME="$1"`eval date +%Y%m%d`
FILENAME="$1"`eval date +%Y%m%d`
 
 
#Perform the backup.
#Perform the backup.
pg_dump -f $BACKUP_DIR$FILENAME.sql -D -h localhost $1
pg_dump -f $BACKUP_DIR$FILENAME.sql -D -h localhost $1