Create a scheduled task to archive log files
This documentation is for legacy Kiwi Syslog Server versions 9.8.2 and older.
To save disk space, you can create a task to automatically archive log files that are no longer needed for troubleshooting (for example, log files that are more than a week old). The archive task includes options to move files to another location, compress them, encrypt them, and send notifications. You can schedule the task to run at regular intervals.
You can also create a scheduled task to remove archived files after the retention period is over. For an example of creating archive and cleanup tasks, see Create schedules to automate log archival and retention in the Kiwi Syslog Server Getting Started Guide.
- From the Kiwi Syslog Service Manager, choose File > Setup.
In the left pane of the Setup dialog, right-click Schedules and select Add new schedule.
Replace the default name with a descriptive name (for example, Archive logs after 7 days).
- As the Task Type, select Archive.
As the Task Trigger, specify when you want the archive task to run:
- To schedule the task, select On a schedule. Then specify the start date, frequency, end date, and any exceptions on the Schedule tab.
- To run the task each time you start or stop the Kiwi Syslog Server application or service, select On app/service startup or On app/service shutdown.
- On the Source tab:
Under Source location, specify the location of the files to archive.
By default, log files are stored in the following directory:
C:\Program Files (x86)\Syslogd\Logs\
Under Source files, specify which files are archived.
The following example archives TXT files that are at least 8 days old.
- On the Destination tab:
Specify the destination folder.
Kiwi Syslog Server provides the following default folder for storing archived logs:
C:\Program Files (x86)\Syslogd\Dated Logs\
- Specify whether you want to move or copy the files.
(Optional) Select options to create a dated root folder in the specified destination, and to add a date to each archived file name.
You can use the Adjust file/folder date(s) option to adjust each file or folder date to reflect the date of the logs, instead of the current date. For example, if you are archiving files that are a week old, you can shift the date back one week.
- To compress the archived files, select the following options on the Archive Options tab:
Select Zip files after moving/copying.
Select the compression level and method:
- None: does not compress the files.
- Low: takes the least amount of time to compress the data, but files are larger.
- Medium: provides the best balance between the time required to compress the data and the compression ratio.
- High: produces slightly smaller files but requires significantly longer compression times. This option is recommended only when space is limited and processing time is not important.
- Stored (None): does not compress the files.
- Deflate: provides the fastest compression.
- Deflate64: takes longer but provides better compression.
(Optional) To encrypt the files, select Encrypt zip files, and specify the encryption properties.
Password Enter a case-sensitive password of up to 79 characters. If the password is blank, the files are not encrypted. Encryption type WinZip AES provides stronger encryption than Compatible. Encryption strength If you selected WinZip AES, specify the size of the encryption key.
- To run a program after the files are archived, select the following options on the Archive Options tab:
- Select the option to run a program after each file is archived or after all files are archived.
Specify the location of the executable file, and enter any command-line parameters to pass to the executable.
To include a file name, folder name, or current date in the command-line parameters, click Variable options and select the value to include.
To specify the maximum time to wait for the program to run, select Wait for program completion. Then enter the maximum number of seconds to wait.
Programs or processes that are still running after this period are terminated.
- To email or save the report generated each time the archive task runs, select one or more options on the Archive Notifications tab.
- To email the report to multiple recipients, separate the list of email addresses by commas or semicolons.
- If you save the report to a file, insert date and time variables in the file name to ensure that it is unique. If the file name is not unique, Kiwi Syslog Server overwrites the existing file when it creates a new file.
- Click Apply to save your changes.