4 Replies Latest reply on Oct 3, 2014 12:53 PM by philmodjunk

    Merging files from backup

    OwenKorn

      Title

      Merging files from backup

      Post

      We recently had a computer hard drive crash at work.  That computer was where all of our FilemakerPro documents were stored.  The computer had last backed up to an external hard drive on a Sunday, and the drive crashed on Thursday.  We took the external drive and plugged into another computer and began making new entries from there while the other computer was being fixed.  We now have the computer back and the documents were recovered from the damaged drive, but I need to figure out how to merge the databases.  I think it I can import them, but I'd rather not have 12000 duplicates in the process.  Is there a way to import only the files which were created between Sunday and Thursday, with those that were added to the backup version while the computer was being repaired? I would like to either go that direction, or take the files that were created while the computer was being repaired and add them to the recovered set.  Any help would be appreciated, as I'm no Pro here.

        • 1. Re: Merging files from backup
          philmodjunk

          The computer had last backed up to an external hard drive on a Sunday,

          That was your first mistake. At a minimum, you need a daily back up of your database that is stored on a machine different from the one hosting the database.

          Do your records have a date field that can identify which records were created since the crash?

          Do your records have auto-entered serial numbers?

          If you have a date or a serial number field, you can perform a find for those records with a date greater than the last record recorded in your back up copy and then import just that found set.

          If you have an auto-entered serial number field, its next serial value setting will then need to be updated after the import or the next new record you create will generate a duplicate serial number value.

          This does not pull over any records created before the crash and changed in some way after the crash. If you have a date field that auto-enters a modification date, you could find and do an update matching records import of those records.

          An you might have more than one table where you have to do some or all of the above.

          • 2. Re: Merging files from backup
            OwenKorn

            There is a date field in the records that can be used to sort them. I've seen the Update existing and update matching choices on the import page but I'm not sure what I'm doing there.  I've performed the find and tried to import but still keep getting the while database to merge instead of just the found files

            • 3. Re: Merging files from backup
              OwenKorn

              I think I got them transferred.  Had to do each day individually but that wasn't any big deal.  Thanks for the help

              • 4. Re: Merging files from backup
                philmodjunk

                I've performed the find and tried to import but still keep getting the while database to merge instead of just the found files

                Huh?

                A Matching Found set import imports records but matches the imported records against the records currently in the specified target Tutorial: What are Table Occurrences?'s found set and when it matches values (as specified by you when you map the fields), the data in the imported record overwrites that of the existing record.

                Here's an example of what you might do:

                First, Start with a copy of your file. Use a copy so if this doesn't turn out right, you can discard this copy and try again. Go to a layout in the table into which you are going to import records that is based on the table of data you want to import. Use Show All Records to pull all records into the layout's found set so that you can match against all records in your table.

                Select Import records and use the dialog that opens to select both the file and table within it from which you want to import records. In the mapping Fields dialog, select "matching field names" since your two tables should have identical field names as these are two copies of the same table. Then click the arrow connecting the Primary Key Field of your source table to the Primary Key field of your target table. (You want to select one or more pairs of match fields that will correctly match records when the two records are the same record.)

                You can then select an option that adds all non-matching records as new records.

                Then, import your records.

                Inspect the resulting records and look for error messages. If all looks good, go into Manage | Database | Fields and update any auto-entered serial number fields defined in this table to be at least one value greater than the greatest value in this field now that your import is complete. (Show all records and sort to make the record with the largest serial number the first or last record and then check the value in that record.)

                This is a process you may need to repeat for more than one table.

                Importing Found Sets:
                If you perform a find on a table in your source file (the file from which you will import records) and keep the file open, you can then open the target file and import records from this table and it will only import the records currently in that table's found set. If the source file is closed, you get all records instead of the found set.

                But there's a potential complication. You can set up mulitple table occurrences for the same table in a FileMaker Database. Each occurrence has its own found set. So if there are multiple occurrences of the table from which you are importing data, you need to select the same table occurrence as your source table as that of the layout where you performed the find. This table occurrence is named in "Show Records From" in layout setup... and is also shown to the right of "table:" in the status area tool bar when the layout is in Layout mode.