{"id":1582,"date":"2024-06-17T15:16:03","date_gmt":"2024-06-17T09:46:03","guid":{"rendered":"https:\/\/adilfahim.com\/myblog\/?p=1582"},"modified":"2024-06-17T15:16:03","modified_gmt":"2024-06-17T09:46:03","slug":"transport-cleanup","status":"publish","type":"post","link":"https:\/\/adilfahim.com\/myblog\/transport-cleanup\/","title":{"rendered":"SAP | Cleaning Up the Transport Directory: Best Practices"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/06\/stms.jpg\" alt=\"transport\" width=\"1024\" height=\"555\" class=\"alignnone size-full wp-image-1583\" srcset=\"https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/06\/stms.jpg 1024w, https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/06\/stms-300x163.jpg 300w, https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/06\/stms-768x416.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h2>Introduction of SAP Transport<\/h2>\n<p>Over time, the global transport directory in SAP systems can accumulate a large number of files. These files reside in subdirectories such as &#8216;cofiles&#8217;, &#8216;data&#8217;, and &#8216;log&#8217;. While these files contain important information, they can also consume valuable disk space and become obsolete. In this article, we&#8217;ll explore how to efficiently clean up the transport directory to maintain system performance and manage storage effectively.<\/p>\n<h2>Prerequisites<\/h2>\n<p>Before proceeding with any cleanup, consider the following points:<\/p>\n<p>1. Policy and Compliance: Clarify whether you are allowed to delete old transports. Some organizations may have retention policies that require keeping transports for a specific duration (e.g., 10 years for audits).<\/p>\n<p>2. Transport Profile: Familiarize yourself with the transport profile. The transport profile is defined in the file &#8216;TPPARAM&#8217; located in the &#8216;bin&#8217; subdirectory of the transport directory. It contains parameters that control the minimum lifetime of files in different subdirectories.<\/p>\n<p><a href=\"https:\/\/adilfahim.com\/myblog\/sap-stms-buffer-cleanup-automatically-while-adding-transport\/\" target=\"_blank\" rel=\"noopener\">SAP STMS \u2013 Buffer Cleanup automatically while adding transport<\/a><\/p>\n<h2>Cleanup Steps<\/h2>\n<p>Follow these steps to clean up the transport directory:<\/p>\n<p>1. Log On to the Operating System:<br \/>\n   &#8211; Access the operating system where your SAP system is installed.<br \/>\n   &#8211; Log in using the `sidadm` user (replace `sid` with your system ID).<\/p>\n<p>2. Navigate to the Transport Directory:<br \/>\n   &#8211; Change the directory to `\/usr\/sap\/trans\/bin`.<\/p>\n<p>3. Check Deletable Files:<br \/>\n   &#8211; Run the command: &#8216;tp check all pf=TP_DOMAIN_<SID>.PFL&#8217;.<br \/>\n   &#8211; This command generates a list of deletable files based on requests that are not marked for import into an SAP system. The list is stored in the &#8216;check.log&#8217; file in the &#8216;tmp&#8217; subdirectory.<\/p>\n<p>4. Test the Cleanup Command (Optional):<br \/>\n   &#8211; To simulate the cleanup process, use: `tp testold all`.<br \/>\n   &#8211; This command behaves like &#8216;tp clearold all&#8217; but writes the results to the &#8216;testold.log&#8217; file in the &#8216;tmp&#8217; subdirectory.<\/p>\n<p>5. Perform Cleanup:<br \/>\n   &#8211; Execute the actual cleanup: &#8216;tp clearold all&#8217;.<br \/>\n   &#8211; This command deletes files from the `cofiles`, &#8216;log&#8217;, and &#8216;olddata&#8217; subdirectories. It also moves files older than 6 months from &#8216;data&#8217; to &#8216;olddata&#8217;.<br \/>\n   &#8211; The results are logged in &#8216;clearold.log&#8217;.<\/p>\n<p><b>Transport Profile Parameters<\/b><\/p>\n<p>The following parameters in the transport profile control file lifetimes (all durations are in days):<\/p>\n<p>&#8211; &#8216;datalifetime&#8217;: Minimum lifetime of files in the &#8216;data&#8217; subdirectory.<br \/>\n&#8211; &#8216;loglifetime&#8217;: Minimum lifetime of files in the &#8216;log&#8217; subdirectory.<br \/>\n&#8211; &#8216;olddatalifetime&#8217;: Minimum lifetime of files in the &#8216;olddata&#8217; subdirectory.<br \/>\n&#8211; &#8216;cofilelifetime&#8217;: Minimum lifetime of files in the &#8216;cofiles&#8217; subdirectory.<\/p>\n<p>Remember:<br \/>\n&#8211; Avoid listing these parameters system-specifically, as subsequent &#8216;tp&#8217; calls won&#8217;t work with a specific SAP system. Always use the parameter &#8216;ALL&#8217;.<\/p>\n<p><b>Additional Resources<\/b><\/p>\n<p>For more details, refer to the official SAP documentation:<br \/>\n&#8211; <a href=\"https:\/\/help.sap.com\/doc\/saphelp_nw73ehp1\/7.31.19\/en-US\/3d\/ad5b674ebc11d182bf0000e829fbfe\/content.htm\" target=\"_blank\" rel=\"noopener\">Cleaning Up the Transport Directory<\/a><\/p>\n<p>SAP Notes &#8211;<br \/>\n<a href=\"https:\/\/me.sap.com\/notes\/41732\" target=\"_blank\" rel=\"noopener\">41732<\/a> &#8211; Deletion of data in transport directory<br \/>\n<a href=\"https:\/\/me.sap.com\/notes\/3471409\" target=\"_blank\" rel=\"noopener\">3471409<\/a> &#8211; How to cleaning up the transport directory<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction of SAP Transport Over time, the global transport directory in SAP systems can accumulate a large number of files. These files reside in subdirectories such as &#8216;cofiles&#8217;, &#8216;data&#8217;, and &#8216;log&#8217;. While these files contain important information, they can also consume valuable disk space and become obsolete. In this article, we&#8217;ll explore how to efficiently [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8],"tags":[1099,1097,1096,1098,339,1101,1100,1102],"class_list":["post-1582","post","type-post","status-publish","format-standard","hentry","category-sap-updates","tag-usr-sap-trans","tag-sap-note-3471409","tag-sap-note-41732","tag-sap-transport-cleanup","tag-stms","tag-tp-check-all","tag-tp-clearold","tag-tpparam"],"_links":{"self":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts\/1582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/comments?post=1582"}],"version-history":[{"count":1,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts\/1582\/revisions"}],"predecessor-version":[{"id":1584,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts\/1582\/revisions\/1584"}],"wp:attachment":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/media?parent=1582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/categories?post=1582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/tags?post=1582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}