Home
Product Feature Tour
  Beyond FTP
  Beyond Encryption
Features and Benefits
  Beyond FTP Server
  Beyond FTP Client
  Beyond Encryption
  Subscription Service
Product Screen Shots
  Beyond FTP
  Beyond Encryption
Lines of Business
  Government
  Education
  Banking
  Insurance
  Healthcare
Download
  Beyond FTP
  Beyond Encryption
  Current Release
Purchase
Support
Forums
Download White Papers
  Beyond FTP System Overview
  HIPAA Security
News
Customer Success Stories
  RewardsPlus of America
Upgrade Encryption
Give us Feedback
Register your Product
Search this Site
Company Profile
Contact Us
Awards
   

Su Doku Helper by Automated Programming Technologies, Inc.


FREE APT SuDoku Helper


Download the free APT SuDoku Helper to help solve SuDoku's or verify your solved SuDoku is correct.

What is a SuDoku?

   

Mirror a Database at several sites

This script mirrors APT's customer data base files at two remote locations. It operates on weeknights.  Note the manner in which this is accomplished. The DAILY repeat command repeats the script every day.  However, we use a transfer and a conditional to limit the days to those we want.  The script simply fails the conditional on the weekends.

The basic flow is this:

   1.  Determine whether this is a day to operate.

   2.  Shut down the data base and zip up the files.

   3.  Transfer the zipped file to the remote locations.

   4.  Start the unzip routine at each remote site.

Each step is checked for failure using a conditional.

   :Comment:#  Ignore anything after a "#" character on a line

  :RepeatTime:Daily
  :
MaxPerServer:1
  :
Archive:None
  :
Speed:+5
# Repeat every 24 hours
# Run one transfer at a time to each site
# Do not archive either the source or target
# Operate each transfer with a window of 6
# messages

 :Serverlist:Remotes
    Sterling
    Brighton
 :
EndList:

# Check for the proper day.  The \mirror\days directory contains
# files for each day we wish to operate: MON, TUE, WED, etc. 
# The %DW wild card will generate a name for the file based on
# the day of the week.  If the file is copied, we keep running. 
# Otherwise we quit.

  :From: o:\mirror\days\%dw
  :
To  : o:\mirror\days\temp.day
 

  :IF: DayCheck  CompletedOK  #Check for the correct day to run

# Kill the temporary file for the next time.

    :DeleteFiles: o:\mirror\days\temp.day

# Shut down the data base server.  If this fails, we fail the script

    :Run: o:\aptdb\admin.exe,-disconnect,o:\aptdb,2

    :IF: DBClose CompletedOK #Disconnect data base

# Zip the data base files.

       :Run: h:\util\pkzip o:\aptdb\db.zip o:\aptdb\db\cust.* > o:\aptdb\zip.log,,o:\aptdb,10

       :IF: DBZip CompletedOK #Zip the data base files
 

# Restart the data base server.

           :Run: o:\aptdb\admin.exe,-resume,o:\aptdb,2

           :IF: DBOpen CompletedOK   #Reconnect data base

# Declare the server list and perform the transfers.  Our global
# restart parameters provide for up to 10 restarts on a variety of
# errors. Note that a failure on one server does not affect the
# other

              :From: o:\aptdb\db.zip
              :
To  : {!Remotes}c:\db\db.zip

              :IF: ZipOut CompletedOK   #Send zip to remote sites

# Finally, we queue the unzip job at each site.

                 :QueueDistribution:{!Remotes}c:\bftp\dbunzip.dcf

                 :IF: QUnzip CompletedOK   #Queue job at each remote site
        
        :End_If:
              :End_If:
           :End_If:
        :End_If:
     :End_If:
 :End_If:

 

Sales:
Sales Toll free: 800-877-8765
International Sales: +01 810-225-0588
Send mail to with questions or comments about this web site.
Copyright © 1999-2007 Automated Programming Technologies, Inc.
Last modified: October 23, 2007