8 Replies Latest reply on Nov 16, 2010 10:45 AM by philmodjunk

    Backup for open files

    sundown

      Title

      Backup for open files

      Post

      I am using a Macbook computer as a Host for my FM Pro 10 database files. I leave the files open at all times so they are available on the network. I have found that Apple's Time Machine does not update open files. The Super Duper backup program does not work reliably with open files according to their spokesman. Currently I am just manually exporting the file records to a desktop folder for the TM to do backups of the exports.

      Anyone have suggestions on the easiest way to do a regular backup on open FM files?

        • 1. Re: Backup for open files
          philmodjunk

          Yes, you do not ever want to back up open files except via Filemaker Server's scheduled back up system. Backing up an open file is likely to corrupt the file.

          You can write a script that uses Save a Copy as to save a copy of your file to a directory where your back up software can find and back up this copy. This reduces your backup chore to just clicking a button or you can even try setting up a timer that kicks in and backs up the file from the host machine once a day.

          • 2. Re: Backup for open files
            sundown

            Thanks Phil. Yes, the Save a Copy script works great. Now, rather than add another button for someone to push for a copy, I just need to decide what already existing button on the file to add the Save a Copy script. However it would be ideal if I could set a timer to run this script. Does FM Pro have this capability -- or do you know another way to set a computer timer to initiate the script?

            • 3. Re: Backup for open files
              philmodjunk

              In FileMaker 10 and 11 theres a script step called Install On Timer Script.

              You can set up such a timer to run the script once every 24 hours if you want.

              • 4. Re: Backup for open files
                sundown

                I'm running Filemaker 10 now. I found the On Timer Script & set it to run every 10 minutes (600) just like the example in the Help menu, but it does not run the script i select, "Save Copy"(which was to Save a Copy of File). The script to Save a Copy works when I click the button, but never runs from timer.

                Install OnTimer Script ["Save Copy"; Interval: 600]

                Since I designed my database on FM 7 and the file has the name.fm7, I was wondering if the timer might not work because of the older file.

                Any idea what I am missing?

                • 5. Re: Backup for open files
                  philmodjunk

                  All files from FMP 7 onward use .fp7 for a file extension.

                  You need two scripts for this to work.

                  Script 1 is your install on timer script:

                  Install OnTimer Script ["Save Copy"; Interval: 600]

                  Script 2 is the script "save a copy" named in the install on timer step. You run script 1 and it should run script 2 for you every 10 minutes until the window or file is closed.

                  • 6. Re: Backup for open files
                    sundown

                    I have the 2 scripts but I don't know how to start the timer script. You say I should run script 1. How do I do that. I thought it would run automatically every 10 minutes.

                    • 7. Re: Backup for open files
                      sundown

                      Never mind Phil, I got it. Didn't realize I had to hit a button to start the timer script. I assume it will run automatically until I close the file, then I have to restart it every time I open the file.

                      Thanks for your help. This is just what I needed to solve the backup for my open files.

                      • 8. Re: Backup for open files
                        philmodjunk

                        You can use File Options to set the script to run when the file is opened.

                        Since you don't want every user to set up this timer when they open the file write the script this way and your host will be set up for automatic backups and not the clients.

                        If [ Get (UserCount) = 1]
                            Install OnTimer Script ["Save Copy"; Interval: 600]
                        End If