CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. Come to CPUG CON 2008 EUROPE in Switzerland on September 8th - 9th!
    Two days full of technical content for Check Point administrators in the beautiful Swiss Alps!
    We already have sign-ups from twelve different countries!
2. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting 7/14, 8/25, 10/6, 11/3, 12/8, (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8.
3. Corrent S3500 SecureXL Turbocards For Sale - Last Six Remaining - Get Your Spares!
4. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 And Related Products > Disaster Recovery
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2008-04-30
longhill longhill is offline
Member
 
Join Date: 2007-05-18
Posts: 34
Rep Power: 0
longhill has an average reputation (10+)
Default automatic upgrade_export

[Expert@MNGFW01]# crontab -e:

50 12 * * * cd /opt/CPsuite-R62/fw1/bin/upgrade_tools
51 12 * * * echo | ./upgrade_export appoggio
25 13 * * * oggi=`date`
26 13 * * * mv appoggio.tgz.tar $oggi
27 13 * * * scp $oggi root@172.28.121.16:/data/backup_2008

[Expert@MNGFW01]# less /var/log/cron

Apr 30 12:50:00 MNGFW01 CROND[22798]: (root) CMD (cd /opt/CPsuite-R62/fw1/bin/upgrade_tools)
Apr 30 12:51:00 MNGFW01 CROND[22806]: (root) CMD (echo | ./upgrade_export appoggio)
Apr 30 12:52:24 MNGFW01 crontab[22820]: (root) LIST (root)
Apr 30 12:53:19 MNGFW01 crontab[22821]: (root) LIST (root)
Apr 30 12:54:14 MNGFW01 crontab[22827]: (root) BEGIN EDIT (root)
Apr 30 12:54:26 MNGFW01 crontab[22827]: (root) END EDIT (root)
Apr 30 13:25:00 MNGFW01 CROND[22966]: (root) CMD (oggi=`date`)
Apr 30 13:25:54 MNGFW01 crontab[22972]: (root) LIST (root)
Apr 30 13:26:00 MNGFW01 CROND[22974]: (root) CMD (mv appoggio.tgz.tar $oggi)
Apr 30 13:27:00 MNGFW01 CROND[22980]: (root) CMD (scp $oggi root@172.28.121.16:/data/backup_2008 )
Apr 30 13:28:30 MNGFW01 crontab[22988]: (root) LIST (root)
Apr 30 13:29:30 MNGFW01 crontab[22997]: (root) BEGIN EDIT (root)
Apr 30 13:30:05 MNGFW01 crontab[22997]: (root) END EDIT (root)

If I run commands without crontab all ok!
With crontab run upgrade_export but does not create anything!

What happens?
Where is the error?
Reply With Quote
  #2 (permalink)  
Old 2008-04-30
cciesec2006 cciesec2006 is offline
Senior Member
 
Join Date: 2006-09-26
Posts: 596
Rep Power: 2
cciesec2006 has an average reputation (10+)
Default Re: automatic upgrade_export

Please include this line in your script:

. /etc/profile.d/CP.sh

That will source the checkpoint environment variable and get your script
to work properly.
Reply With Quote
  #3 (permalink)  
Old 2008-05-05
longhill longhill is offline
Member
 
Join Date: 2007-05-18
Posts: 34
Rep Power: 0
longhill has an average reputation (10+)
Default Re: automatic upgrade_export

I edit script for backup:

#!/bin/sh
. /etc/profile.d/CP.sh
cd /var/CPbackup/backups
echo | backup -d --file /var/CPbackup/backups/`date`_fw_export
scp `date`_fw_export root@172.29.198.23:/data/backup
rm `date`_fw_export.tgz
exit 0

Can I exec the backup command without me being asked "Are you sure you want to proceed?"
The command "echo |" not work !!!

Thanks
Reply With Quote
  #4 (permalink)  
Old 2008-05-05
JeffN JeffN is offline
Member
 
Join Date: 2007-01-23
Posts: 31
Rep Power: 0
JeffN has an average reputation (10+)
Default Re: automatic upgrade_export

I am using:
echo "\n" | ${FWDIR}/bin/upgrade_tools/upgrade_export ${BKDIR}/${BKFILE} >> $TMPLOG 2>&1

which is creating the backup file. (using upgrade_export)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 20:05.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0