FTP backup fails on 15.5.3849.1

Discussion in '3CX Phone System - General' started by datamerge, Sep 26, 2017.

Thread Status:
Not open for further replies.
  1. datamerge

    datamerge New Member

    Joined:
    Nov 19, 2014
    Messages:
    176
    Likes Received:
    22
    Is anyone else having problems with FTP backup on this version? Mine is failing and when I look at the ProFTP log I can see what is happening is that 3CX initiates a file transfer to the FTP server while it is still creating the backup file in the /tmp directory. This causes the backup to fail.
     
  2. IoannisM_3CX

    IoannisM_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Aug 10, 2017
    Messages:
    229
    Likes Received:
    18
    #2 IoannisM_3CX, Sep 26, 2017
    Last edited: Sep 26, 2017
  3. datamerge

    datamerge New Member

    Joined:
    Nov 19, 2014
    Messages:
    176
    Likes Received:
    22
    Yes the user is an admin on the NAS with full permissions. It has been working for the past couple of years. If I only backup the config it works fine, but if I add in some extra bits, like voicemail, or chat messages, etc. The initial 11Meg file is created and starts transferring, then the other components are being added (I can see the file growing in /tmp as the transfer is taking place. The ProFTP server log shows the error. 3CX comes back saying job done, but the file is never listed and looking at it on the NAS it is a 0 byte file.

    This is what the proftp log looks like when it fails.
    Tue Sep 26 07:12:56 2017 0 192.168.50.15 653048 /var/ftp/backup/current/zultys/3cx/3CXScheduledBackup.zip b _ o r admin ftp 0 * i
    2017-09-26 07:12:56,686 nas proftpd[31583] 127.0.0.1 (192.168.50.15[192.168.50.15]): notice: user admin: aborting transfer: Data connection closed

    The first line is the Proftp server writing the file. If I tail -f the log, I see it begin the transfer before the /tmp file on the 3CX is finished growing.
     
  4. IoannisM_3CX

    IoannisM_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Aug 10, 2017
    Messages:
    229
    Likes Received:
    18
    Hi, so backing up does work but apparently when the file size increases it fails. Also, even though full log files will be needed for further assistance, from what you've posted i see that the admin is the one who is aborting the transfer. Thus being said, it is highly possible that the problem occurs on the FTP server site. For such an error on an FTP server to occur, you could make sure that no size limitations are configured (check for MaxStoreFileSize), that your hard drive is healthy without bad sectors, make sure you allowed ports 20 and 21 as both are needed for FTP transfers.

    You could also download an other FTP server like Filezilla,replicate the scenario and see if the same problem occurs

    Thank you
     
  5. datamerge

    datamerge New Member

    Joined:
    Nov 19, 2014
    Messages:
    176
    Likes Received:
    22
    I don't think it is the server. I send very large files to it for other things. 3CX is logged in as admin. The client is dropping the connection.

    I have noticed that if I choose "Call logs, Chats and Conference data", it takes a long time to build the file in /tmp and it fails even though it is only 11 Megs. If I choose just "Include License Key Information & FQDN" and "Voicemails" along with the config, it creates a 18Meg file almost instantly and this backs up fine.

    I just chose everything as a backup job. Of course if failed, but I then went to a CLI prompt on the 3CX computer and manually ftp'd that .tmp file to my NAS and it was fine also. It is a 2.6Gig file with all the recordings included.
     
    IoannisM_3CX likes this.
  6. IoannisM_3CX

    IoannisM_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Aug 10, 2017
    Messages:
    229
    Likes Received:
    18
    Hi, thanks for your detailed feedback.

    Do the following if you please:
    Increase your Passive Mode time because as it is a big file, it would need more time
    Enable unlimited connections
    Set your backup as a scheduled one and repeat the scenario again

    Thank you, i 'll be waiting for your feedback
     
  7. datamerge

    datamerge New Member

    Joined:
    Nov 19, 2014
    Messages:
    176
    Likes Received:
    22
    Thanks Ioannis. I have changed the above, but same results. The 2.6Gig file transfers fine from the 3CX command line with the settings untouched.The only difference that I can see there is that the file in /tmp is complete before the transfer starts. I do recall on the previous version 15, that the ftp transfer did not start until the /tmp file was ready. I actually reported an issue then where if there were lots of recordings, the generation of this file would eventually take longer than the TimeoutNoTransfer parameter of the FTP server. The workaround was to not backup recordings. It seems that there may have been a fix to build the file as it is being backed up, but that causes this problem. I suppose it may be more obvious on some systems than others due to the internal disk speed, CPU speed, etc.

    Would it not be better to build the tmp file, then login to the ftp server perhaps?
     
Thread Status:
Not open for further replies.