4 Replies Latest reply on Jan 20, 2014 11:40 AM by kopfteam

    How can I schedule a daily backup in FM13?

    kopfteam

      I upgraded a FileMaker solution from FileMaker server 5.0 to FileMaker Pro 13 (Peer-To-Peer): All databases are opened 24h on one Windows-PC and the 4 other Windows-PCs are accessing it there.

       

      How can I create a scheduled daily backup?

       

      Either quit FileMaker in the middle of the night, copy the database files to a secure location and open the FileMaker databases again or simpy "save a copy" from inside the running FileMaker databases.

       

      Quitting FileMaker with "TASKKILL" seems a bit brutal (Is that a secure way to close a running and shared FileMaker database? Even without the /F parameter?). I didn't find another way to gracefully quit FileMaker from the command line.

       

      Saving a copy from inside FileMaker means scheduling a script to run every night. But how? OnTimerScript doesn't really help here.

       

      Any ideas? This should be a problem that everyone gets who is running FileMaker in a Peer-To-Peer network.

       

      Thanks,

      Florian

        • 1. Re: How can I schedule a daily backup in FM13?
          Mike Duncan

          You can make a filemaker file that has a script that runs on open to call the necessary scripts (do the backup... save a copy... anything else) and then closes itself, leaving the rest of the solution up and running.

           

          Then you can use the OS's scheduled tasks to open that file whenever you want.

          • 2. Re: How can I schedule a daily backup in FM13?
            wimdecorte

            Alternatively you can use FM's ActiveX interface to write an OS script to close all files and quit FM.  And do the reverse when done.  All triggered by the Windows Task Scheduler

             

            But don't use TASKKILL, it's more than brutal, it is very likely going to corrupt your files in the long run.

            1 of 1 people found this helpful
            • 3. Re: How can I schedule a daily backup in FM13?
              DavidJondreau

              >Any ideas? This should be a problem that everyone gets who is running FileMaker in a Peer-To-Peer network.

              Yes, and it's one reason to use FM Server.

               

              >Saving a copy from inside FileMaker means scheduling a script to run every night. But how? OnTimerScript doesn't really help here.

               

              Why not? If the file is closed, you can't (but then you don't have to TASKKILL either). If the file is regularly opened and closed, you can Save a Copy As[] on open (and/or close).

               

              You can also schedule a script to run at a specific time using Install OnTimer[]. So, as an opening script, run Install OnTimer to run your Backup script. Calculate how many seconds "middle of the night" is from opening using Get ( CurrentTimestamp) and use that number.

               

              Though does it make a difference if it's middle of the night? I assume no one is using the hosted file at any time (not a great idea if they are). Most Peer-to-peer shared files are pretty light. A 100 MB file backing itself up shouldn't slow down client users for more than a few seconds. Backup 4 times a day or hourly. It probably won't matter.

              • 4. Re: How can I schedule a daily backup in FM13?
                kopfteam

                Thanks Mike,

                 

                I've done it that way (a new, empty database with just a startup script that runs scripts in all other databases) and it works like a charm

                 

                It first sounded a bit like a "tinker solution" but it proofed to be easy, clean and effective!

                 

                Florian