Data Purge: Limitations and FAQ
This page collects what the purge does not do, and the questions that come up at almost every customer. For the mechanics, start with What a Data Purge Does.
Limitations
- It covers the whole database. Every company is purged up to the same cut-off; there is no way to purge one company alone.
- All companies must share one calendar, the calendar of the year that holds the cut-off.
- No replication. Replication must be off during the purge; the sites then get a copy of the purged database.
- Forward only, one at a time. Each purge needs a later cut-off than the one before, one configuration per purge period, and one purge running at a time.
- No undo except restoring the backup of both databases.
- Attachments are not archived. The attachments of deleted documents are deleted with them; the archive keeps only the reference. Attachment files stored outside the database are not removed from the disk.
- Some secondary document grids are not archived. The archive keeps the header and the lines of an archived document; a grid that has no archive table is deleted without a copy.
- Only ten document types can be archived: sales and purchase invoices and returns, stock issues and receipts, point of sale invoices and returns, car sales invoices and returns. Every other type can be deleted or marked.
- FIFO issue lines kept across the cut-off lose their document. An issue of the range still waiting for a layer at the cut-off is kept under a roll-up receipt. When a later receipt gives it a layer, its cost is matched as usual, but no cost-of-sales entry is created for it, because its document and request are gone. A kept transfer-out line no longer reads as a transfer; where cost is tracked per warehouse, its transfer-in layer would stay at cost zero. The pre-flight warning FIFO issue lines kept open across the cut-off lists these lines before the run.
- Stock ages switched on inside the range. The ages are restated for the whole stock at the cut-off, not only for the part that had ages history.
- The dry run counts drafts. Its document counts can be a little higher than what the purge processes.
- The processed-rows counter is approximate. A batch that was interrupted and resumed shows fewer rows than it processed, and a marking batch shows about three rows per document. The data itself is complete either way.
- The archive is not visible in Nama. It is queried by SQL only.
Questions
Can we purge only one company?
No. Several stock ages and debt ages tables are shared by all companies, so a single-company purge would delete the other companies' data without restating it. The roll-up documents are still made per company.
Do we have to close the years first?
Yes. Every period up to the cut-off must be closed, and every company with balances in the range needs a committed closing entry dated on or after the cut-off. The purge refuses otherwise, because it would freeze figures that could still change and carry income-statement balances into the new year. See Close the purged range.
What happens to a draft dated in the purged range?
It stays, untouched. But from the moment the purge starts it can no longer be saved or committed, because its date is inside the protected range. Commit or delete such drafts before the purge, or re-enter them with a date after the cut-off.
Can users keep working during the purge?
On dates after the cut-off, yes, but the database is under heavy load for many hours, and stock ages and debt ages processing wait until the purge finishes. Plan the run outside working hours.
The server was restarted in the middle of the purge. What now?
Nothing. The purge continues by itself when the server is back. See A server restart is not a failure.
The purge failed. Is the data damaged?
No. Everything done so far is committed and consistent, and the purge waits. Fix the cause and press Resume purge; it continues where it stopped. Do not leave it in that state: until it finishes, balances can look doubled and the range refuses postings. See When a Purge Fails.
Can we change the configuration after starting?
No. Once a purge has started its configuration can not be edited or deleted; it is the permanent record of how far the database was purged. Fix what the purge reports elsewhere (the term, the archive, the data) and resume.
Why does the trial balance show the same totals but the ledger lines report differs slightly on one account?
The roll-up restates the balances the trial balance has always shown. Where the ledger lines and the balances disagreed inside the range because of an old difference, the old lines are gone and the difference with them. See Known differences.
Why is the database file the same size after the purge?
The purge frees space inside the file but does not shrink it. SQL Server reuses the space for new data. See Database space.
Can we bring a deleted document back?
Only by restoring the backup taken before the purge. Archived documents can be read from the archive database by SQL, but they can not be brought back into the main database.
Can we purge a year, and next year purge the following one?
Yes. That is the recommended routine once the first purge is done: after each year-end closing, add a purge period to the closed year, create a new configuration and run it. Each purge leaves the earlier roll-ups alone.
Can we purge 2018 after we already purged 2020?
No. A purge can only move forward. A configuration whose cut-off is not later than an earlier started purge is refused, because the same range would be rolled up twice.
Who can run it?
The admin user, with the critical security levels of the purge allowed by the Namasoft CRM. Create Missing Indexes additionally needs the admin user signed in through the Namasoft CRM. In practice the purge is run by Namasoft support or an implementer with that access.
What does Mark Purged leave in the database?
The document itself, readable but locked, with its lines. Its ledger, stock and cost effects in the range are deleted and carried by the roll-ups, like everybody else's, and its aliases, numbering rows and system entries are removed. Any type you did not list in the grids is marked.