Solved Error with SFTP backup

Status
Not open for further replies.

squarewave

Bronze Partner
Basic Certified
Joined
May 31, 2016
Messages
5
Reaction score
2
Hello,

Since we are hosting 3cx in Azure currently, I wanted to try out using Azure Blob storage for daily backups.

I have the blob container created, SFTP access to it enabled and can connect to it from the 3cx instance.

However, when I run the actual backup this error happens:
Renci.SshNet.Common.SshException: WriteOverlap: The WRITE range overlaps the uncommitted file content.
at Renci.SshNet.Sftp.SftpSession.RequestWrite(Byte[] handle, UInt64 serverOffset, Byte[] data, Int32 offset, Int32 length, AutoResetEvent wait, Action`1 writeCompleted)
at Renci.SshNet.Sftp.SftpFileStream.FlushWriteBuffer()
at Renci.SshNet.Sftp.SftpFileStream.Seek(Int64 offset, SeekOrigin origin)
at _3cxFilesystemImplementations.SFTP.FixedSftpFileStream.Seek(Int64 offset, SeekOrigin origin)
at System.IO.Compression.ZipArchiveEntry.WriteCrcAndSizesInLocalHeader(Boolean zip64HeaderUsed)
at System.IO.Compression.ZipArchiveEntry.DirectToArchiveWriterStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Compression.WrappedStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at _3cxNetBackupAndRestore._3cxBackup.WriteMetadata(ZipArchive zipStream)
at _3cxNetBackupAndRestore._3cxBackup.StartBackup(Stream backupStream)
at ManagementConsoleJS.Services.BackupService.Backup(BackupDescription backupDescription)

I cannot reproduce this problem across three seperate SFTP clients I've tried. I am able to upload files using this user to this container over SFTP just fine myself. I can't find any particular reason why 3cx is unable to do so.
 
Same issue here. Anyone had any luck with this yet?
 
Hi!

This has not been tested so I'm not sure why it isn't working, but I suspect that the reason will be similar to why Amazon S3 storage also doesn't work I believe.
 
Hi!

This has not been tested so I'm not sure why it isn't working, but I suspect that the reason will be similar to why Amazon S3 storage also doesn't work I believe.
Thanks for the hint, I found another thread which suggested using this parameter:
ALWAYS_USE_TMP_FILE_FOR_BACKUP

And setting it to 1. This fixed the problem.
 
Glad you found a solution for it! :)

I will set this as 'Solved'.
 
Status
Not open for further replies.

Forum statistics

Threads
111,974
Messages
590,081
Members
164,899
Latest member
mazet