Welcome to Centmin Mod Community
Register Now

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

    44,750
    10,204
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,815
    Local Time:
    9:12 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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]