FTP Back-up problems

AudiAddict

Verified User
Joined
Oct 10, 2008
Messages
85
[bug & question] FTP Back-up problems

I have been using the FTP back-up feature for almost 2 years now and it has always been working perfectly.

Since a while now it's been failing and I'm unable to figure out why.. It must have something to do with the new update because nothing has changed except for new users which have been added. It could have something to do with file error permissions, but the previous DA versions didn't display the output value for what the problem was properly. http://www.directadmin.com/features.php?id=1573

This should be resolved now in the latest version? I'm now seeing this error though, which makes no sense because the users which have been backed up according to the output message below.. are not there on my back-up server? So it says it has been backed up, but it's not saved on the external location. Some of them are.. so it's not completely failing.. Any idea's on how to debug this?? thanks

user admin has been backed up. <10:00:07>
User a has been backed up. <10:03:40>
User b has been backed up. <10:06:47>
User c has been backed up. <10:14:07>
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.
ncftpput: cannot open mybackupserver.com: could not connect to remote host, but can try again.
<10:15:10>
User d has been backed up. <10:15:53>
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.
ncftpput: cannot open mybackupserver.com: could not connect to remote host, but can try again.
<10:16:56>
User e has been backed up. <10:17:20>
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.
ncftpput: cannot open mybackupserver.com: could not connect to remote host, but can try again.
<10:18:23>
User f has been backed up. <10:18:24>

Is there a way to add a custom line of text to my ftp_upload.php script which writes a debug/log file to a location to read the contents each time it tries to FTP? Preferably with all errors and possible file permission issues?
 
Last edited:
Seems like I found the bug.. but not sure how to resolve for now.

After skipping two user accounts with each their own website and files, the back-up runs fine. For some reason the error message is not correct, because no matter how many users I select, If include one (or two) of these accounts in my back-up job the back-up fails and displays the time out message.

Anybody know how to further debug this issue by changing the upload php file to include specific debug code? I have a feeling it has to do something with FILE permissions but I don't understand why the error message does not display this and I don't know which file (these users have allot of files..)
 
Nobody know how to troubleshoot this issue?

- Back-up error is incorrect, showing timeout errors
- When changing the back-up to include all users except for two users which both are running the same image upload software.. the back-up runs fine
- Must be a file permissions error
- How can I find out which files within the 9000+ (!) jpgs,png ec are causing this issue? Possible to add a line of code to the ftp_upload.php script to debug?
 
I resolved the issue by restoring all ownership/permissions with the recursive option. Back-up is now running fine again.

It is important to note that the BUG still exists and I would like to suggest that Directadmin admins resolve this for future users/cases.

back-up output message shows:
User c has been backed up. <10:14:07>
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.

There is no timeout.. and the users are not being backed up.. the back-up actually fails on file permissions and this is not returned in the error message.
 
I had something similar once when doing an admin backup/transfer.
Problem occured on the backup, but due to the fact that it was also transferred, the problem was not traceble.

Try doint a backup without immediate transfer. So an admin backup but make it local to /admin_backups for the 2 users where it's going wrong.
Good chance you will get the correct error then.
 
Hello,

This error is coming from the upload script:
Code:
Could not connect to mybackupserver.com -- try again later: Connection timed out.
so check the script to see if you have ncftpput or some other method:
Code:
cd /usr/local/directadmin/scripts
ls -la ftp_upload.php
ls -la custom/ftp_upload.php
to do any debugging, copy the script to the custom path:
Code:
cp ftp_upload.php custom/ftp_upload.php
cd custom

Try connecting manually:
http://help.directadmin.com/item.php?id=502

and ensure you can telnet to port 21 to rule out a simple firewall issue, eg:
Code:
telnet mybackupserver.com 21
If you can't connect to that, then it's likely where you'd want to start (shut off all firewalls)

John
 
Thanks for your reply John.

It's not a connection, firewall or ftp issue, because the script runs fine when I leave out two specific user accounts.

Debug isn't possible anymore, because I used the directadmin recursive reset owner feature on the files of these two users and the problem was solved.

So I'm 100% sure it had something to do with these two accounts and their file permissions. What I'm trying to point out is that the error message is not giving out the correct errors, if possible I would suggest to fix this, or add some kind of script output log file feature (enable/disable).
 
Note that all of this output is from ncftpput, not DA itself
Code:
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.
Could not connect to mybackupserver.com -- try again later: Connection timed out.
ncftpput: cannot open mybackupserver.com: could not connect to remote host, but can try again.
It's telling us that it cannot connect.. which is all we have to work with.

I'm wondering if it's a rate issue, where it's connecting too fast between each connection.. or there is a max number of connections per IP to the ftp server.
I doubt that a permission on a tar.gz file would affect the connection itself.

In any case, if it happens again, let us know.

John
 
@AudiAddict:

Just a suggestion; try a backup of just one of those users. If it fails immediately follow up with a manual ncftp from your server to your backup system.

Jeff
 
This is an issue that I am interested.
this error pft I have ever seen but still unresolved.
thank you for sharing information.
 
Back
Top