>I re-iterate, cfexecute does precisely this. Simply write a little shell
>script containing the relevant bash commands you want and save as restore.sh
>(or whatever name you want) then execute restore.sh using cfexecute.

hi dave,

sorry cause i somehow missed reading your earlier posts. Thanks for the cfexecute pointer. Didn't know i could do that as yours humbly is still raw at CF programming :P.

Tried this, but it seemed to be not working.

<CFEXECUTE NAME="/home/postgres/nsvm_backupdb"
   OUTPUTFILE="#dirExport#dblog_#iNewId#.txt"
   TIMEOUT="0">

nsvm_backupdb
=============
#!/bin/bash

backupdate=`date +%a_%Y`

/bin/su - postgres -c "/usr/local/pgsql/bin/pg_dump -f /home/postgres/nsvm_$backupdate.db nsvm"
echo "Backup at `date` : nsvm_$backupdate.db">>/home/postgres/nsvm_backup_log

# ls -l nsvm_backupdb
-rwxrwxrwx    1 postgres postgres      418 Apr 26 16:11 nsvm_backupdb

Could anyone help to make the cfexecute work? Thanks

regards,
siew hui
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to