<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-2297 How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-2297 How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script</link><pubDate>Thu, 28 Mar 2024 16:35:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Current Revision posted to Appian Knowledge Base by Ryan Good on 3/28/2024 4:35:05 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Logs that are cleaned up when using the &lt;code&gt;logsv2&lt;/code&gt; option include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases of the&amp;nbsp;&lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;code&gt;-debug&lt;/code&gt;&amp;nbsp;flag enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>KB-2297 How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/29</link><pubDate>Thu, 28 Mar 2024 16:33:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 29 posted to Appian Knowledge Base by Ryan Good on 3/28/2024 4:33:59 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Logs that are cleaned up when using the &lt;code&gt;logsv2&lt;/code&gt; option with the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases of the&amp;nbsp;&lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;code&gt;-debug&lt;/code&gt;&amp;nbsp;flag enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>KB-2297 How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/28</link><pubDate>Thu, 28 Mar 2024 16:32:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 28 posted to Appian Knowledge Base by Ryan Good on 3/28/2024 4:32:49 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;Logs that are cleaned up when using the logsv2 option with the cleanup script include the following:&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases of the&amp;nbsp;&lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;code&gt;-debug&lt;/code&gt;&amp;nbsp;flag enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>KB-2297 How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/27</link><pubDate>Thu, 28 Mar 2024 16:32:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 27 posted to Appian Knowledge Base by Ryan Good on 3/28/2024 4:32:26 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Logs that are cleaned up when using the logsv2 option with the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases of the&amp;nbsp;&lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;code&gt;-debug&lt;/code&gt;&amp;nbsp;flag enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>KB-2297 How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/26</link><pubDate>Tue, 12 Mar 2024 21:50:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 26 posted to Appian Knowledge Base by Ryan Good on 3/12/2024 9:50:06 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases of the&amp;nbsp;&lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;code&gt;-debug&lt;/code&gt;&amp;nbsp;flag enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/25</link><pubDate>Thu, 07 Mar 2024 20:43:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 25 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 8:43:42 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases of the&amp;nbsp;&lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;code&gt;-debug&lt;/code&gt;&amp;nbsp;flag enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/24</link><pubDate>Thu, 07 Mar 2024 20:43:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 24 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 8:43:13 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases of the&amp;nbsp;&lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/23</link><pubDate>Thu, 07 Mar 2024 20:42:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 23 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 8:42:27 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases with the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/22</link><pubDate>Thu, 07 Mar 2024 20:42:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 22 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 8:42:10 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tomcat&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;span&gt;Below are example use cases the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/21</link><pubDate>Thu, 07 Mar 2024 20:30:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 21 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 8:30:33 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;tomcat-stdOut.log&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tomcat-access.log&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/20</link><pubDate>Thu, 07 Mar 2024 20:30:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 20 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 8:30:10 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: March 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/19</link><pubDate>Thu, 07 Mar 2024 20:09:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 19 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 8:09:34 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be run to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/18</link><pubDate>Wed, 31 Jan 2024 20:46:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>pauline.delacruz</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 18 posted to Appian Knowledge Base by pauline.delacruz on 1/31/2024 8:46:14 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, the&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/17</link><pubDate>Wed, 31 Jan 2024 20:45:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>pauline.delacruz</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 17 posted to Appian Knowledge Base by pauline.delacruz on 1/31/2024 8:45:11 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;code&gt;-logDir&lt;/code&gt; flag can be used to point to a different log directory rather than the default logs folder.&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/16</link><pubDate>Wed, 31 Jan 2024 20:29:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>pauline.delacruz</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 16 posted to Appian Knowledge Base by pauline.delacruz on 1/31/2024 8:29:09 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To point to a different log directory than the default logs folder, run the following&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -logDir &amp;lt;Log_Directory&amp;gt; -target &amp;lt;Backup_Location&amp;gt; -keep 30&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/15</link><pubDate>Wed, 31 Jan 2024 20:28:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>pauline.delacruz</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 15 posted to Appian Knowledge Base by pauline.delacruz on 1/31/2024 8:28:45 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To point to a different log directory than the default logs folder, run the following&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -logDir &amp;lt;Log_Directory&amp;gt; -target &amp;lt;Backup_Location&amp;gt; -keep 30&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/14</link><pubDate>Wed, 31 Jan 2024 20:27:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>pauline.delacruz</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 14 posted to Appian Knowledge Base by pauline.delacruz on 1/31/2024 8:27:44 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To point to a different log directory than the default logs folder, run the following&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -logDir &amp;lt;Log_Directory&amp;gt; -target &amp;lt;Backup_Location&amp;gt; -keep 30&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/13</link><pubDate>Wed, 31 Jan 2024 20:26:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>pauline.delacruz</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 13 posted to Appian Knowledge Base by pauline.delacruz on 1/31/2024 8:26:12 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To point to a different log directory than the default logs folder, run the following&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -logDir &amp;lt;Target log directory&amp;gt; -target &amp;lt;Backup_Location&amp;gt; -keep 30&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/12</link><pubDate>Wed, 31 Jan 2024 19:43:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>Appian Community</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 12 posted to Appian Knowledge Base by Appian Community on 1/31/2024 7:43:38 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To point to a different log directory than the default logs folder, run the following&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -logDir &amp;lt;Target log directory&amp;gt; -target &amp;lt;Backup_Location&amp;gt; -keep 30&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To&amp;nbsp;run the debug flag with the cleanup script,&amp;nbsp;run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 30 -debug&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The debug parameter&amp;nbsp;enables debugging information&amp;nbsp;helpful for troubleshooting.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of classic Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/10</link><pubDate>Wed, 31 Jan 2024 18:56:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>pauline.delacruz</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 10 posted to Appian Knowledge Base by pauline.delacruz on 1/31/2024 6:56:22 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs with the &lt;code&gt;logsv2&lt;/code&gt; option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log&lt;/li&gt;
&lt;li&gt;tomcat-access.log&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;code&gt;logsv2&lt;/code&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item><item><title>[DRAFT SP-8846] KB-XXXX How to use logsv2 inside the Cleanup Script</title><link>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script/revision/9</link><pubDate>Wed, 31 Jan 2024 18:52:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98dc77b-fe03-440b-bad1-fa4e6f8c869c</guid><dc:creator>pauline.delacruz</dc:creator><comments>https://community.appian.com/support/w/kb/3433/kb-2297-how-to-use-logsv2-inside-the-cleanup-script#comments</comments><description>Revision 9 posted to Appian Knowledge Base by pauline.delacruz on 1/31/2024 6:52:06 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;For data maintenance, the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;cleanup script&lt;/a&gt; can be ran to move logs and process archives to a backup location and remove the old ones from the server. This script has been updated to account for Tomcat logs.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some of the logs that are cleaned up by the cleanup script include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tomcat-stdOut.log(s)&lt;/li&gt;
&lt;li&gt;tomcat-access.log(s)&lt;/li&gt;
&lt;li&gt;Engine Performance&lt;/li&gt;
&lt;li&gt;Removed Processes&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Logins&lt;/li&gt;
&lt;li&gt;Engine Calls&lt;/li&gt;
&lt;li&gt;Expressions Performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To run the&amp;nbsp;Cleanup Script, follow the steps in the &lt;a href="https://docs.appian.com/suite/help/latest/Data_Maintenance.html#cleanup-script"&gt;documentation&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see the below examples on using the &lt;strong&gt;logsv2&lt;/strong&gt; option:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;To&amp;nbsp;move files to a backup directory and keep the five most recent versions of log files, run the following:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -target &amp;lt;Backup_Location&amp;gt; -keep 5&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;To delete files and keep the 30 most recent versions of log files, run the following:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/_scripts/cleanup.sh logsv2 -delete -keep 30&lt;/pre&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to all self-managed versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2024&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Cleanup Script, how-to, infrastructure&lt;/div&gt;
</description></item></channel></rss>