1 2 Previous Next 17 Replies Latest reply on Mar 17, 2017 12:25 AM by gdurniak

    File maintainance - FM15


      Hi All,


      I have a fairly large solution hosted on FMS 14.  30 files with multiple tables, whole thing approx. 3gb.  Approx half a million records.  With 80 odd users constantly adding records, doing Finds etc. etc.


      Although there are no obvious problems, I would like to take some time out to do some 'housework'.


      On a back-up of course, I was thinking of compacted the files, setting the indexed fields to 'None', then re-indexing.


      I would very much appreciate some 'best practice' suggestions.  Should I run a Recover on copies to check for any damage prior to the above?


      Anyway, any suggestions will be very gratefully received as always.


      Many thanks.

        • 1. Re: File maintainance - FM15

          Close the files on the server and work with copies taken directly from the server at that time.


          If you do this on copies, the data in them will not reflect the data in the hosted files by the time you are ready to put them back up on the server. It only takes seconds for a user to modify a record and their changes will be lost if you don't.


          You could do your maintenance on a clone, close the files to halt changes, import into the clone and swap files, but the amount down time when the file is unavailable can be much the same and importing could take much longer if there's a lot of data and/or massive indexes in the file.

          • 2. Re: File maintainance - FM15

            I would Save a Copy As (Compressed Copy). It should reduce your file size by eliminating empty blocks. Kinda like a optimizing a hard drive. Save a Copy As is only available when the file is single-user.

            • 3. Re: File maintainance - FM15

              Hi philmodjunk and Jaymo


              Many thanks for your replies.  I will be closing the files on the Server, then taking backups so no-one will be able to amend data while I am working on the copies.  Then replace the 'old' files with the new ones.


              PS.  I did a test on a small file using the 'Recover' function.  I understand this rebuilds indexes, schema etc.  I got the Filemaker dialogue at the end saying, 'The new database is safe to use...'.  Does this mean that I can/should use this rebuilt file or is Recover still an option of last resort if a file is found to be damaged?


              Presume Save a Copy As (Compressed Copy), does not rebuild the indexes?


              Many thanks again.

              • 4. Re: File maintainance - FM15

                Abingdon wrote:

                PS. I did a test on a small file using the 'Recover' function. I understand this rebuilds indexes, schema etc. I got the Filemaker dialogue at the end saying, 'The new database is safe to use...'. Does this mean that I can/should use this rebuilt file or is Recover still an option of last resort if a file is found to be damaged?


                I would never use Recover as a file maintenance routine and use the recovered file.  Mainly because the recover is meant as a last-ditch mechanism to rescue as much data as possible from a damaged file.

                The way it does that is not well documented or understood and since I tend to be very cautious I don't use it for maintenance.

                • 5. Re: File maintainance - FM15

                  As an aside.  I just saw Beverly's 'welcome back' post.  I went to your Blog and read your 'In Depth Index' blog.

                  It is a brilliant exposition. I learned more about Indexing in the 10 minutes it took to read it then I have in the last, well, too many years to admit to...


                  I am really looking forward to reading more.  It will be a real boon to developers. Newbies and Oldies.


                  Thank you.

                  • 6. Re: File maintainance - FM15

                    I know there has been some debate over this issue, but that settles it for me.


                    Thanks again.

                    • 7. Re: File maintainance - FM15

                      It is possible to use Recover to rebuild all indexes while making no other changes to the file. In my opinion, that's one of two recover options that can be useful and which produce a file "safe to use" as the file structure itself is untouched. It's also much faster than alternative methods for rebuilding all indexes:


                      Select Recover. Select your file. Select Advanced Recover options.

                      Select "copy file blocks as is".

                      Select Rebuild indexes now.


                      The other way that Recover can be useful in File Maintenance is just as a check up on your file. Pull a recent back up and recover it. See if recover reports any trouble. Don't even have to close files for this as you are just testing a copy. If recover finds problems, you can use the info provided by the error message and the recover log to decide what you need to do with your working copy--usually, you want to find a recent back up copy that recovers OK, save a clone and import your current data into it along with resetting any serial number "next value settings".

                      • 8. Re: File maintainance - FM15

                        Thanks so much for your kind words Abingdon. I truly appreciate it.

                        • 9. Re: File maintainance - FM15

                          The primary maintenance you should have is a good backup system.  Progressive backups, daily backups and some type of offsite or in the cloud backup. 


                          File maintenance may be about cleanup maintenance too.  One real good maintenance thing you could do is begin a process of updating old Classic layouts to new themed layouts with CSS. Among other things, rebuilding gets rid of a lot of old items in the layouts that can become corrupted or problematic.  CSS themed layouts are much smaller under the hood and perform better too.  Not to mention the user interface benefits.  I know this isn't File maintenance exactly, but it is File cleanup.  Also, look at combining files and getting rid of old unused files.  On some large systems, I will use a scripting system to document when scripts are used so I can tell which ones are no longer used and look to remove them.  You may want to look through and turn off indexing where not needed.  I find a lot of notes and comments fields are indexed making for large indexes on a field that rarely needs searched. 


                          As noted above, the Save A Copy As "compacted copy (smaller)" will do some optimization, but not much.  Recovery can be useful, but I'm more likely to save a clone and then reimport to rebuild indexes, etc. 


                          A good Best Practice on File maintenance is to regularly upgrading your server and storage systems.  A Server should be replaced every 3 years.  Or move it into a virtual server in the Cloud where someone else is doing the hardware upgrades. 

                          • 10. Re: File maintainance - FM15

                            Compacting a FileMaker merges partially full adjacent blocks together, so there are fewer and fuller blocks. This should decrease the file size, especially in heavily used databases with lots of deletes, which can speed up operations. Compacting a FileMaker database completely recreates the database and rebuilds the tree structure (dependencies). This often a great way to remove corruption as well. Compacting a FileMaker file should be part of regular maintenance.

                            • 11. Re: File maintainance - FM15

                              One assumption that should not be made is to assume that making and saving frequent backups is all that you need do to protect files against corruption. It is possible for a file to be damaged and not immediately show any symptoms of a problem. The damaged file may then be backed up over an extended period of time before it is discovered to be damaged. In which case, you go to your backups to get an undamaged copy and they are damaged too.

                              • 12. Re: File maintainance - FM15

                                That is excellent advice. Thank you.


                                I was unsure how to use the combination of tools that FM provides as it's not really explicit as to how, and what happens and what to do with the results!


                                Thanks again.

                                • 13. Re: File maintainance - FM15

                                  Hi Taylor,


                                  Your comments really are apposite as my solution is a conversion up from FM11.

                                  I do have many (and I do mean many) legacy Classic layouts.


                                  I have created new Themes and am applying them.  Themes are major boon.. . But a major balls-ache to go through and recreate...


                                  Hey-Ho...  midnight hours looming... (Midnight Hours Looming sounds like a Bruce Springsteen song)... Big Fan, bet he's a member of the Forum.

                                  • 14. Re: File maintainance - FM15

                                    Keep teaching please.  It helps us all, and it's fun!...

                                    1 2 Previous Next