Calling eels_log_archive automatically
It is possible to call
eels_log_archive(1Meels)
automatically from within /etc/default/eels whenever the
EELS database reaches a specific size. When
eels_log_archive is called in this way, it behaves
with the following characteristics:
-
all records successfully archived are purged from the
database (-p option)
-
the archive name specified by the filename parameter
(see below) is automatically appended with a date stamp
-
the command is always run in quiet mode
Take the following steps to customize EELS to archive
the default database whenever it exceeds 30 megabytes in size:
-
Log in as root.
-
Add the following lines to the bottom of
/etc/default/eels:
auto-archive archive_1 {
source default;
query "select * from events";
filename "/etc/eels/archives/eels_arch";
trigger 30M;
frequency 1H;
}
This parameter block specifies that EELS must check every
hour that the size of the database specified in source
does not exceed 30 megabytes in size. Once it does exceed 30 megabytes,
use the SQL query specified in query to archive
the contents of the database to filename and then purge
that data from the database.
-
Save the changes to /etc/default/eels.
-
Restart EELS by entering the following
commands:
/etc/init.d/eelsrc stop
/etc/init.d/eelsrc start
EELS immediately checks to see if the specified
size (in this case 30 megabytes) has been reached. If it has, it
automatically archives the records retrieved by query
to the archive file and then removes those records from the database.
The same check is then performed every hour.
The archive file can be restored at any time by using
eels_log_restore(1Meels).
For more information on restoring archives, see
``Restoring EELS database records''.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004