Support

Akeeba Backup for Joomla!

#37597 Upload to Remote SFTP (SSH) server

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.1.5
PHP version
7.4.30
Akeeba Backup version
9.2.7

Latest post by nicholas on Monday, 26 September 2022 09:27 CDT

onefoot

Hi there

I have some issues to upload my backups to my Synology Disk. When i use Filezilla to connect to my NAS over SFTP it works fine. But when i test the same connection in the Akkeba-Backup Component it fails.

What could be the problem?

Thanks for your help

 

tampe125
Akeeba Staff

Hello,

the connection could be blocked by your server. If you attempt to create a backup, does it work? Can you please attach the log of the backup?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

onefoot

Hi

Didn‘t i already attached the Log-File?

tampe125
Akeeba Staff

no, can you please zip it and try again?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

onefoot

Hi there,

You are absolutely right. Here you go:

 

onefoot

I don't know if the upload of the Debug Log was successful. Can you confirm it?

tampe125
Akeeba Staff

Nope. Please zip it, if it still fails, please upload it somewhere and paste here the share link

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

onefoot

Log-File: https://www.swisstransfer.com/d/d6047a66-dfd0-48f7-88c4-f35dd2f08f24

tampe125
Akeeba Staff

Thank you for the log. Looking at the error, the problem is that your server can not connect to the remote SFTP one. The issue happens even before that username and password are requested, so most likely there is something that is blocking the connection.

You should contact your host and report the issue, since the connection is blocked at server level

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

onefoot

Hi there,

I would like to send the backup to my private Synology NAS. I did it already successfully over FTP without SSL in the past. But at the moment Akeeba Backup seems not be able to make any connection (WebDav, FTP, SFTP etc.) to my Server.

I have set all needed Ports on my Router. With FileZilla i can connect over FTP with SSL. And from my iPhone i can make a connection over WebDav. But not with Akeeba Backup.

What is wrong??

 

 

 

tampe125
Akeeba Staff

As previously written, there something blocking the connection from the server where your site lives and your Synology NAS. This is why everything works when you try from your computer or your phone. Even if it was working before, there's no guarantee that it's still working: usually hosts are updating their policies and the can update their blocking rules.

You should talk with your host and report the issue, there's nothing that we (you and us) can do to fix it.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

onefoot

Hi,

Over FTP cURL I get this error:

cURL Error 67 connecting to remote FTP server: Access denied: 504

 

See my settings in the attachment

onefoot

here is the attachment

onefoot

Ok thanks. I will ask them. Hope the can help.

onefoot

Hi there,

So i have had contact with my host-provider. It seems that the problem is not on their side.

What i have tried:

 

- Connection from my Website to the Server of my host-provider via Akeeba works fine. 

- Connection from my Computer to my private NAS-Server via File-Zilla works fine.

- Connection from my Website to my private NAS-Server via Akeeba doesn't work.

 

I checked all necessary ports from outside and they seem to be all open.

So my suggestion is, that my NAS-Server speaks not the same language as Akeeba. Could that be?

 

What could i do to find the problem.

tampe125
Akeeba Staff

The "language" is the same, it's the SSH protocol, which has standard and powers almost 90% of servers in the world.

What happens is that the connection between your website and your house is blocked. It could be caused by your hosting, your ISP or your NAS is blocking the connection. Sadly there's nothing that we (you and us) can do to fix it.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

onefoot

Me again.

So now i know that all Portsettings are correct and my IPS nor my Hoster ist blocking any of the Ports.

It seems that the new DSM 7.0 of the Synologydisk ist making the problem. What exactly it is i don't know.

I can connect to my NAS over sftp from the Terminal (MacOS) without any problems. Also with Filezilla. But form my Joomla-Website it is impossible. Sad but true.

nicholas
Akeeba Staff
Manager

I have a Synology NAS and it's a bit tricky to configure after the DSM 7 update.

First of all, make sure that you have enabled SFTP in Control Panel, File Services. Also note down which port it's using. I will assume it's using the default port 22. You'll see why this is important.

Next up, in the Control Panel, External Access you will see that the Encrypted Terminal Services only has ports 2323 (default SSH port) and 22 (default SFTP port). However, most routers and most ISPs will block port 22 — this is what happened to me. We need to create a different public port. So click on Create, Custom Port, set the Local Port to 22 and the Router Port to 2322. If you cannot manage port forwarding through the NAS you need to do that in your router: have port 2322 accessible from the Internet forward to the NAS' port 22 (SFTP port).

Go to Control Panel, Security, Protection and click on the Allow/Block List. In the Block List remove all IP addresses used by your host. In the Allow List create a new entry with your site's IP address. This makes sure you won't be accidentally auto-banned which I suspect did happen to you since you tried too many times in a row to connect to your NAS unsuccessfully from your server.

Finally, go to Control Panel, External Access, DDNS and make sure that it's set up correctly. This is the hostname you will have to use, e.g. foobar.synology.me.

Now you can set up Akeeba Backup. Remember to use port 2322 and the hostname you saw in the DDNS section of your DSM configuration.

I have used the above with a site hosted on Linode and a Synology DS218+ sitting on the network rack in the office. I was able to transfer backups just fine. I even tried with username/password and username/SSH keys using both SSH connectors in Akeeba Backup to be perfectly sure. No problems whatsoever.

If you still have problems after following these detailed instructions the conclusion is that the problem is outside Akeeba Backup. Your host or ISP could be blocking the connection; try using a different port and talk to your host about the need to upload to an SFTP server which is on a dynamic IP address. Make sure your router forwards the port correctly to your NAS; connect your computer to your phone's 3G/4G/5G connection instead of your office/home WiFi and try connecting with FileZilla (this ensures that you are on an IP address other than the one your Synology NAS Internet connection is on).

Basically, there's nothing in our code preventing you from connecting to your NAS. It's all a question of whether you've correctly configured your NAS, your router, and Akeeba Backup as well as if you have taken into consideration and tested for any IP or port blocking which may occur at the web host or your local ISP level.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

onefoot

Dear Nicholas,

You are my hero! ;)

Worked fine like this.

Have a nice day

nicholas
Akeeba Staff
Manager

I am glad I could help :)

Have a great day!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!