...

  1. First, we can check old logs and their sizehow much data they contain.

  • /var/log/ → Standard place location for system logs, and applications, if not set otherwiseunless a different location has been specified. Using ls -alh alh we can list all files, with their size, and with du -h we can see the size of how large folders are. Sometimes, we do not need some archived old logs, so they can be deleted, but only if we are sure that they will not be needed anymore. 

In In /var/log/ there there are some folders which that can store contain a big large amount of logs, for example . Example: /var/log/http/, which is a standard web server (in most cases, the apache Apache web server) logs location. In our example, the folder contains a lot of old logs (those are the ones with a date appended in the end of the file name) with whose size of is a few gigabytes. They can be deleted if we are sure that they will be no longer required.

A sample Sample output of the ls -alh command (in /var/log/):

...

  • /servers/(cat/spell/pm)/logs  →  → This is the location of xtm for XTM Cloud application logs, or the corresponding localization on your server, depending on your settings used at the the settings made during installation. Here we can also see files with appended a date appended at the end of file, and those, as the file name. As explained above, those files can be deleted , if no more longer required:

A sample Sample output of the ls -lhcommand (in /servers/pm/logs):

...

2. Second, we move to XTM Cloud files:

We can check and delete files in temporary catalogs, in case if they were have not been cleared automatically. There are many ways to do itso, but the most efficient is to use a bash script and modify it to suit your needs. A good example of such a script is the this one below:

#!/bin/bash

find /xtm/webapps/generatedfiles -mindepth 1 -mtime +30 -delete > /dev/null 2>&1

find /xtm/xtm/temp -mindepth 1 -mtime +30 -delete > /dev/null 2>&1

find /xtm/xtm/nlpservice -mtime +7 -delete > /dev/null 2>&1

find /xtm/xtm/data/ -maxdepth 2 -name Download |xargs -n 1 -I D find D -ctime +7 -delete

find /xtm/xtm/data/ -maxdepth 2 -name temp |xargs -n 1 -I D find D -ctime +7 -delete

find /servers/cat/temp -mindepth 1 -mtime +1 -delete

find /servers/pm/temp -mindepth 1 -mtime +1 -delete

find /servers/spell/temp -mindepth 1 -mtime +1 -delete

exit 0

Note

IMPORTANT!

Please bear Bear in mind , that the paths shown above are the standard installation paths of for the XTM Cloud application. If you have different ones , then edit it accordingly!

To create such a file, please do as follows:

  1. Create a file: vim clean_temp_xtm.sh;.

  2. Once inside in the program, press i and then paste the above content into the file;.

  3. Press Esc and the combination of combined keystroke :wq to save and quit;.

  4. Add executable rights for a file: chmod +x clean_temp_xtm.sh;

  5. Run the script: ./clean_temp_xtm.sh.

3. Lastly, we can delete archived or unused projects.

Note

IMPORTANT!

Do it only Only do so when you are sure that you will never need them again – the process of deleting projects is irreversible: when a project has been deleted, that cannot be undone!)

  • Go to /xtm/xtm/deleted/ or /xtm/xtm/archived (in case if you have some a non-standard installation path, proceed according to use your installation pathspath(s) instead).

  • Inside this folder(s) you can find /those folders, you will find – the IDs of projects that have either been either deleted or archived , and you can choose which one projects you can delete, if any.

...

Deleting database dumps

If you ever made some database dumps, there is a possibility , that they were not deleted after the dump / or restore. 

Check your bash history to find out if some hints are there.

  • In the console, please use history | grep -i 'pg_dump'  – this command will show list the bash history narrowed down to . It can be summarized as the pg_dump command.

  • You can then check the corresponding folder where in which the dump was put intoplaced, and delete it if needed. In case If there is no pg_dump in bash history, you can always check check if there are any unneeded leftover files in /servers/files/ if there are some leftover unneeded files.