Reinstall without data loss

Discussion in 'ISPConfig 3 Priority Support' started by SpeedyB, Oct 11, 2017.

  1. SpeedyB

    SpeedyB Member HowtoForge Supporter


    I am running into issues with my servers...

    They were installed as Debian 6 back in the day and have been upgraded since.. It is a multiserver setup with 1 master and 1 slave.

    Server 1:
    * All Mail
    * Most websites

    Server 2:
    * Some websites (High Volume)
    * SVN

    Now I am looking how to resolve some issues I am having. Namely:
    * Server is hanging every morning at logrotate (6:30 in the morning)
    * Server is very slow

    I have thought of 2 options.
    1 Migrate to new server
    2 Reinstall on current server

    What do you recommend, and why, and how?

  2. ISPConfig Developer ISPConfig Developer

    I'd check why logrotate takes so long, if there's no obvious reason for that and given the fact the server might be old...
    when was the last time you checked your harddrive for errors? If you have some software-raid running, you could check wether there's an rebuild process running ( attempting to complete )
    cat /proc/mdstat
  3. SpeedyB

    SpeedyB Member HowtoForge Supporter

    The server is a virtual and we have rebuild the virtual harddrive as one of the troubleshooting steps.

    The logrotate indeed takes very long. How can I see why it takes so long? At the time I cannot connect to the server :(
  4. ISPConfig Developer ISPConfig Developer

    On debian there's a daily cronjob for logrotate in /etc/cron.daily/logrotate

    you could add -d to the command to enable debug logging or run configs step by step

    find /etc/logrotate.d/
    maybe you can spot something which might not belong there aswell

    logrotate -d --force /etc/logrotate.d/
    logrotate -d --force /etc/logrotate.d/somefile
    and see what is taking so long. Did you check the /var/log directory if there are huge files? Disk I/O in VM may be an issue - but uhm yeah would mean that out of the sudden after that upgrade some log-options changed causing much mor entries than before ( did it even work before and is now "fixed" and "unexpected" )?
  5. SpeedyB

    SpeedyB Member HowtoForge Supporter

    The FTP.log is 500 mb of more. All entries seam to be selfchecks..

    Syslog is arround 50 mb.

    Forced logrotate finished in a few seconds... but all the logs are empty now...

    Could I do a logrotate of the ftp hourly for instance, and maybe the mail (info is 30Mb. Error is 29 mb)

    It has worked for 5 or more years, but since the last dist upgrade it is giving me headaches...
  6. ISPConfig Developer ISPConfig Developer

    well yeah, you can do that - however I don't know wether the ftp traffic stats will continue to work properly, because it is likely not designed to process more than one .1 file. running logrotate more than once daily will give you some additional .1 .1.gz .2.gz... files

    test -x /usr/sbin/logrotate || exit 0
    /usr/sbin/logrotate /etc/logrotate.d/pure-ftpd-common
    But actually check the file, per default it says weekly, you might want to change it to daily first

    /var/log/pure-ftpd/transfer.log {
        rotate 7
            /usr/sbin/pure-ftpd-control restart >/dev/null

Share This Page