3 Replies Latest reply on Sep 29, 2014 1:40 PM by philmodjunk

    URGENT -- Script messed up DB

    Gilo

      Title

      URGENT -- Script messed up DB

      Post

      Hi

      I have my DB running on a MacMini Server, shared via client app. I have TimeMachine running on that Computer. 

      Unfortunately, a Script error ruined my DB by changing client_ID. Is there a way, to get that undone?

       

      Tried to restore TimeMachine to 2 hours ago, but the changes are not undone....

       

      How can i backup my DB so i can go back if this would rehappen again?

       

       

        • 1. Re: URGENT -- Script messed up DB
          philmodjunk

          There is no way to get that undone short of reverting to a back up copy made before the script altered the data.

          If you are hosting the Database from FileMaker server, set up back up schedules to make back up copies. Set up other back ups software such as TimeMachine to back up the back up copy to another location. Make and keep multiple back up copies (we keep daily back ups and move one copy a month to permanent storage at another location...)

          If you are not using Server, you can set up FileMaker Pro with a script that uses Save A copy As, to save a copy of your database file, the script can name the copy differently each time so that you can keep multiple copies of the database.

          Here's a scripted example of how you might use Save A Copy As (But the 15 minute interval in the example is intended only for files undergoing development): Saving Sequential Back Ups During Development

          • 2. Re: URGENT -- Script messed up DB
            Gilo

            Thank you, I'll use your backup script... Thx

            By the way, could you tell me how i can search for an exact number?

            Right now I'm using a script, where I go into Search mode, then set field and i search for a number. 

            But if the number I put in the field is 10, FM will also give me 10323 and 1023324 and not only 10. How can I avoid that?

             

            • 3. Re: URGENT -- Script messed up DB
              philmodjunk

              Change the field from a field of type text to a field of type number. (number fields should store number fields. only text should be stored in a text field.)

              If you must do this search on a text field, use the == (exact match) operator in front of the search criteria such as:

              ==10