<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scheduled FTP transfer NOT working in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23032#M1774</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dameon, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your feedback. Please find below the script I use to do the backup of the database. Also, I include the clish command that schedules the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#!/bin/bash -f&lt;BR /&gt;source /opt/CPshrd-R77/tmp/.CPprofile.sh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#VARIABLES&lt;BR /&gt;DATE=`date +%Y_%m_%d`&lt;BR /&gt;FILE="config_checkpoint_"$HOSTNAME"_"$DATE&lt;BR /&gt;FOLDER=$FWDIR/bin/upgrade_tools/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo ******Process Migrate Export `date +'%d.%m.%y %H:%M:%S'` STARTED******&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;echo Migrate export $FILE started&lt;BR /&gt;#UPGRADE_EXPORT&lt;BR /&gt;echo File will be $FOLDER$FILE.tgz&lt;BR /&gt;$FWDIR/bin/upgrade_tools/migrate export -n $FOLDER/$FILE&lt;BR /&gt;echo Migrate export $FILE finished&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Waiting for migrate export to finish&lt;BR /&gt;echo&amp;nbsp; waiting 1 minute&lt;BR /&gt;sleep 1m&lt;BR /&gt;echo waiting finished&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;echo FTP $FILE started&lt;BR /&gt;#FTP&lt;BR /&gt;cd $FOLDER&lt;BR /&gt;HOST=&amp;lt;FTP_Server_IP&amp;gt;&lt;BR /&gt;USER=&amp;lt;FTP_username&amp;gt;&lt;BR /&gt;PASSWD=&amp;lt;FTP_Password&amp;gt;&lt;BR /&gt;ftp -n $HOST &amp;lt;&amp;lt;END_SCRIPT&lt;BR /&gt;quote USER $USER&lt;BR /&gt;quote PASS $PASSWD&lt;BR /&gt;bin&lt;BR /&gt;cd CheckPoint/BackupDB&lt;BR /&gt;put $FILE.tgz&lt;BR /&gt;quit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END_SCRIPT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo FTP $FILE finished&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#REMOVE&lt;BR /&gt;echo Remove of&amp;nbsp; $FOLDER/$FILE.tgz started&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rm $FWDIR/bin/upgrade_tools/$FILE.tgz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo Remove of&amp;nbsp; $FOLDER/$FILE.tgz finished&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo ****** Process Migrate Export `date +'%d.%m.%y %H:%M:%S'` FINISHED******&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/65479_scheduled_cronjob.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 May 2018 19:40:50 GMT</pubDate>
    <dc:creator>Alain_Ikula</dc:creator>
    <dc:date>2018-05-10T19:40:50Z</dc:date>
    <item>
      <title>Scheduled FTP transfer NOT working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23030#M1772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a small script that's supposed to take a backup of the database (upgrade_export) on my SmartCenter every saturday night and to transfer it to an FTP server. This was working perfectly in R77.30 but since I upgraded to R80.10, it doesn't work anymore. When I run the script manually, the job is correctly done and the database is transfered to the FTP server. But When I schedule it, all the script run until the point where the FTP connection is made and then immediately terminated without transfering the database file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea why the Cron job doesn't transfer the file to the FTP server. Has anyone already scheduled a script with FTP transfer in R80.10 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot guys in advance for your feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 13:51:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23030#M1772</guid>
      <dc:creator>Alain_Ikula</dc:creator>
      <dc:date>2018-05-10T13:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled FTP transfer NOT working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23031#M1773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be helpful if you could share the script you are using to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 18:13:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23031#M1773</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-05-10T18:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled FTP transfer NOT working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23032#M1774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dameon, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your feedback. Please find below the script I use to do the backup of the database. Also, I include the clish command that schedules the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#!/bin/bash -f&lt;BR /&gt;source /opt/CPshrd-R77/tmp/.CPprofile.sh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#VARIABLES&lt;BR /&gt;DATE=`date +%Y_%m_%d`&lt;BR /&gt;FILE="config_checkpoint_"$HOSTNAME"_"$DATE&lt;BR /&gt;FOLDER=$FWDIR/bin/upgrade_tools/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo ******Process Migrate Export `date +'%d.%m.%y %H:%M:%S'` STARTED******&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;echo Migrate export $FILE started&lt;BR /&gt;#UPGRADE_EXPORT&lt;BR /&gt;echo File will be $FOLDER$FILE.tgz&lt;BR /&gt;$FWDIR/bin/upgrade_tools/migrate export -n $FOLDER/$FILE&lt;BR /&gt;echo Migrate export $FILE finished&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Waiting for migrate export to finish&lt;BR /&gt;echo&amp;nbsp; waiting 1 minute&lt;BR /&gt;sleep 1m&lt;BR /&gt;echo waiting finished&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;echo FTP $FILE started&lt;BR /&gt;#FTP&lt;BR /&gt;cd $FOLDER&lt;BR /&gt;HOST=&amp;lt;FTP_Server_IP&amp;gt;&lt;BR /&gt;USER=&amp;lt;FTP_username&amp;gt;&lt;BR /&gt;PASSWD=&amp;lt;FTP_Password&amp;gt;&lt;BR /&gt;ftp -n $HOST &amp;lt;&amp;lt;END_SCRIPT&lt;BR /&gt;quote USER $USER&lt;BR /&gt;quote PASS $PASSWD&lt;BR /&gt;bin&lt;BR /&gt;cd CheckPoint/BackupDB&lt;BR /&gt;put $FILE.tgz&lt;BR /&gt;quit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END_SCRIPT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo FTP $FILE finished&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#REMOVE&lt;BR /&gt;echo Remove of&amp;nbsp; $FOLDER/$FILE.tgz started&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rm $FWDIR/bin/upgrade_tools/$FILE.tgz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo Remove of&amp;nbsp; $FOLDER/$FILE.tgz finished&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo ****** Process Migrate Export `date +'%d.%m.%y %H:%M:%S'` FINISHED******&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/65479_scheduled_cronjob.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 19:40:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23032#M1774</guid>
      <dc:creator>Alain_Ikula</dc:creator>
      <dc:date>2018-05-10T19:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled FTP transfer NOT working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23033#M1775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of redirecting the output to a file you need to make sure to use a logfile in the script itself.&lt;/P&gt;&lt;P&gt;Use this command for the cron instead:&lt;/P&gt;&lt;P&gt;add cron job BackupDB command "/usr/local/bin/export.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1" recurrence weekly days 6 time 23:15&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the last line you could mail that log file to yourself to see the results of the backup.&lt;/P&gt;&lt;P&gt;The FTP part of our backup script looks like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#---------------------------------------------------------&lt;BR /&gt;# Send system logfiles to FTP server&lt;BR /&gt;#---------------------------------------------------------&lt;/P&gt;&lt;P&gt;echo '--------------------------------------------' &amp;gt;&amp;gt;$LOG&lt;BR /&gt;timestamp 'Send system logs to FTP server ... ' &amp;gt;&amp;gt;$LOG&lt;BR /&gt;echo '--------------------------------------------' &amp;gt;&amp;gt;$LOG&lt;BR /&gt;timestamp 'Starting FTP session ...' &amp;gt;&amp;gt;$LOG&lt;/P&gt;&lt;P&gt;ftp -in 1&amp;gt;/dev/null 2&amp;gt;&amp;gt;$LOG &amp;lt;&amp;lt;_FTP-SYSTEM_&lt;BR /&gt;open $FTPSVR&lt;BR /&gt;user $FTPUSER $FTPPASS&lt;BR /&gt;mkdir /MDS/`uname -n`&lt;BR /&gt;cd /MDS/`uname -n`&lt;BR /&gt;binary&lt;BR /&gt;prompt&lt;BR /&gt;lcd $MDS_BCKDIR&lt;BR /&gt;mput `date --utc +%e%b%Y`* &amp;gt;&amp;gt;$LOG&lt;BR /&gt;quit&lt;/P&gt;&lt;P&gt;timestamp 'Finished FTP session ...' &amp;gt;&amp;gt;$LOG&lt;BR /&gt;echo &amp;gt;&amp;gt;$LOG&lt;/P&gt;&lt;P&gt;#---------------------------------------------------------&lt;BR /&gt;# End of Script&lt;BR /&gt;#---------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2018 21:31:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23033#M1775</guid>
      <dc:creator>Maarten_Sjouw</dc:creator>
      <dc:date>2018-05-10T21:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled FTP transfer NOT working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23034#M1776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maarten,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested your suggestion but it didn't solve my issue. I could find the root cause of the issue. At the beginning of my script, this line&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;source /opt/CPshrd-R77/tmp/.CPprofile.sh&lt;/STRONG&gt;&lt;/EM&gt; needed to be replaced by this &lt;EM&gt;&lt;STRONG&gt;source /opt/CPshrd-R80/tmp/.CPprofile.sh.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your input anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 09:02:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Scheduled-FTP-transfer-NOT-working/m-p/23034#M1776</guid>
      <dc:creator>Alain_Ikula</dc:creator>
      <dc:date>2018-05-14T09:02:03Z</dc:date>
    </item>
  </channel>
</rss>

