All pastes #920959 Raw Edit

postgresql.sh

public shellscript v1 · immutable
#920959 ·published 2008-02-27 19:00 UTC
rendered paste body
#!/bin/bashhost=xxx.xxx.xxx.xxxporta=5432usuario=sitedb=site_dbdir=/home/fabio/backup_db/sql/if [ ! -e "$dir" ]; then        mkdir -p $dir/{log,sql}fipg_dump -i -h $host -p $porta -U $usuario -F c -b -v -f "${dir}${usuario}`date +%F_%H`hs.backup" $db > "${dir}${usuario}`date +%F_%H`.log" 2>&1find $dir -mtime +7 -exec rm {} \;find $dir -mtime +7 -exec rm {} \;