Frequently Asked Question

Deleting Old Data in TBS
Last Updated 3 years ago

Deleting Old Data in TBS

TBS does not delete data in the normal course of its day to day use - it actually 'archives' any data told to be deleted

This policy has many benefits, not the least of which is relatively easy access to data deleted by mistake !

However from time to time, users may wish to have a general removal of old unwanted data - especially to physically delete old attachments, both from emails (if you use TBS mail sending) as well as from old bookings - as attachments are the cause of making backup files extremely large

TBS has a place for enabling users to be in control over their own old data removal policies :

This shows a list of 'rules' to show what exactly you are going to delete.

Note : THIS METHOD IS DANGEROUS ! Once data has been deleted, it has gone, and gone for good, no undo - BE AWARE

To create a new rule, click on the New button of the toolbar to open the rule edit screen :

In this example we are going to show you how to remove attachments and email attachments older than 2 years.....

The 'schema' name is the internal name of the data table you wish to tidy up - we will create additional criteria below to determine exactly what data you wish to remove from this table. As the data within TBS is heavily connected between all of the tables, data removal often has to be done in strict order to ensure that the data you wish to remove does not still have any related data in another place, which would therefore prevent removal of your chosen data. If in any doubt, seek assistance from TBS support when setting up your deletion rules.

For our first rule, set the Schema name to : Attachments

The 'Inactivity' column is the column within that schema that we wish to use in order to determine the data we wish to delete

For Attachments, this should be set to : INSDATETIME (a column that can be found in every TBS schema that denotes the date and time a record was first inserted in to the database, sometimes shown as Created Date or Inserted Date)

The 'Inactivity Period' column shows the number of years old that we wish our entries to be in order to be deleted - so here enter 2

For the majority of deletion requirements a simple date will suffice but if you need more complex table/field definitions, the Check Column 2 and 3 together with the Check for Column 2 and 3 can allow this - they are not needed here....

If your deletion criteria is not date based as above, you can also (alternately to using the fields above) write out an entire SQL statement to execute here - again, seek assistance from TBS support if required

For our purpose however the above entry is all that we require to delete attachments older than 2 years, and so we can Save this entry :

We can add a similar entry for the schema 'Email attachments' :

When ready to actually delete your data, simply click on the 'Delete Data' button in the toolbar - a double check question is asked :

If all is ok, click on Yes - and the deletion will commence - all going well you will see :

Please Wait!

Please wait... it will take a second!