6 Replies Latest reply on Jul 9, 2012 11:59 PM by JCPython

    a few development questions...

    JCPython

      Title

      a few development questions...

      Post

      What is the best way to backup my database when using external open storage on all my image container fields in my runtime, i need for all my users to be able to easily create backups of their data and to be able to restore the backups when updates of my runtime are released.

      there are a few options to save a copy of current file, clone, compact, self-contained

      the self contained seems to be the right one but im not sure exactly..

      when i release all my runtime updates, would it be wise to use the same bindkey for all?

      I feel like i have tried everything the last few weeks to get my users from a runtime made in fm11 to move their converted data files into the update made in fm12 but i only get sucess 10% of the time.

      Another thing i gotta know, does the value returned by the function Get PersistentID ever change on a computer like it does with SystemNicAddress?
      Reason i ask is because im currently using the get perstistentID fuction in combination with brian dunnings easy encryptions, but there is a lot of reports from my customers that there license keys randomly stop working, or customer number changes on them, all problems regarding easy encryption, id like to just scrap easy encryption out of my program all together.

      My idea is when a user purchases my solution i simply send the program to him with a field pre field with the persistent id for their computer, then do a check on each start up to make sure there is a match and its not being run on any other computer.

        • 1. Re: a few development questions...
          philmodjunk

          the self contained seems to be the right one but im not sure exactly..

          That's a new to FileMaker 12 option intended for creating a version of the file that can be used on iOS devices with FileMaker Go. It's an intriguing option for creating a self-contained back up copy, but I see potential issues for your users should they need to replace their current database file with the resulting backup copy as the container fields in this copy will no longer be set up to use the external storage option. If you decide to use that option, I think you'll need to design a "restore" script that imports the data from such a backup copy into a clone of your runtime file.

          The alternative approach would be to use the standard save a copy as settings to save a copy of your file to a specified location and put the backup responsibilty on your users but being sure to provide a list of the files and folders that should be backed up by their choice of third party backup software. The key is to provide a closed copy of the database file and the folder of image files for backup each time their data is backed up.

          With either approach, I'd try to use an installer to install two copies of the solution folder--one for them to use and one to hold a backup copy of the database file (either a clone for receiving the imported data from the self contained copy or the full up copy saved via the alternative option I mentioned here). The two folders should be installed next to each other in the same directory so that the path the the currently active file (which can be gotten via a get function), can be used to derive the path to the second folder. This produces an "all in one" back up copy of your solution and one that 3rd party backup software can use for making additional backup copies of the entire solution and thus the user can simply use a copy of this folder to replace their working solution folder for a single step, full up recover to backup step.

          Hmmm, that suggests a refinement you can do with the normal Save a copy as option. Remember the script I suggested in another thread for moving image files into a new "external storage" container field? A version of that code could be used to copy data into the corresponding folder in the solution folder as part of a back up script. Basically, you'd loop through your records and use export field contents to export the files into the backup folder to backup the image files along with the saved copy of the database file.

          I feel like i have tried everything the last few weeks to get my users from a runtime made in fm11 to move their converted data files into the update made in fm12 but i only get sucess 10% of the time.

          I gently remind you of a suggestion that I made to several threads ago: "You may need to export the data from the FMP 11 copy of the file into merge, tab or csv files for import into the FMP12 copy of the file."

          Another thing i gotta know, does the value returned by the function Get PersistentID ever change on a computer like it does with SystemNicAddress?
          Reason i ask is because im currently using the get perstistentID fuction in combination with brian dunnings easy encryptions, but there is a lot of reports from my customers that there license keys randomly stop working, or customer number changes on them, all problems regarding easy encryption, id like to just scrap easy encryption out of my program all together.

          Perhaps you should start a thread on that one. Given the number of FMP 12 bugs we've uncovered so far, we might even end up with an issue report if PersistentID turns out not to be persistent. I suspect that EasyEncryption is something that you could easily replace with your own "scramble" cypher that would not be as secure against a heavy level "hack", but probably would be sufficient to serve your purpose of making unauthorized installations of your system difficult to do.

          The issue you'll need to resolve is to determine whether the problem lies with the Get (PersistentID) function, the encryption custom function, or the way you are using both features in combination to prevent the unauthorized use of your system.

          • 2. Re: a few development questions...
            JCPython

            I dont know about about using the installer to create two installations, honestly im feeling overwelmed aalready and would like to do the above things the simplest way possible, im starting to lean towards letting my users re-enter their records, but im not convinced yet after they do that that all backups and restore will be a breeze later on.

             

            I gently remind you of a suggestion that I made to several threads ago: "You may need to export the data from the FMP 11 copy of the file into merge, tab or csv files for import into the FMP12 copy of the file."

            I am gonna revisit this option tongith and see what i can do.

             

            Perhaps you should start a thread on that one. Given the number of FMP 12 bugs we've uncovered so far, we might even end up with an issue report if PersistentID turns out not to be persistent. I suspect that EasyEncryption is something that you could easily replace with your own "scramble" cypher that would not be as secure against a heavy level "hack", but probably would be sufficient to serve your purpose of making unauthorized installations of your system difficult to do.

             

            I will start a thread tonight on this, so far i havent seen any changes in the persistent ID, but i dont know how it will work with users on laptops.

             

            . I suspect that EasyEncryption is something that you could easily replace with your own "scramble" cypher that would not be as secure against a heavy level "hack", but probably would be sufficient to serve your purpose of making unauthorized installations of your system difficult to do.

             

            For the market my software is around, i would expect much for heavy hacking, I would like to know more about what your idea is on this on what i could do.

             

            I think ill stick with the save copy of the current file feature instead of self contained then seing that is always worked before. is there a way for me to post my entire import script to see if it looks right to you, its too long big to type out manually...the reason i think something is wrong is because the same database backed up with different filenames can return many different results when running my import script. im reffering to only importing fmp12 backups to a fmp12 solution, i will try a merge file tonight toexport and import from my fm11 solution to my fm12 solution.

             

             

            • 3. Re: a few development questions...
              philmodjunk

              I dont know about about using the installer to create two installations, honestly im feeling overwelmed aalready and would like to do the above things the simplest way possible,

              For the user, I think a second back up solution folder IS the easiest. It may not be the easiest for you to set up, but should be the easiest for them to use.

              For the market my software is around, i would expect much for heavy hacking,

              Hmmm, that's not something I can agree or disagree with as I don't know your market, but unless hard core hackers are the folks you plan to sell to or they work for NSA or something, I'd think a less robust encryption method might work acceptably here. This is not, however, something that I'm any kind of expert in so maybe this is just my own ignorance speaking here. I'd think your hackers would need either multiple samples of the data used and/or the ability to attempt entering a valid code over and over again. These are capabilities the average database user isn't likely to have.

              What I'm thinking of is that you construct you own calculation that performs a number of calculations on the value returned by Get(PersistentID) to get a 'cyphered' value to store in a field not put on any layout in your system and then your code that checks the persistentID performs the same calculations in order to compare values to validate the install.

              As long as the admin account is removed from your runtime, I think it would be fairly difficult for the user to find and figure out the specific calculation you are using in order to get around your security--but again maybe this is easier to do than I think it is.

              To post a script to the forum:

              1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
              2. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
              3. If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
              4. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
              • 4. Re: a few development questions...
                JCPython

                Sorry i meant to say i wouldn't expect much of heavy hacking,

                 

                What I'm thinking of is that you construct you own calculation that performs a number of calculations on the value returned by Get(PersistentID) to get a 'cyphered' value to store in a field not put on any layout in your system and then your code that checks the persistentID performs the same calculations in order to compare values to validate the install.

                 

                But wouldnt it be just as safe to simply only use Get PersistentID to check on start up if it matches the persistentID thats is stored in a hidden field on a non visible layout, without all the calculations.

                 

                For the user, I think a second back up solution folder IS the easiest. It may not be the easiest for you to set up, but should be the easiest for them to use.

                Would you be able to help me set this up? im not even sure how i would get my installer to create two install directories, i use inno. unless you meant i add a folder called Backup in the same location as the filemnaker folders such as extensions,Files,Themes,SASL2 etc...?

                 

                 

                • 5. Re: a few development questions...
                  philmodjunk

                  Probably, I assumed you had a reason for using the encryption in the first place and the only reason I could see was to conceal the actual PersistentID value stored from people who might hack the file open and read the contents to see what PersistentID was used. Remember, I was answering from the mis-understanding that heavy hacking WAS a concern for you. Wink

                  I haven't messed around much with installer utilities but if you can set it to install one folder at a specified lcoation, surely it can install two folders to the same location with different folder names? If it can't copy the same folder twice with a name change, at the very least the installer can start with two copies of the folder in the directory from which it installs can't it?

                  I am thinking of a folder with a name such as "backup" that contains everything that is found in the solution folder you are currently installing, but then your backup script saves a copy of the Database file to this folder and uses export field contents to save copies of the container files to locations within this backup folder.

                  The idea is to produce a folder that is exactly the same as the working solution folder, but with one key exception--all files in it are closed, not open and thus the user or a backup utility can easily and safely copy this entire folder to any other location or backup media such as a thumb drive, drop box or a CD so that a fatal loss of the current computer does not also destroy the user's data. If your solution should come up missing or damaged, the user can then simply replace the original install folder with a copy of the backup folder and everything, the application, the support files and the data is restored in one big copy.

                  • 6. Re: a few development questions...
                    JCPython

                    I haven't messed around much with installer utilities but if you can set it to install one folder at a specified lcoation, surely it can install two folders to the same location with different folder names? If it can't copy the same folder twice with a name change, at the very least the installer can start with two copies of the folder in the directory from which it installs can't it?

                    I tried the last few hours to do this with Inno, but no luck in getting it to install two seperate folders in the program files, what i can do is before i package the files all up I just select all copy and paste into a folder called backups and just have that folder installed in with the extensions folder, themes etc...