This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Grab a logfile from the Slave in HA

Hopefully, one of you knows of a trick with WinSCP or curl or ???

Last night, a client's Slave in 220 Hot-Standby hung during the Up2Date from 9.113 to 9.205, so I've started a Support case with Sophos.  What I was able to see was that the Up2Date log on the Slave was 49MB, yet the file on the Master was ha_utils ssh to get an opportunity to login to the Slave as loginuser.

I don't know how to manipulate WinSCP to enable me to scrape a file from the Slave.  I can curl the file to my ftp server, but I don't know how to get it directly into my workstation without going through my ftp server.

Are there any gurus out there that want to share the secret?

Cheers - Bob


This thread was automatically locked due to age.
  • From my hazy memory (haven't done much with HA in almost a year)...

    Copy from the slave to the master then off the master with whatever you are already familiar with.


    • Take note of the IP addresses used on the HA interfaces of each system.
    • ssh from master to slave
    • on slave elevate permissions
    • copy (push) from slave to master, example command below


    Example copy, with rsync via ssh.  Change $MASTER_HA_IP and paths/filename(s) as needed:
    rsync -avz --progress /origin/path/optionally_a_specific_file -e ssh loginuser@$MASTER_HA_IP:/home/login/destinationpath/


    Nothing particularly magic about ha_utils (it is a bash script).
  • Teched wins another one!

     sophos:/var/log # rsync -avz --progress up2date.log -e ssh loginuser@198.19.250.1:/home/login/
    loginuser@198.19.250.1's password:
    sending incremental file list
    up2date.log
           60815 100%   26.75MB/s    0:00:00 (xfer#1, to-check=0/1)

    sent 4593 bytes  received 31 bytes  840.73 bytes/sec
    total size is 60815  speedup is 13.15
     sophos:/var/log # exit
    logout
     loginuser@sophos:/home/login > exit
    logout
    Connection to 198.19.250.2 closed.
     sophos:/root # cd /home/login
     sophos/login # ls -l *.log
    total 72
    -rw-r--r-- 1 loginuser users 60815 Aug 29 14:49 up2date.log


    rsync goes into the bag of tricks. [:)]

    Cheers - Bob
  • rsync is good stuff.  If you are looking to make use of it under Microsoft Windows I recommend the cygwin environment over the standalone rsync binaries.  In the past the standalone binaries performed more poorly and cygwin makes alot of other good stuff work nicely under Windows.  cygwin.org

    The elevation of privileges on the slave node isn't needed if the file(s) can be read by loginuser.
  • Oh, yes, I cheated, I did su - to be root before I did that.  That's just a habit, so I have no idea if loginuser can access those files.

    Cheers- Bob
    PS For the same reason that I was unable to use WinSCP, I suspect that I would be unable to use Cygwin to accomplish this particular fait de leger de main