Guidelines
First, we can check old logs and their size.
/var/log/ → Standard place for system logs, and applications, if not set otherwise. Using ls -alh we can list all files with their size, and with du -h we can see the size of folders. 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 /var/log/ there are some folders which can store a big amount of logs, for example /var/log/http/, which is standard web server (in most cases the apache web server) logs location. In our example the folder contains a lot of old logs (those are the ones with date appended in the end of file name) with size of a few gigabytes. They can be deleted if we are sure that they will be no longer required.
A sample output of the ls -alh command (in /var/log/):
/servers/(cat/spell/pm)/logs → This is the location of xtm application logs, or corresponding localization on your server, depending on your settings used at the installation. Here we can also see files with appended a date at the end of file, and those, as explained above, can be deleted, if no more required:
A sample output of the ls -lh command (in /servers/pm/logs):
2. Second, we move to XTM files:
We can check and delete files in temporary catalogs, in case they were not cleared automatically. There are many ways to do it, but most efficient is to use a bash script and modify it to your needs. A good example of such script is the 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 |
IMPORTANT!
Please bear in mind, that the paths shown above are the standard installation paths of the XTM application. If you have different ones, then edit it accordingly!
To create such file, please do as follows:
|
3. Lastly, we can delete archived or unused projects.
IMPORTANT!
Do it only when you are sure that you will never need them again – the process of deleting projects is irreversible!)
Go to /xtm/xtm/deleted/ or /xtm/xtm/archived (in case you have some non-standard installation path, proceed according to your installation paths).
Inside this folder(s) you can find the IDs of projects that have been either deleted or archived, and you can choose which one you can delete if any.
Deleting database dumps
If you ever made some database dumps, there is possibility, that they were not deleted after dump/or restore. |
Check your bash history to find out if some hints are there.
In console, please use history | grep -i 'pg_dump' – this command will show the bash history narrowed down to the pg_dump command.
You can then check the corresponding folder where the dump was put into, and delete it if needed. In case there is no pg_dump in bash history, you can always check /servers/files/ if there are some leftover unneeded files.