Language:


Journaling - Managing Journal Files

In a busy system with many users, it is likely that the journal file will grow in size very quickly. To prevent journal files becoming too large, you can use the Journaling setting in the System module to create new journal files periodically. Large journal files, as well as being cumbersome, will increase the time required to apply the journal.

You can create new journal files yourself, or you can have them created automatically. To create a new journal file yourself, first open the Journaling setting. The journal file(s) that are currently in the "journal" folder will be listed on the right. In this example, we are still using the first journal file "J0000001.HJN":

Then, click the [New Journal File] button. This will create a new journal file (in this example, named "J0000002.HJN") and save it in the "journal" folder. It will also be listed in the 'Journaling' window:

All changes made in the database will now be saved in the new journal file. If you need to revert to an old database, everything in both journal files that is not already in the database will be imported when you apply the journal.

It is recommended that you establish a routine for creating new journal files, for example having a new one created once a week. It is also recommended that you have the new files created automatically. To do this, open the Backup Settings setting in the System module and go to the 'Journaling' card:

Rotate Journal
Use these options to specify whether you would like a new journal file to be created every day or every week.

After changing from Manually for the first time, you should restart the server to activate the change.

Max Journal Files
Specify here how many journal files you would like to keep in the "journal" folder. For example, if you decide to keep 10 journal files as shown in the illustration, when the eleventh journal file "J0000011.HJN" is created, the first one "J0000001.HJN" will be deleted.

Please refer to the following paragraphs when deciding on how many journal files to keep.

You can leave this field blank if you do not want old journal files to be deleted automatically when new ones are created.
When you are using journaling, you will also be duplicating your database regularly. This routine will allow you to discard the older journal files, thus ensuring that they do not take up too much hard disk space. The older journal files will become redundant because the work they contain will also be stored in the more recent duplicate databases. But careful management is required, to ensure that you can combine each duplicate database with the required journal files. For example, let us assume you have the following journal files:
Journal FileDate Created
J0000001.HJNJune 1
J0000002.HJNJune 8
J0000003.HJNJune 15
J0000004.HJNJune 22
J0000005.HJNJune 29
J0000006.HJNJuly 5
J0000007.HJNJuly 12
If you need to revert to an old database, it must be one created after your oldest journal file. For example, to revert to the database created on July 10, you only need ensure that "J0000006.HJN" and "J0000007.HJN" are present in the "journal" folder when you apply the journal. Only these two journal files will contain work that is not in the database copy, so only these two files are needed to bring that copy up-to-date. The older journal files will do no harm if they are also present, but they are not necessary.

If the most recent database copy is from July 5, a date on which a new journal file was created, you should assume that "J0000005.HJN" will also be required when you apply the journal, because this may be the "current" journal file for that database. The "current" journal file is the one in which the last record was stored. When you create "J0000006.HJN", "J0000005.HJN" will remain the "current" journal file for the brief period until the next record is saved. This will be saved in "J0000006.HJN", which will then become the "current" journal file. If the database copy was made in the brief period before that record was saved, then "J0000005.HJN" will still be the "current" journal file in that database and so must be present in the "journal" folder when you apply the journal.

When you apply the journal, a message stating that "Current journal file not last file in journal folder J0000XXX.HJN" will be shown in the Terminal (Mac OS X and Linux) and in the log. In this message, "J0000XXX.HJN" is the "current" journal file for the database copy i.e. the earliest journal file that must be present in the "journal" folder. In the example, if you are reverting to a database copy created on July 10, this will be "J0000006.HJN". If "J0000006.HJN" is present in the "journal" folder, the journal will be applied. If it is not present, the journal will not be applied, and the Terminal and log will contain further messages, including "hole detected in journal". You should place "J0000006.HJN" in the "journal" folder and re-apply the journal.

The latest possible version of each journal file must be present in the "journal" folder when you apply the journal. As already mentioned, in the example, if you are reverting to a database copy created on July 10, you will need "J0000006.HJN" and "J0000007.HJN". This means the final version of "J0000006.HJN" as it was on July 12 at the moment that you created "J0000007.HJN", not any copy that you may have created on July 10 at the time of copying the database. A July 10 copy of "J0000006.HJN" will not be complete.

---

In this section:

See also:
Go back to: