---
title: Logic
slug: singleconnect-reference-guide-3-1-0/logic
description: This document explains a script that exports tables from a database and organizes them in a logical manner for easy data restoration. The script creates separate tar files for configuration and log files, with specific filenames for each. The configuratio
docTags: 
createdAt: 2022-08-02T08:28:51.000Z
---

The Script backs up the data by exporting the related tables from the source database every night, and storing them systematically, following the **logically divided table rule**. Thanks to this procedure, the Support Engineer or Operation Engineer will be able to restore data for a specific date whenever they want, within the defined backup timeframe.

The script creates 2 separate tar files with a specific filename pattern:&#x20;

-  for configuration files:&#x20;
  YYYYMMDD.config.tgz (four digits year, two digits month and two digits day)
-  for log files:
  YYYYMMDD.log.tgz (four digits year, two digits month and two digits day)

The config subfixed tar file contains the data related to Single Connect’s configurations such as devices, users, realms, etc.&#x20;

The Log subfixed tar file contains data related to Single Connect, such as SSH, RDP, HTTP and SAPM logs.&#x20;


