Discover Centmin Mod today
Register Now

Auto-remove /svr-setup directory

Discussion in 'Feature Requests & Suggestions' started by joshuah, Jul 5, 2017.

  1. joshuah

    joshuah Member

    121
    14
    18
    Apr 3, 2017
    Ratings:
    +17
    Local Time:
    9:05 AM
    I think it would be good to add a cron to automatically purge older files from the /svr-setup directory.

     
  2. eva2000

    eva2000 Administrator Staff Member

    49,869
    11,482
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,834
    Local Time:
    8:05 AM
    Nginx 1.21.x
    MariaDB 10.x
    123.09beta01 auto purges largest files in /svr-setup related to nginx and php upgrade routines (centmin.sh menu option 4 and 5) only keeping the current + previous version i.e. if you upgrade to PHP 7.0.20, only 7.0.20 and 7.0.19 are kept, all other versions are purged.

    Purging all /svr-setup can be tricky
    1. It masks your real disk usage requirements. Meaning if you're low on disk free space and /svr-setup is purged, it gives end user false sense of disk free space available. Say if /svr-setup takes up 3GB of disk space and you have 1GB free disk space left. If you purge /svr-setup, end user sees 4GB disk free space. They then use that disk space for site data ~2GB used so now have 2GB free disk space. Then come nginx + php-fpm and other upgrades which require that 3GB disk space will error out and fail to complete as you only had 2GB free disk space.
    2. Keeping current and previous version, allows you to recompile nginx and php same versions for when you enable/disable new features without re-downloading them. But what if the official download site is down and you need to recompile ? If you purged /svr-setup completely, you would have access to no local version for recompile and won't be able to download from official site until the site is back online.
     
  3. joshuah

    joshuah Member

    121
    14
    18
    Apr 3, 2017
    Ratings:
    +17
    Local Time:
    9:05 AM
    Thanks for explaining that :)