How to Create Maintenance Task to Remove Journal Files
Question
How do I create a maintenance task to remove HVR journal files from directory $HVR\_CONFIG/jnl
?
Environment
HVR 5
Answer
During data replication, by default, HVR deletes the transaction files after they have been applied to the target(s). For debugging purposes, or generally just to have the ability to look back in the sequence of transactions, HVR provides the ability to store a copy of the transaction files in a separate directory after they have been applied. This article discusses the management of this history journal of the transaction files to prevent the file system from filling up.
You can create a maintenance task to remove the router files stored in the directory $HVR_CONFIG/jnl
by adding the action Integrate/JournalRouterFiles to the channel.
Prerequisite
- Router files are already present in the directory
$HVR_CONFIG/jnl/<hubname>/<channelname>/<yyyymmdd>/integ_<tgt_location>_loc_<src_location>/loc_ <tgt_location>
.
Steps
Right-click Scheduler and select Maintenance Tasks.
In the pop-up dialog, click Add.
Specify a name for the task (for example,
removejournalfiles
) and click OK.From the tasks list, select this task, enable journal_keep_days, and enter a value (number of days). By default, it is 7, which means 7 days old journal files are removed.
Schedule the task to run at a certain interval (for example, Weekly).
Click Save.