Solved V20 Backup rotation not more that 2

Status
Not open for further replies.

Hugo_Sycom

Gold Partner
Advanced Certified
Joined
Jan 12, 2023
Messages
43
Reaction score
13
Hello community,

i'm facing an issue regarding the backup rotation set on my different systems.
we have many 3CX instance V20 running for customers, these instances are all doing backups via SFTP to a remote location and the backup rotation is set to 5.

it's set like that since long time, already in V18 it was like that.

recently i was checking some backups and found that the file on SFTP server are still rotated on 2 files max when expected should be 5. only backup.zip and backup1.zip are visible.
because all our instance have this behavior, i find strange that our configuration should be wrong.

Have someone also experienced this behavior?
thank you
BR
Hugo
 
Hi,

Can you check if the SFTP user account lacks Modify, Delete, or Rename permissions on the remote directory? IF that's the case, the system can upload the new file but fails to "push" the older files down the rotation chain. This results in the process overwriting the same files repeatedly, leaving you with just the two most recent versions.
 
Hello Hugo_Sycom,

Please also check if the FTP account can login multiple times. It would be good if you can set this to 3 concurrent sessions.
It could well be, this is already the case. in that case good job.
Just wanted to make sure.

Paulo
 
Hello everyone,

thanks for your answers, here below my answers:
@paulo,
each 3CX instance use an individual SFTP user account to reduce security impact in case of stolen of credentials, so each account logs in only 1 time on our server.

@KyriacosS_3CX , not sure to understand your input.
SFTP user accounts are the same running since months on our differents instances, and no permissions changes have been done on our side.
Also i think if it's a permission was missing i was expecting that only 1 backup should be present, here we have only 2 backups instead of 5, that means the permission allow to rename backup to backup1 but not rename backup1 to bakcup2? seams strange.

can i do something to troubleshoot that? activate some logs on 3CX relative to backup?

thanks
 
Hi,

One S/FTP client can open more than one connection to the server in order to perform multiple actions in parallel.

Backup 1 & 2 are read/write operations, beyond that it's a move rename. On previous versions you were using the same account credentials, just double checking.
 
  • Like
Reactions: paulodagraca
Hello Hugo_Sycom,

I do understand your point.

To give you an example as what does happen in the background (please check log for your own details).
The 3CX server does connect to the FTP server en does the whole authentication thing make sure setting are okay, does change directory to root etc... als the thing that needs to be done, and does 1 (one) thing, than disconnect.
Than the 3CX server will connect agin, do the whole authentication thing again....bla bla, does 1 (one) thing, like rename a file, and starts to disconnect again.
In an example of my log, I did see the 3CX server connect 20 times within 8 seconds of time. This is with a rotation of 7 days.

So if your FTP server does not clean-up the connection fast, within miliseconds than the next retry of the 3CX server will not be able to connect, and further renaming will stop.
Please understand, my name is not "Mr Always Right" but because i do not like to run into problems, I did set my max connection to 3 simultanious sessions just in case.

If my login is hacked, this will not stop the hacker from loggin into the system for 23 hours en 50 minutes, as the backup will not take more than 10 minutes anyway. so personally I do not think this is relevant for me to limit the sessions to only 1 (one).
So the FTP server is filtered by IP and timeframe, only in the night backup time connection is possible. Yes I do need to disable this on the moment that I do a manual backup, I do not mind that.
However these details will be differend for everyone and every installation and your onw preference, I do understand this.

Anyway, I do hope any of this information will help you.

Paulo
 
  • Like
Reactions: KyriacosS_3CX
Hugo, could you show the screenshots of Storage and Backup pages?
 
Hello every one,
thank you for your help and your differents inputs.

I'm using a NAS synology to receive the backups, i don't find any settings to allow or restrict the amount of concurrent connection for the same user account.

on my 3CX instance the backup rotation is set as below, i did a test all afternoon with a backup each hour, starting from scratch with a new sftp user and a new folder, starting at 1PM, behavior is the same:

1776442150233.png

on folder side i see always these 2 files, the rotation is only between "0" and 1 but never go more
1776442020957.png


I will try to set another destination, may be something is wrong on my NAS.

But mainly my question is : You are not experiencing same behavior over SFTP? if not that means issue should be on the backup destination.

BR
Hugo
 
What if you change also rotation?
 
hello to all,
after many tests, i found that in despite of a correct setup on my permissions on targuet folder, something is not working properly on NAS side.

I build a full new shared folder and set a new set of rights and build the same folder structur as esiting on original bakcup locaiton and on the new folder location the rotation is working correctly.

So conclusion, issue on backup location side.

Thanks to all for your inputs, ideas and suggestions.
BR
hugo
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,280
Messages
591,668
Members
165,400
Latest member
georgi