Admin backups are failing on specific user accounts

peps03

Verified User
Joined
Oct 24, 2013
Messages
191
Location
Amsterdam
Our admin backups used to work fine. We're backing up to a local computer via filezilla server.

We had to change the router and now some admin backup crons always have the same user accounts which fail on admin all-user-backups.
BUT, when all of the failing users (only these) are selected for backup, they all backup without issues.

Anybody have an idea what is wrong here? This situation happens on some vpsses. Others are all fine and fully backup without issues.
 
ftp_upload.php exit code: 7
ftp_upload.php output: curl: (7) Failed to connect to backup.xxxxxxxxx.nl port 21: Connection timed out
curl return code: 7

But the strange thing is, the backups fail at exactly the same users each full user backup run. And if you run the failed user as separate back afterwards they all backup without issues. Also some other admin backup crons for all users backups run completely without issues.
Strange right.
 
Just a wild guess: Maybe an overall time-limit on the connection itself, that happens to kick-in just at that user everytime?
Could you perhaps add a 'large' user (alphabeticly) infront, to check if the error still occurs at this particular user?
 
I see there are still some leftover old files in the /home/tmp folder (http://prntscr.com/iq6d69). Can i just remove these without expecting problems? Maybe that is causing sudden backup issues? Which i doubt.. but i could try.

Any other suggestions are very welcome.
Thanks
 
A thing i noticed, 3 vpsses without backup issues use pure-ftpd, the one vps with the backup issues uses: proftpd. Could that be a cause?
 
I would look into CSF/LFD if it's perhaps limiting and killing an FTP-connection/process if it runs for more than x seconds or something like that.
 
I set CSF to test mode, same problems while backing up.
So i guess we can rule that out.

Summing up:
- problems occured when switching router
- 3 other vpsses don't have these problems
- when backing up only the users of which the backups failed, no issues occur
- the backups always fail (and start again) at the same accounts
- when adding a new account before an account where it fails the backups start failing at the new account
- and start backing up again 1 account later too (as an account was added)
- so the size of the accounts don't seem to have impact
- the troubled vps uses proftpd, the other 3 pure-ftpd

Ideas?
 
It is not a real solution, but why not switch to pure-ftp. It is a good start to see if the problem dissapear.
Although I do not think it is related, proftpd does not support virtual user quotas.
 
ftp_upload.php exit code: 7ftp_upload.php output: curl: (7) Failed to connect to backup.xxxxxxxxx.nl port 21: Connection timed out
curl return code: 7

Whether you have ProFTPd or PureFTPd it should not impact the process of creating and uploading backups. You can even have no FTP on your directadmin server. So it's something else different that causes the issue.

Directadmin uses their own scripts for uploading/listing/downloading backups to and from FTP(s).

What if you try FTP instead of FTPs ?
 
Doesn't matter. Different error codes below though. But still, it happens with the same user accounts.


I see the uploading hangs here for quite a while: http://prntscr.com/irnvua

There were 2 of such backup breaks. They both started at the same users as always. But now ended earlier. Meaning less users failed, the backups started backing-up users earlier than otherwise.

Error text:
User XXXXXXXXX has been backed up. <17:59:19>
User XXXXXXXXX has been backed up. <17:59:20>
User XXXXXXXXX has been backed up. <17:59:20>
ftp_upload.php exit code: 0
ftp_upload.php output: connect failed: Connection timed out.
connect failed: Connection timed out.
connect failed: Connection timed out.
Falling back to PORT instead of PASV mode.
<18:02:30>
User XXXXXXXX has been backed up. <18:02:31>
ftp_upload.php exit code: 1
ftp_upload.php output: Could not connect to backup.XXXXXXXXX.nl -- try again later: Connection timed out.
Could not connect to backup.XXXXXXXXX.nl -- try again later: Connection timed out.
Could not connect to backup.XXXXXXXXX.nl -- try again later: Connection timed out.
ncftpput: cannot open backup.XXXXXXXXX.nl: could not connect to remote host, but can try again.
ncftpput return code: 1
<18:05:40>
User XXXXXXXXX has been backed up. <18:05:57>
ftp_upload.php exit code: 1
ftp_upload.php output: Could not connect to backup.XXXXXXXXX.nl -- try again later: Connection timed out.
Could not connect to backup.XXXXXXXXX.nl -- try again later: Connection timed out.
Could not connect to backup.XXXXXXXXX.nl -- try again later: Connection timed out.
ncftpput: cannot open backup.XXXXXXXXX.nl: could not connect to remote host, but can try again.
ncftpput return code: 1
<18:09:06>
User XXXXXXXXX has been backed up. <18:09:07>
User XXXXXXXXX has been backed up. <18:09:24>
User XXXXXXXXX has been backed up. <18:09:26>
User XXXXXXXXX has been backed up. <18:09:27>
User XXXXXXXXX has been backed up. <18:09:27>
User XXXXXXXXX has been backed up. <18:09:28>
 
Last edited:
Do you have the same issue if you manually use ftp in a console and upload all those files? You can even use midnight commander in Linux console for the testing purposes.
 
To the backup server you mean? For testing from filezilla client to filezilla server?

If yes, 3 others vpsses backup to this backup server running filezilla without issues.
 
If you create the backup locally, I think there is no problem during backup.
probably related to passive mode in ncftpput. But I do not know where to change those settings.

Other thing could be a firewall, like CSF is blocking to many connections.

Or you could rsync the backup to your local server.
 
To the backup server you mean? For testing from filezilla client to filezilla server?

If yes, 3 others vpsses backup to this backup server running filezilla without issues.


Create backups with directadmin on the server from which diretadmin fails to upload backups but this time choose to store them locally. As soon as backups finishes try and upload them from bash console of your directadmin server to your FTP server and see whether or not you have the same issue.

You can use ftp or midnight commander for it on your Directadmin server. Please search internet for details on how to use them.
 
"but this time choose to store them locally"
> Done, without any issues :)

When trying to connect to ftp server using "ftp 11.11.11.11" i get:
bash: ftp: command not found

Shouldn't this ftp command standard work?
 
Last edited:
The ftp command is disabled by default. You should install it manually or use curl, mc.
 
Back
Top