Run /opt/teradata/viewpoint/dcs/bin/automatedDataCleanup.sh to start clean-up process.
Following options are available from the script:
- View older tables
- Cleanup older tables
- Delete db-backup
- Delete /data/archive
- Cleanup disabled systems
- Run Full Vacuum
- Schedule Full Vacuum
- Cleanup temporary files
- Schedule Cleanup Now
- View older tablesThis operation does the following:
- Displays the current sum of size of all tables .
- Ask the user to provide a year to view tables older than the given year (Defaults to current year).
- Ask the user to provide a month for the entered year to view tables older than the given year-month (Defaults to current month).
- Displays the sum of the size of all tables older than the provided year.
- Outputs the list of tables to a file /tmp/listOfOldTables.yyyy.mm.dd-hh.mm.ss.txt.
- Cleanup older tablesThis operation does the following:
- Ask the user to provide the filename generated as part of “view older tables” operation.
- Deletes the tables in the file.
- Outputs each deleted table to new log file →/var/opt/teradata/viewpoint/portal/logs/automatedDataCleanup.log.
- Displays the current sum of size of all tables.
- Delete db-backup This operation does the following:
- Ask the user for confirmation to delete.
- Deletes the directory /data/db-backup.
- Delete /data/archive This operation does the following:
- Checks if the system is in clustered state.
- If yes, exits with error.
- If not, asks confirmation to delete the directory.
- Deletes the directory.
- Cleanup disabled systems
- Show the list of disabled systems.
- Prompts user to select one or more systems or select all.
- Deletes the system and corresponding alert rules.
- Run Full VacuumThis operation does the following:
- Check if full vacuum is enabled on portal.
- If not, provide an informational message and then ask user to confirm if full vacuum is to be run now.
- If yes, display the last time it was run successfully, the next scheduled time and then ask user to confirm if full vacuum is to be run now.
- If yes, run full vacuum.
- Schedule Full Vacuum
- Check if full vacuum is enabled on portal.
- If not, provide an informational message and ask confirmation to proceed.
- If yes, display the last time it was run successfully, the current schedule and then ask user for confirmation to proceed.
- Prompt the user for Day, Month, Hour and Minute for scheduling the full vacuum.
- Schedules the full vacuum job.
- Cleanup temporary filesThis operation deletes any temporary files created as part of the script.
- Schedule Cleanup NowThis operation runs cleanup for collector once.