It is imperative that you have a comprehensive backup strategy to avoid potentially losing data. It's easier to back up a database than it is to recreate it. By following these best practices, the impact and inconvenience of a compromised file should be minimal.
It's not always clear why a database file gets corrupted, but common reasons include:
- application/computer crash
- loss of power, so always utilize an uninterruptible power supply (UPS/battery backup)
- network latency issues
- bad sectors or a failing hard drive
- databases not properly closed prior to stopping/restarting FileMaker Server (FMS), so disable all automatic updates
To minimize the risk of unexpected behavior, the server machine should be dedicated to only FMS and should not be used by anyone else or for anything else.
FMS features built-in and robust backup scheduling as well as progressive backups to help minimize the amount of data loss. Additionally, you should incorporate third-party solutions (e.g., Sync Folders Pro) to make off-site backups (e.g., Box, Dropbox, or Amazon AWS). Note: Never back up live/open databases!
When using third-party applications, you must first pause or close the files prior to running the backup, or simply make copies of existing backups made by FMS to avoid corruption. For this reason, you should exclude FileMaker/FMS files and folders from operating system backup utilities such as Time Machine.
Additionally, you should periodically test the integrity of your backups to make sure they're usable. A backup of an already corrupt file is of little use. Finally, never directly open a backup file to avoid possibly damaging the only backup of your database. Instead, first make a copy in a different directory.
File corruption is not inevitable, and FileMaker runs consistency checks to routinely ensure that everything is in order, but it's always a good idea to take precautionary measures to prevent damage and to ensure backups are available in case of a disaster.
In the rare instance that neither your database nor backup can be opened, contact Doom Support, and we can attempt to recover data from the damaged file, but we do not guarantee that anything is possible.