Log In    |    Knowledge Base    |    4D Home
Tech Tip: After a repair, use caution when dealing with the log file
Published On: June 24, 2009

You can use the MSC to repair a data file. However, if you use the data log file (.journal) you should use caution when deciding what to do after the repair:

  • When you repair a data file, the .4DD (data), .4DINDx (indexes), and .journal (log) files are moved to a backup folder.
  • The *only thing* the Repair produces is a new 4DD file.
  • The indexes are rebuilt when you launch in 4D.
  • However when you launch a repaired data file that uses a log file, 4D tells you that it can't file the log file (because it was moved by the repair). You are asked to open the log file, or create a new one.

Do not create a new log file unless you understand the consequences. This will become more important if you are using 4D's Backup. The way you restore a backup is to restore an older copy of the database and then start integrating log files. If you're missing any of those log files it won't work.

Unless you think the log file is damaged, you should copy the old one back into the same folder with the new 4DD file. You can also open it from the backup location but that can be more confusing in opening it and later when you are looking for the appropriate log file.

Commented by Luis on June 26, 2009 at 5:50 PM
When deciding to repair a data file, it is always a good idea to make a backup of the original, including the structure and any other files such as the .journal file as well.