Search Postgresql Archives

backup of postgres scheduled with cron

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/backup.sh

to execute the backup.sh as user swkm daily at 4 am.

The user swkm is the user I use to create backups manually. The script
itself is executed fine if run manually but run on cron scheduler I got an
mydb_dump_$time.out file empty (of 0 kb)

Do you have any idea about what's wrong?

Thanks
Sorin





---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux