Scheduled Backup Failed

Status
Not open for further replies.

rbergthold

Silver Partner
Advanced Certified
Joined
Aug 24, 2021
Messages
159
Reaction score
37
Has anybody else had trouble with scheduled SFTP backups? Intermittently, I am seeing failures. I'm hoping somebody can give a little guidance. Here's what I'm seeing:



Your 3CX backup failed due to the following reason(s):
System.IO.IOException: Entries cannot be created while previously created entries are still open.
at System.IO.Compression.ZipArchiveEntry..ctor(ZipArchive archive, String entryName)
at _3cxNetBackupAndRestore._3cxBackup.ZipFile(String dst, IFile src)
at _3cxNetBackupAndRestore.BackupTasks.BaseFilesTask.BackupFiles()
Renci.SshNet.Common.SshException: Failure
at Renci.SshNet.Sftp.SftpFileStream.FlushWriteBuffer()
at Renci.SshNet.Sftp.SftpFileStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at _3cxFilesystemImplementations.SFTP.FixedSftpFileStream.Close()
at System.IO.Compression.ZipArchive.CloseStreams()
at System.IO.Compression.ZipArchive.Dispose(Boolean disposing)
at System.IO.Compression.ZipArchive.Dispose()
at _3cxNetBackupAndRestore._3cxBackup.FinishingTask()
 
Hi @rbergthold

This error indicates that a previous session of the backup was not completed and does not allow to proceed with a new one.
If you try to take a manual backup does it work?
Have you tried restarting the PBX server and checking again?
 
What are you using for storage?
 
Manual backups do work. It has been some time since PBX was restarted. Would you recommend restarting services from the 3CX or just restarting AWS instance... or both?
 
  • Like
Reactions: Lee Cramman
Manual backups do work. It has been some time since PBX was restarted. Would you recommend restarting services from the 3CX or just restarting AWS instance... or both?
I suggest restarting all services and not the entire server and checking again.
 
  • Like
Reactions: rbergthold
Can you please clarify if the SFTP location is the Azure Blob storage?
it is not. Ubuntu VM running in Azure with SFTP enabled (3CX recommended solution).
 
  • Like
Reactions: rbergthold
In this case, check here for all the requirements:https://www.3cx.com/docs/ftp-server-pbx-backups-linux/
They just seemed to start failing intermittently across multiple systems. We will review documentation again. It does seem weird that they had been working well for so long, then just started failing. We thought that maybe it was related to ver 20 update; but that's not the case as we had one still on 18 failing.
 
The reason the backups are failing is in the log received for the SFTP side.

System.IO.IOException: Entries cannot be created while previously created entries are still open.

This is caused by a previous session keeping the 3cxScheduledBackup.tmp open or unable to rename to the 3cxScheduledBackup.zip once the backup completes.

Check that each system is backed up in separate folders on the SFTP server and that the permissions are correct to allow modification (modify rights).

Additionally, you may enable logging on the SFTP side to investigate why this occurs further.
 
Last edited:
Has anybody else had trouble with scheduled SFTP backups? Intermittently, I am seeing failures. I'm hoping somebody can give a little guidance. Here's what I'm seeing:



Your 3CX backup failed due to the following reason(s):
System.IO.IOException: Entries cannot be created while previously created entries are still open.
at System.IO.Compression.ZipArchiveEntry..ctor(ZipArchive archive, String entryName)
at _3cxNetBackupAndRestore._3cxBackup.ZipFile(String dst, IFile src)
at _3cxNetBackupAndRestore.BackupTasks.BaseFilesTask.BackupFiles()
Renci.SshNet.Common.SshException: Failure
at Renci.SshNet.Sftp.SftpFileStream.FlushWriteBuffer()
at Renci.SshNet.Sftp.SftpFileStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at _3cxFilesystemImplementations.SFTP.FixedSftpFileStream.Close()
at System.IO.Compression.ZipArchive.CloseStreams()
at System.IO.Compression.ZipArchive.Dispose(Boolean disposing)
at System.IO.Compression.ZipArchive.Dispose()
at _3cxNetBackupAndRestore._3cxBackup.FinishingTask()
Same iSsue for me any Luck ??
 
Manual backups do work. It has been some time since PBX was restarted. Would you recommend restarting services from the 3CX or just restarting AWS instance... or both?
Your 3CX backup failed due to the following reason(s):

Cannot access a closed SFTP session.

Object name: 'Renci.SshNet.Sftp.SftpFileStream'.

for manual also i am getting above error any suggestions on it ??
 
it looks like ours ended up being a resource issue on our SFTP that was resolved by clearing out some old (not needed) backups from other devices.
 
  • Like
Reactions: NicholasP_3CX
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,835
Messages
589,288
Members
164,665
Latest member
dominik.pepel