Automatic backup via SFTP not working?

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

Automatic backup via SFTP not working?

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Automatic backup via SFTP not working?
Automatic backup via SFTP not working?
2022-10-24 17:40:32 - last edited 2022-11-05 20:20:55
Tags: #backup
Hardware Version:
Firmware Version: 5.5.6

Team,

 

Over the past few weeks I tried a couple of time to do an automatic backup via SFTP.

 

See also attached screenshots:

While I can browser on the SFTP-server and the controller accepts the config, the backup failes.

 

Any suggestion where to start troubleshooting? Or perhaps even a fix?

 

 

Thank you - Will

 

=====

 

 

 

=====

 

 

=====

*** making it run like clockwork ***
  0      
  0      
#1
Options
1 Accepted Solution
Re:Automatic backup via SFTP not working?-Solution
2022-11-04 22:51:31 - last edited 2022-11-05 20:20:55

  @ITV well, this confirms I was right. If you create a folder with sudo, the owner is root user and logicalky your user has no write permission. At the end, you did not have write permissions.

 

To resolve it, it should have been sufficient to run chown and make your user owner of that folder.

Recommended Solution
  0  
  0  
#7
Options
8 Reply
Re:Automatic backup via SFTP not working?
2022-10-25 08:11:37

Dear  @ITV 

ITV wrote

Any suggestion where to start troubleshooting? Or perhaps even a fix?

 

 

Is there any log can be foun on your SFTP server side? 

 

We suspect it could be username/password issue, or SFTP server config issue. 

Best Regards! >> Omada EAP Firmware Trial Available Here << >> Get the Latest Omada SDN Controller Releases Here << *Try filtering posts on each forum by Label of [Early Access]*
  0  
  0  
#2
Options
Re:Automatic backup via SFTP not working?
2022-10-25 08:34:22

  @Hank21 

 

Assuming that either of the suggested would be true:

Would browsing through the files and folders work?

Would a wrong username and/or password be accepted?

 

Yes - I checked the log. It says:

Accepted password for will from 192.168.139.235 port 37884 ssh2
pam_unix(sshd:session): session opened for user will(uid=1000) by (uid=0)

 

The folder I'm writing to is: /home/will/omada.

 

Any other suggestions?

 

 

Cheers - Will

 

 

 

*** making it run like clockwork ***
  0  
  0  
#3
Options
Re:Automatic backup via SFTP not working?
2022-11-04 10:15:19

  @ITV 

 

We just had a test on our lab with controller version V5.6, and I did not see the same issue. 

 

Could you please try the new version controller also?

Best Regards! >> Omada EAP Firmware Trial Available Here << >> Get the Latest Omada SDN Controller Releases Here << *Try filtering posts on each forum by Label of [Early Access]*
  0  
  0  
#4
Options
Re:Automatic backup via SFTP not working?
2022-11-04 10:52:46

  @ITV there is not much info about the error in screenshot, obviously it fails to save the archive. First on my mind would be permissions, are you sure that ssh user you are using has write access to the folder?

 

I do not understand why tplink still did not introduce authentification by ssh key instead of username and password, in fact its just one config line to be uncommented. That is main reason why I do not use it, on all my devices password authentication is disabled for security reasons.

  0  
  0  
#5
Options
Re:Automatic backup via SFTP not working?
2022-11-04 19:51:07 - last edited 2022-11-04 19:52:07

  @Hank21 and @btx :

Just gave this another try and made it work.

 

The solution is a rather strange one:

The owner and rights of the Omada-folder matches the user logging in for the backup.

However, it seems not be enough to make it work.

 

When I deleted the Omada-folder and re-created it without sudo, it works.

While the owner and rights where the same as the original one.

 

Any ideas of a possible explenation?

 

 

Cheers - Will

 

 

 

*** making it run like clockwork ***
  0  
  0  
#6
Options
Re:Automatic backup via SFTP not working?-Solution
2022-11-04 22:51:31 - last edited 2022-11-05 20:20:55

  @ITV well, this confirms I was right. If you create a folder with sudo, the owner is root user and logicalky your user has no write permission. At the end, you did not have write permissions.

 

To resolve it, it should have been sufficient to run chown and make your user owner of that folder.

Recommended Solution
  0  
  0  
#7
Options
Re:Automatic backup via SFTP not working?
2022-11-05 20:23:59

  @btx  |  it certainly looks that way - sorry for the mistake on my site... blush

*** making it run like clockwork ***
  2  
  2  
#8
Options
Re:Automatic backup via SFTP not working?
2022-11-06 01:51:41

  @ITV no need for excuse ;), we all have to make mistakes for ability to learn something.

  0  
  0  
#9
Options