Re: [GENERAL] backup of postgres scheduled with cron

2007-11-22 Thread Sorin N. Ciolofan
]; pgsql-general@postgresql.org Subject: Re: [GENERAL] backup of postgres scheduled with cron Hello Sorin! Sorin N. Ciolofan wrote: > #!/bin/bash > time=`date '+%d'-'%m'-'%y'` > cd /home/swkm/services/test > pg_dump mydb > mydb_dum

Re: [GENERAL] backup of postgres scheduled with cron

2007-11-22 Thread Frank Wittig
Hello Sorin! Sorin N. Ciolofan wrote: > #!/bin/bash > time=`date '+%d'-'%m'-'%y'` > cd /home/swkm/services/test > pg_dump mydb > mydb_dump_$time.out You should output STDERR to some error logfile or set MAILTO in your crontab. I guess you then would have seen an error mes

Re: [GENERAL] backup of postgres scheduled with cron

2007-11-22 Thread jef . peeraer
On Thu, 22 Nov 2007, Sorin N. Ciolofan wrote: > Hello all! > > I've a small bash script backup.sh for creating dumps on my Postgre db: > > #!/bin/bash > time=`date '+%d'-'%m'-'%y'` > cd /home/swkm/services/test > pg_dump mydb > mydb_dump_$time.out > > I've edited cron

[GENERAL] backup of postgres scheduled with cron

2007-11-22 Thread Sorin N. Ciolofan
Hello all! I've a small bash script backup.sh for creating dumps on my Postgre db: #!/bin/bash time=`date '+%d'-'%m'-'%y'` cd /home/swkm/services/test pg_dump mydb > mydb_dump_$time.out I've edited crontab and added a line: 00 4 * * * swkm /home/swkm/services/test

[GENERAL] Backup of postgres

1998-08-19 Thread Przemyslaw Bak
Hi all, I have following script to backup database: - cut -- #!/bin/sh PSQL=/usr/local/pgsql/bin/psql DUMP=/usr/local/pgsql/bin/pg_dump PREFIX=`date +%j` BACKUP_DIR=/usr/local/pgsql/data/base/.BACKUP Databases=`$PSQL -tq -d template1 -c "select datname from pg_database"` renice