Want more timely Centmin Mod News Updates?
Become a Member

Demo How To Use SecureCRT's Native SFTP Client To Download Nginx/PHP Upgrade Logs

Discussion in 'Centmin Mod User Tutorials & Guides' started by eva2000, Jun 11, 2020.

  1. eva2000

    eva2000 Administrator Staff Member

    54,647
    12,230
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,799
    Local Time:
    5:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Many folks know I have used SecureCRT SSH client for decades now and it has a native SFTP client which allows you to seamlessly switch between SSH and SFTP for the same logged in SSH user i.e. root user.

    Below is an example of how you can download the latest nginx_upgrade and php_upgrade logs from /root/centminlogs after doing centmin.sh menu option 4 and 5 nginx/php-fpm upgrades.


    The command used in demo below for compressing the latest nginx_upgrade log:
    Code (Text):
    (f=$(ls -rt /root/centminlogs/ | grep nginx_upgrade | tail -1); fp="/root/centminlogs/$f"; pigz -4kf $fp; echo -e "compressed log at\n${fp}.gz")

    The command used in demo below for compressing the latest php_upgrade log:
    Code (Text):
    (f=$(ls -rt /root/centminlogs/ | grep php_upgrade.log | tail -1); fp="/root/centminlogs/$f"; pigz -4kf $fp; echo -e "compressed log at\n${fp}.gz")

    Example output would be as follows:
    Code (Text):
    (f=$(ls -rt /root/centminlogs/ | grep nginx_upgrade | tail -1); fp="/root/centminlogs/$f"; pigz -4kf $fp; echo -e "compressed log at\n${fp}.gz") 
    compressed log at
    /root/centminlogs/centminmod_123.09beta01.b505_060520-051132_nginx_upgrade.log.gz
    

    Code (Text):
    (f=$(ls -rt /root/centminlogs/ | grep php_upgrade.log | tail -1); fp="/root/centminlogs/$f"; pigz -4kf $fp; echo -e "compressed log at\n${fp}.gz")
    compressed log at
    /root/centminlogs/centminmod_123.09beta01.b521_170520-204252_php_upgrade.log.gz
    

    Demo SecureCRT's native SFTP download where I set session option for SFTP initial directory to C:\cmm where I want the SFTP get downloads saved to.

    [​IMG]

    SecureCRT's native SFTP tab commands where lpwd = local present working directory and pwd = server present working directory and get is SFTP command to download. You can use put command in SFTP to upload.

    [​IMG]

    SFTP get downloaed compressed gzip logs for latest nginx_upgrade and php_upgrade logs within my Windows 10 local computer's C:\cmm local folder

    [​IMG]