1 2 Previous Next 16 Replies Latest reply on Sep 15, 2015 5:18 AM by Mike_Mitchell

    Make copy of file to desktop

    Kaps_1

      Hello,

       

      I have a file which is hosted on filemaker server. I would like to write a script to make a local offllne copy. Here is what I currently have - but it is not currently working. Can somebody point me in the right direction ?

       

      Thank You.

       

      Kind regards

      Kapsoffline.png

        • 1. Re: Make copy of file to desktop
          Markus Schneider

          save a copy (among other commands) is not available when using a server. You have to download the file using the admin-console

          • 2. Re: Make copy of file to desktop
            Storganise

            Hi Kaps,

             

            I've just tried your script on a local database of mine and it works fine. I assume the problem therefore is to do with it being hosted. I expect you need to perform the script on the server.

             

            Try making a second script called "Server Offline Copy" with this one step...

            Perform Script On Server ["Make Offline Copy"]

             

            If that works, it should save it to the Server desktop. Then all you need to do is adjust the variable so that it points to saving it on your client desktop.

             

            Let me know how you get on

             

            James

            • 3. Re: Make copy of file to desktop
              Storganise

              Ah, rats. Well done Markus. Sorry Kaps, ignore my response, Markus is absolutely correct

              • 4. Re: Make copy of file to desktop
                Mike_Mitchell

                Markus is correct. Save a Copy is not server-compatible. You can check script step compatibility on the lower left-hand corner of the Script window.

                • 5. Re: Make copy of file to desktop
                  Kaps_1

                  Thanks - my client wants to make regular offline copies and sync them back. Any thoughts on how to do this ?

                  kind regards

                  Kaps

                  • 6. Re: Make copy of file to desktop
                    Mike_Mitchell

                    Not sure what you mean by “sync them back”. Can you elaborate?

                    • 7. Re: Make copy of file to desktop
                      Kaps_1

                      Hi Mike,

                       

                      My client is  a building firm who use Filemaker to create quotes etc. However they often go into lofts where there is no wi-fi signal. So they need to run the system on their ipad and then come back to the office to upload it (i.e sync it with main system),

                       

                      Hence I am trying to write a script that will take a copy of the hosted solution and then put it on their desktop so they can manually transfer it to their mobile device. However as you have correctly identified, you cannot make a copy of a hosted solution (and I can see why btw).

                       

                      Any thoughts ? Thanks

                       

                      kin !d regards

                      • 8. Re: Make copy of file to desktop
                        monkeybreadsoftware

                        Technically you could run admin console shell command to close file, make a copy in file system, to read file into container field of another database, run shell command to open file.

                        Now on client go into that other database and export the container field back to a disk file.

                         

                        A lot of work.

                        • 9. Re: Make copy of file to desktop
                          Mike_Mitchell

                          You need an actual synchronization solution. Copying the file down to an iPad and then bringing it back won't solve your problem. What happens then? Copy it back up to the server? What happens to all the data and changes that were made since the last time it was copied down?

                           

                          Oops.

                           

                          There are several commercial synchronization solutions available. 360Works offers MirrorSync. Todd Geist has developed GoZync, which is sold through SeedCode. Also available is EasySync, which is free, but the developer has quit working on FileMaker. Or, you can roll your own or hire a consultant. But basically, what you really want is a mobile version of the solution that lives on the mobile device, and a hosted version that lives on the server. Then you run a synchronization routine to reconcile the changes between them.

                           

                          HTH

                           

                          Mike

                          • 10. Re: Make copy of file to desktop
                            Kaps_1

                            Thanks. I was thinking I might have to look at a third party product such as the ones you mentioned. However, you mentioned "roll your own" - can you elaborate ?. I am a filemaker developer and have built a number of solutions.

                             

                            kind regards

                            • 11. Re: Make copy of file to desktop
                              Kaps_1

                              Thanks. I was thinking I might have to look at a third party product such as the ones you mentioned. However, you mentioned "roll your own" - can you elaborate ?. I am a filemaker developer and have built a number of solutions.

                               

                              kind regards

                              • 12. Re: Make copy of file to desktop
                                wimdecorte

                                The essence is simple but the actual implementation is not:

                                 

                                - in the local version you check for an pull down new records that only exist in the hosted version

                                - in the local version you check for any modified records in your copy and push the changes to the server

                                - in the local version you check for any modified records on the server and pull the changes to your copy

                                - in the local version  you check for any deleted records in your copy and delete those on the server

                                - in the local version you check for any deleted records on the server and delete those in your copy

                                (and in any of this you have to check for and work around records that are locked because they are in use by other users)

                                 

                                Where it gets messy is when records get changed in two places.  What if you deleted a record locally and that same record was updated on the server.  What then?  Who wins?

                                • 13. Re: Make copy of file to desktop
                                  Kaps_1

                                  Thanks. Interesting. I am still mulling things over.

                                   

                                  The client only needs to have information on meetings between a certain period - not the entire database. So I propose to do the following:-

                                   

                                  1) Download a copy of the database and store it somewhere (have yet to figure out where). This is my master local database.

                                  2) Everytime the client wants a local copy, I run a script that:-

                                                            * identifies all the data that relates to the meetings in the period

                                                             * copies all the data into the master local

                                                            * "locks" all this data on the main hosted database through a field that i create - so whilst it is locked it can't be touched.

                                   

                                  On the local copy, I will not permit deletion of records. When they have finished, they can then upload all the data back into the hosted database and then unlock all the records. Finally I will delete all the data in the master local.

                                   

                                   

                                  Any thoughts ? Thanks

                                  Kaps

                                  • 14. Re: Make copy of file to desktop
                                    Suresh

                                    Hi,

                                     

                                    If you install FileMaker Server as default location means, open this below link in your Server system.

                                     

                                    C:\Program Files\FileMaker\FileMaker Server\Data\Databases

                                     

                                    Get backup your file at a certain period as per your requirement.

                                     

                                    Good Luck !!

                                     

                                    - Suresh

                                    1 2 Previous Next