The following steps are to setup the custom structure for this customer, where Partition Tables are used and the shell scripts are jobs to be scheduled in Crontab process to create the tables per hour or per day, according to the configuration in the script located at scripts/partition-tables/run.sh.
1. Database scripts
Run the below SQL files to create the objects in the database:
e.g. psql -h <db_host> -U <db_username> -d <db_name> < <script.sql>
tables.sqlto create the protocols partition tables, other tables and their corresponding indexes.views.sqlto create the Views.functions.sqlto create the Functions.data.sqlto insert the command_code, diameter_dictionary, dra_peers and ip_names default data.
2. Crontab scripts The "scripts" folder contains scripts to be configured as crontab jobs. Apply the configuration below:
# m h dom mon dow command
0 0 * * * /path/to/scripts/remove-temp-downloads/run.sh
0 0 * * * /path/to/scripts/partition-tables/run.sh
0 3 * * * /path/to/scripts/calculate-size-tables/run.sh