Tag Info

New answers tagged


The following should fix this issue. Set the SQL Server's user AND the SQL Server Agent on both the Share and the folders as Change for the share and Modify for the Security.


Here's what I came up with it's very simple but it works. Although I think Sven's answer does a better job with basic error handling. #!/bin/sh hostname=`hostname` # Dump DBs date=`date +"%Y%m%d_%H%M%N"` filename="/var/backups/app/${hostname}_${db}_${date}.sql" pg_dump databasename > $filename gzip $filename exit 0 Let me know what you ...


Not taking into account any specific syntax for pg_dump: #!/bin/bash $TODAY=`date --iso-8601` $BACKDIR=/backup pg_dump [options] > $BACKDIR/$HOSTNAME-$TODAY if [ "$?"-ne 0]; then echo "Help" | mail -s "Backup failed" you@example.com; exit 1; fi

Top 50 recent answers are included