Remote back up error (As cronjob)

danielch1

Verified User
Joined
Aug 23, 2008
Messages
11
Hi

I have several servers create backup using "Admin Backup/Transfer" as a cron job every few days to a storage device via FTP.

From time to time i am getting the following error:
Code:
User or367 has been backed up.
User osegev has been backed up.
Remote write timed out.
Could not read reply from control connection -- timed out.
ncftpput /home/tmp/admin/user.admin.osegev.tar.gz: data transfer timed out.

As you can see above some of the backups succeed while other not, it is looks so randomly every time a different backup is damaged, I don't any logs to have a real reason why is it happen and how I can fix it (It happens with all the servers)

I would appreciate your help

Thanks
Daniel
 
FTP doesn't time out if transfers are actively taking place, but only if there's nothing being passed on the connection for a period of time. It's probably a problem in your connection since others aren't having it.

You can probably increase the timeout time, possibly in the ftp configuration file on your machine you're using to receive the backups, but you'd be better of resolving the connectivity issue.

Jeff
 
Thank you Jeff, I think i figured out what cause the problem,

DirectAdmin genrates a backup with the same name and it sends it to the backup server.
The second time it tries to send the backup it hangs because it probably waiting for approval to overwrite the existing file.

So, my question is
Can I order DirectAdmin to Overwrite existing file?
Or, Can it generate every time a different file name with some kind of prefix, date for example?


Thanks!!
 
u should make a script on the "destination" server that like 2h after all backup he move to a new directory created with a script with the data like admin_backups_08_31_09 or similar as u prefer

i did that script for local use on same server for weekly backup for keep more then one, if u need that script just ask and i post here
 
Thank you,

But, I wish I could the backup server I got is not a linux/windows machine. It is a small dedicate FTP server which is not possible to write any cronjob or scripts in it.

Is there something I can do on the server which backup the data?
 
Thank you Jeff, I think i figured out what cause the problem,

DirectAdmin genrates a backup with the same name and it sends it to the backup server.
The second time it tries to send the backup it hangs because it probably waiting for approval to overwrite the existing file.

So, my question is
Can I order DirectAdmin to Overwrite existing file?
Or, Can it generate every time a different file name with some kind of prefix, date for example?


Thanks!!

I don't think your timeout problem is caused by refusal to overwrite existing files. I agree with Jeff that it's probably connection problem.

In any event, DA uses the following script for backup uploads:/usr/local/directadmin/scripts/ftp_upload.php which you can edit to suit your needs.
The very first thing I would do is enabling error logging (just add something like
"-e /var/log/directadmin/ncftpput.log" to ncftpput command).
You can add ncftp command that renames the backup files later, after confirming it's not a network issue.
 
Back
Top