KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Compacting, Recover by Tags & Completely Delete
PRODUCT: 4D Tools | VERSION: | PLATFORM: Mac & Win
Published On: April 7, 2000
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

4D Tools includes options for Compacting a data file and for performing a Recover by Tags on a data file. Compacting removes unused space from inside of the data file - unused space that is the natural result of modifying and deleting records. Recover by Tags instructs 4D Tools to recover all records using "tags" which are markers stored with every record when they are created. Both Compacting and Recover by Tags result in a new copy of the data file being created, so you must have a single mounted volume with at least enough free disk space to duplicate your existing data file. It is also a good idea to make an extra backup copy of your original data file before performing any maintenance operations.

Chapters 4 and 5 of the 4D Tools Reference (pdf format) explain these concepts.

If you read the 4D Tools Reference you will find a warning that a data file which has been recovered by tags may contain records that were deleted. Pages 129-130 of the 4D Design Reference (pdf format) explain the circumstances under which this may happen.

To be absolutely sure you do not accidentally recover any deleted records during a Recover by Tags operation, always do a Compact operation before the Recover by Tags. Alternately, make sure you leave the option "Completely Deleted" turned ON for all tables in your database structure (this is the default setting).

NOTE: Performing a Recover by Tags should be used as a last resort. If a data file is corrupted, it is better to recover from a backup of the data file than to use 4D Tools to try to fix it.

IMPORTANT NOTE: If you suspect that your data file is damaged and that you may have lost some records, you should perform a Recover by Tags without Compacting in order to retrieve the maximum amount of records.