Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Scheduled Backup failing

Discussion in '3CX Phone System - General' started by Legop, Feb 22, 2018.

Tags:
Thread Status:
Not open for further replies.
  1. Legop

    Joined:
    Feb 22, 2018
    Messages:
    15
    Likes Received:
    0
    I am trying to use FTP backup. At first I tried to have it run backups on a proftpd and this was the error output:
    3CX Phone System tried to backup but failed due to the following reason(s):
    System.Exception: Error creating backup ---> System.IO.IOException: Unable to write data to the transport connection: Broken pipe. ---> System.Net.Sockets.SocketException: Broken pipe
    at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
    --- End of inner exception stack trace ---
    at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
    at System.Net.FtpClient.FtpSocketStream.Write(Byte[] buffer, Int32 offset, Int32 count)
    at System.Net.FtpClient.FtpDataStream.Write(Byte[] buffer, Int32 offset, Int32 count)
    at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)
    at _3cxNetBackupAndRestore._3cxBackup.FinishingTask()
    --- End of inner exception stack trace ---
    at _3cxNetBackupAndRestore._3cxBackup.WaitForFinish()
    at _3cxBackupRestoreImpl.BackupRestoreUtils.Backup(IFilesystem filesystem, String instanceId, String cfgPath, String dbConnectionString, BackupConfig options, String fullpathFilename, Boolean sendEmail)
    at BackupRestoreSchedule.BackupJob.Execute(IJobExecutionContext context)

    Then I followed the guide here: https://www.3cx.com/docs/ftp-server-pbx-backups-windows/ and it results in this error:
    Code:
    3CX Phone System tried to backup but failed due to the following reason(s):
    System.Net.FtpClient.FtpCommandException: Internal error renaming the file
       at System.Net.FtpClient.FtpClient.Rename(String path, String dest)
       at _3cxBackupRestoreImpl.Filesystem.FTP.FtpFilesystem.Move(String filename1, String filename2)
       at BackupRestoreSchedule.BackupJob.Execute(IJobExecutionContext context)
    I'm attaching the FTP Server log, from which I gather that 3CX is trying to rename the file before the transfer finishes. This results in the renaming failing as the file is still open.
    To test I've throttled the servers upload speed and watched as it did in fact try to rename the file at around 80% of the file transfer. Curious how 3CX connects to the FTP with multiple parallel connections, working on the same file....
    There were some instances where the error did not occur and the backup finishes nominally. Meaning the .zip is being created just fine before the transfer initiates. However it now consistently fails. 3CX is also not closing the last FTP session, it just sits there, waiting for timeout.
    Creating a manual backup works fine as it doesn't try any renaming.
     

    Attached Files:

  2. andrew_

    Joined:
    May 28, 2017
    Messages:
    4
    Likes Received:
    0
    What version of 3CX are you running? Running it on Windows or Debian?
     
  3. Legop

    Joined:
    Feb 22, 2018
    Messages:
    15
    Likes Received:
    0
    It's 15.5.9348.3 on Debian 9.2.1.
     
    #3 Legop, Feb 23, 2018
    Last edited: Feb 26, 2018
  4. Legop

    Joined:
    Feb 22, 2018
    Messages:
    15
    Likes Received:
    0
    It's still sending an email each day about failed backup. Same issue.
    I've tried everything. This is now a bug report.
     
Thread Status:
Not open for further replies.