4 Replies Latest reply on Apr 25, 2009 12:21 PM by BreitenbushIT

    Backup Script with Instant Web Publishing?

    BreitenbushIT

      Title

      Backup Script with Instant Web Publishing?

      Post

      Hello,

       

      I am running a few databases over our local network using IWP and am trying to figure out if it is possible to create a backup script which works with these databases?

        

      Ideally I need a way to automate backups every time a user commits a record (which is done by clicking a scripted "save" button).  Anyone have a clue how I could go about doing this?

       

      I figured out how to create the backup script when using the database locally, but it seems all file commands are not compatible with IWP. 

       

      Thanks for any advice,

      -shawn- 

        • 1. Re: Backup Script with Instant Web Publishing?
          BreitenbushIT
            

          Additional clarification:   

           

          What I am looking for is a script which triggers the computer which is serving the Databases to save a backup file on that computer.  Is there any way to make this happen?

           

          Example:  

          Computer "Office01" is hosting two databases and sharing via IWP.   A user logs into one of the databases on computer "Office02". They click a scripted button which commits a record and somehow that triggers Office01 to save a backup file on Office01's hard drive.

           

          -shawn-

          • 2. Re: Backup Script with Instant Web Publishing?
            BreitenbushIT
              

            Hello,

             

            I am still looking for an answer to this question.  Anyone have any suggestions?

             

            Thanks!

            -shawn- 

            • 3. Re: Backup Script with Instant Web Publishing?
              TSGal

              Breitenbush Office:

               

              Thank you for your posts.

               

              Usually, backups are done on a schedule using FileMaker Server.

               

              One way of doing this with FileMaker Pro is to create a script that looks for a value in a field.  When true, replace the value with the original value and then backup the file.  Here is a possible script:

               

              Allow User Abort [On]

              Set Error Capture [On]

              Loop

                 Perform Find [Restore]  // look for the value "1" in a field "Update"

                 If [ Get ( FoundCount ) > 0 ]

                    Replace Field Contents [ No dialog ; Update ; "" ]

                    Save a Copy as [ copy of file ; <name of saved file> ]

                 Else

                    Pause/Resume Script [ Duration (seconds) ; 5 ]

                 End If

                 Show All Records

              End Loop

               

              ---------

               

              We "Allow User Abort" because we need a way to stop the loop.  Error Capture is turned on because most of the time, zero records are going to be found, and we need to trap that.

               

              Inside the loop, we look for a value in a field.  If we find a record, we replace the contents and save a copy of the file.  If not, we pause for 5 seconds.  We then Show All Records and loop again.

               

              When an web user presses a button to commit a record, the script will place a "1" in the Update field.  Then, when the looping script sees this change, the file is backed up.  Does that make sense?

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Backup Script with Instant Web Publishing?
                BreitenbushIT
                  

                TSGal,

                 

                I will try a variation of your suggestion.  Thanks for helping to steer me in the right direction!

                 

                Much Appreciation,

                 

                -shawn-