<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarai.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data archiver - what&amp;#39;s happening in the back end?</title><link>https://sugarclub.sugarai.com/dev-club/f/questions-answers/8315/data-archiver---what-s-happening-in-the-back-end</link><description>I have a lot of questions about Data Archiver and what happens in the backend when you archive a module&amp;#39;s records without deleting the records. 
 I&amp;#39;ll start with one scenario: Say I archive all Closed Cases created 5 or more years ago. 
 
 Do the cases_audit</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Data archiver - what's happening in the back end?</title><link>https://sugarclub.sugarai.com/thread/33705?ContentTypeID=1</link><pubDate>Tue, 10 Feb 2026 00:46:03 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:b5eba0a4-75ca-4cbc-adec-daa568f434c0</guid><dc:creator>Angel Magana</dc:creator><description>&lt;p&gt;I am not sure I&amp;#39;ve seen a &amp;quot;clean&amp;quot; approach, for the reasons you&amp;#39;ve highlighted, i.e. the related data is problematic.&lt;/p&gt;
&lt;p&gt;In some cases we&amp;#39;ve had customers simply purge data they felt they no longer needed. This tends to require a bit of collaborative work to ensure the corresponding SQL queries target the appropriate data, etc.&lt;/p&gt;
&lt;p&gt;In other cases,&amp;nbsp;customers have taken a backup from a cutoff date and then used that to stand-up a local instance used for archive purposes only, then purged all the old data from the production instance using the cutoff date as the criteria for all tables.&lt;/p&gt;
&lt;p&gt;The latter is probably the more common technique I have seen with the added benefit that the archived data is more easily retrieved. It is tedious, but seems to work well. It does also require discipline on the part of users to know they have to go to a different URL to see old data, but that&amp;#39;s not a difficult ask in my opinion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data archiver - what's happening in the back end?</title><link>https://sugarclub.sugarai.com/thread/33702?ContentTypeID=1</link><pubDate>Mon, 09 Feb 2026 18:41:28 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:923e584b-b529-4b36-86c5-3f77b7600308</guid><dc:creator>Francesca Shiekh</dc:creator><description>&lt;p&gt;&lt;a href="/members/amagana"&gt;Angel Magana&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am still struggling with Archiving data...&lt;br /&gt;&lt;br /&gt;Does Sugar have a good strategy to share for archiving?&lt;br /&gt;Do you know of any customers successfully archiving their data other than a table by table approach?&lt;br /&gt;&lt;br /&gt;Archiving data from a single table can create orphans all over the place, both actual orphans with tables with orphan Foreign Keys, and conceptual orphans, for example what&amp;#39;s the point of keeping case emails without the case to thread them together?&lt;br /&gt;&lt;br /&gt;Archiving by date also doesn&amp;#39;t always make sense, I may not have changed an Account in years, but I may have all sorts of things linked to that account since then because they are an old and very active customer...&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;FrancescaS&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data archiver - what's happening in the back end?</title><link>https://sugarclub.sugarai.com/thread/33701?ContentTypeID=1</link><pubDate>Mon, 09 Feb 2026 18:27:54 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:07b37b60-9948-4d96-8736-ac79ae40e12d</guid><dc:creator>Francesca Shiekh</dc:creator><description>&lt;p&gt;I just did an audit, using queries and our own Wolfram Language, of my database.&lt;/p&gt;
&lt;p&gt;The audit tables after using sugar for 15 years are HUGE.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;cases_audit is second only to emails_text (emails_text is&amp;nbsp;more than&amp;nbsp;a quarter of the database by itself).&lt;br /&gt;All of the audit tables added up have&amp;nbsp;&lt;span&gt;139,684,074 rows of data!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:375px;max-width:500px;" alt=" " src="/resized-image/__size/1000x750/__key/communityserver-discussions-components-files/54/Screenshot-2026_2D00_02_2D00_09-at-11.17.31.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I am now&amp;nbsp;leveraging &lt;a href="/members/rifa"&gt;Chris Raffle&lt;/a&gt;&amp;nbsp;&amp;#39;s team&amp;#39;s&amp;nbsp; &lt;a href="https://upsertconsulting.com/plugins/lens/"&gt;UpsertLens&lt;/a&gt; to review the vardefs for every module&amp;nbsp;starting from the ones with the biggest audit logs.&lt;br /&gt;&lt;br /&gt;The goal is to determine:&lt;/p&gt;
&lt;p&gt;- what &lt;em&gt;really&lt;/em&gt; needs to be audited in each module&lt;/p&gt;
&lt;p&gt;- how long to keep the audit in Sugar&lt;/p&gt;
&lt;p&gt;From there we will need to figure out different strategies for different modules.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve already determined that we want to turn off auditing on Prospects and we can truncate that table, we&amp;#39;re cutting Cases down to 3 years and with about half as many audited fields as we have today.&lt;br /&gt;&lt;br /&gt;A tool to manage audits separately from other forms of archiving wold be great, so we can define retention periods per module.&lt;/p&gt;
&lt;p&gt;Francesca&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data archiver - what's happening in the back end?</title><link>https://sugarclub.sugarai.com/thread/33700?ContentTypeID=1</link><pubDate>Mon, 09 Feb 2026 18:15:35 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:2fa2a3c3-e4b8-4624-9539-ba2869417a59</guid><dc:creator>Angel Magana</dc:creator><description>&lt;p&gt;We will forward your comment as a suggestion for future enhancements.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data archiver - what's happening in the back end?</title><link>https://sugarclub.sugarai.com/thread/33696?ContentTypeID=1</link><pubDate>Mon, 09 Feb 2026 16:49:50 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:f34410a4-ed66-407f-a5e7-d03ef5951abd</guid><dc:creator>Vincent Amari</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="/members/amagana"&gt;Angel Magana&lt;/a&gt;&amp;nbsp;&lt;br /&gt;what are the chances of extending the current features of the Data Archiver, to deal with the ever growing Audit tables?&amp;nbsp;&lt;span class="emoticon" data-url="https://sugarclub.sugarai.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data archiver - what's happening in the back end?</title><link>https://sugarclub.sugarai.com/thread/33691?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2026 02:24:11 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:3a07d19d-a0f3-4d7b-be48-fb39197ac1e9</guid><dc:creator>Francesca Shiekh</dc:creator><description>&lt;p&gt;I do&amp;nbsp;my best to keep things interesting for you &lt;span class="emoticon" data-url="https://sugarclub.sugarai.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the details!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data archiver - what's happening in the back end?</title><link>https://sugarclub.sugarai.com/thread/33686?ContentTypeID=1</link><pubDate>Thu, 05 Feb 2026 05:10:36 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:4b84f063-6061-48e9-99d0-649ad9c385d4</guid><dc:creator>Angel Magana</dc:creator><description>&lt;p&gt;Hi Francesca,&lt;/p&gt;
&lt;p&gt;You always have to pique my curiosity, don&amp;#39;t you? ;)&lt;/p&gt;
&lt;p&gt;I went and looked at the related code and it&amp;nbsp;seems like different things happen based on whether you are performing a hard delete or just archiving.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the case of the audit data, it is purged if you are performing a hard delete operation, but if you are archiving, nothing happens to it and is effectively orphaned.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As for the linked emails and other relationships, similar logic seems to apply to that data in that if you perform a hard delete, the data is purged, but if you are just archiving, nothing happens to it.&lt;/p&gt;
&lt;p&gt;Lastly, with regards to uploads, we don&amp;#39;t have a way to archive attachments and the only consideration they are given within the context of the data archiver functionality&amp;nbsp;is that it deletes the file should the Notes module be the target of the archive operation.&lt;/p&gt;
&lt;p&gt;If you are interested in taking a look at the code, check out ./src/DbArchiver/DbArchiver.php, the bulk of the work stems from performProcess().&lt;/p&gt;
&lt;p&gt;Hope that helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>