Automatic integration of multiple journals

As developers and database administrators, you know the importance of quickly recovering from data corruption. Backups and journals help you with the task. But sometimes, a backup may be corrupted, and you need to come back from an older backup and integrate multiple journals consecutively. Or maybe your journal file is growing big too quickly, and you prefer to regularly create a new one to avoid cluttering your server hard drive. Or you are just using your own way of backing up your database. In all these cases, you must integrate multiple journals, which is only manually possible through the Maintenance and Security Center.

With 4D v20, you can automatically integrate multiple journals at database startup. Let me explain to you how it works.

Automatic integration of multiple journals is only available if the “Integrate latest logs if the database is incomplete” setting is activated (it is activated by default).

The “Integrate last logs if the database is incomplete” setting.

If you want 4D to integrate multiple journal files, it’s straightforward: put them next to the current journal. At application startup, if 4D detects missing operations in the database, it will first check all the journal files to determine if a recovery is possible, for example, that no operation is missing. It will then automatically integrate the operations from all your journals.

This feature should save you time during maintenance operations so you can focus on developing your application instead of spending time on manual database management tasks. If you have comments or questions, please bring them to the 4D forums.

PS: You should be careful not to inadvertently put unrelated journal files next to your current journal file, as 4D will try (and fail) to integrate them, which may generate errors at startup.

Nicolas Brachfogel
• Product Owner & Senior Developer • Nicolas Brachfogel joined 4D in 2017 as a Senior Developer (4D Server and networking). As Product Owner to manage the release of Apple Silicon, he's in charge of writing user stories and translating them into functional specifications, as well as making sure that feature implementations meet customer needs. A graduate of the Institut Supérieur d'Informatique Appliquée (INSIA), Nicolas began his career as a software developer in 2001. Following several years coding in Java and C++, he went on to specialize in client-server development for video game companies. As a server developer/architect, he successfully worked on the server architectures of many games (Dofus Arena, Drakerz, Trivial Pursuit Go!).