System Backup FTP fails

Dannik

Verified User
Joined
Jan 7, 2009
Messages
82
Location
Netherlands
Hi. I recently installed a new server with Almalinux 8.9. Both Almalinux and DirectAdmin are updated to the latest version and everything seems to work, except te system backup. When performing the backup without usage of FTP, it works correctly; in /backup the right files appear. However, when I enable the option to export via FTP, the backup ends at the moment an FTP connection is initiated. The message in the ticket system says the backup has been completed, but when I open the message all I see is just one thing. I want to backup everything, so HTTP data, DNS data, MySQL databases and Custom Directories & Files. The message show only the creation of the first backup (HTTP data) and that's it. No FTP transfer and no other backups. When I look in /backup indeed only HTTP data can be found.
But like I said, when FTP upload is disable all backups can be found.
Regeluar Admin Backups don't appear to have any problems; they work as expected.

I tried several destination servers, changing ports in the firewall and even disabling the firewall (CSF), bu nothing seems to work. I can't find any logs about the failure either. I have 2 other servers running the same configuration and they work fine. The only difference is the OS, my first server runs Cloudlinux 7 and the second one CentOs 7. But I doubt it has something to do with Almalinux...?

Regards,
Danny
 
Did you check firewall on both servers? So also receiving server? Also check passive ports 35000-35999

Do you have enough space on the remote server?
 
Did you check firewall on both servers? So also receiving server? Also check passive ports 35000-35999

Do you have enough space on the remote server?
Yes, firewall settings are ok. I even tried with firewalls disabled... ?
But same result occurs on different receiving servers, while these different servers also receive backups from other servers. And as mention before, the admin backups run just fine, so I think the receiving servers are not the problem.

Danny
 
Have you checked all the logs in the /var/log/directadmin directory?
Yes, and the only log that is updated "at the right moment" is the system.log, but nothing about the backup can be found. To be sure I also checked the other logs, but without result.

Meanwhile I now even consider this as a bug, because the messaging system says "Your backups are ready", although obviously an error has occurred.

Danny
 
Oke so the /var/log/messages directory also shows nothing. It's indeed odd that it says "your backups are ready" while nothing is done.
Seems a bug to me too, especially since the normal backups are working fine. I don't see the difference.

Hmmz... seems I can kind of reproduce the problem on my Alma 8 server (did not test on 9 yet). So I used the system backup and choose FTP to the /backups directory in my account on another server.
Then I choose to only backup the DNS and started the system backup.

Shortly after I received the notice that the backup was completed successfully.
Both in the system notice and the "view log" option at the system backup, this was shown:

Performing sanity checks: Completed
Checking load average: Completed
Checking free disk space: Completed
Performing DNS backup
Stage 1 DNS backup: Completed
Stage 2 DNS backup: Completed
Performing cleanup operations: Completed

So far so good. But then the backups directory on my other server is totally empty, so nothing is transferred.

As for the logs. I can't find anything in the logs either. Except the 2024-Apr-01.log file which shows this:
Code:
01/04/2024:16:10:48     2001:1c05:xxx:etc  GET /CMD_AJAX_GET_COUNTS HTTP/1.1        admin
01/04/2024:16:10:50     2001:1c05:xxx:etc  GET /CMD_SYSTEM_BACKUP HTTP/1.1  admin
01/04/2024:16:11:26     2001:1c05:xxx:etc  POST /CMD_SYSTEM_BACKUP HTTP/1.1 admin
01/04/2024:16:11:29     2001:1c05:xxx:etc  GET /CMD_SYSTEM_BACKUP HTTP/1.1  admin
01/04/2024:16:11:49     2001:1c05:xxx:etc  POST /CMD_SYSTEM_BACKUP HTTP/1.1 admin
01/04/2024:16:11:52     2001:1c05:xxx:etc  GET /CMD_SYSTEM_BACKUP HTTP/1.1  admin
and this ipv6 is my home ip which I used to login to give the order to backup.

Nothing else is found anywhere.
I didn't see a tasq.queue file being created either, but maybe that went too quick and was gone before I could see it.

@fln seems we found a bug here.
 
Oke so the /var/log/messages directory also shows nothing. It's indeed odd that it says "your backups are ready" while nothing is done.
Seems a bug to me too, especially since the normal backups are working fine. I don't see the difference.

Hmmz... seems I can kind of reproduce the problem on my Alma 8 server (did not test on 9 yet). So I used the system backup and choose FTP to the /backups directory in my account on another server.
Then I choose to only backup the DNS and started the system backup.

Shortly after I received the notice that the backup was completed successfully.
Both in the system notice and the "view log" option at the system backup, this was shown:



So far so good. But then the backups directory on my other server is totally empty, so nothing is transferred.

As for the logs. I can't find anything in the logs either. Except the 2024-Apr-01.log file which shows this:
Code:
01/04/2024:16:10:48     2001:1c05:xxx:etc  GET /CMD_AJAX_GET_COUNTS HTTP/1.1        admin
01/04/2024:16:10:50     2001:1c05:xxx:etc  GET /CMD_SYSTEM_BACKUP HTTP/1.1  admin
01/04/2024:16:11:26     2001:1c05:xxx:etc  POST /CMD_SYSTEM_BACKUP HTTP/1.1 admin
01/04/2024:16:11:29     2001:1c05:xxx:etc  GET /CMD_SYSTEM_BACKUP HTTP/1.1  admin
01/04/2024:16:11:49     2001:1c05:xxx:etc  POST /CMD_SYSTEM_BACKUP HTTP/1.1 admin
01/04/2024:16:11:52     2001:1c05:xxx:etc  GET /CMD_SYSTEM_BACKUP HTTP/1.1  admin
and this ipv6 is my home ip which I used to login to give the order to backup.

Nothing else is found anywhere.
I didn't see a tasq.queue file being created either, but maybe that went too quick and was gone before I could see it.

@fln seems we found a bug here.

I'm glad you can reproduce it :)
Although your backup goes 1 step further than mine; I can see only one stage in the DNS backup with FTP enabled. With FTP disabled I also see 2 stages:
Performing sanity checks: Completed
Checking load average: Completed
Checking free disk space: Completed
Performing DNS backup
Stage 1 DNS backup: Completed
Performing cleanup operations: Completed

Strange thing is that on my other servers, which are running several years now, everything still works fine. Also with latest updates. So I guess it might have something to do with a new(er) installation somehow...?

Danny
 
Check this
Maybe you missed it but FTP backup are working flawlessly with admin/reseller/user FTP backups. So the issue must be a bug, since it's only happening on system backup.

Next to that, if FTP backup would fail, then it also would generate an error message, which it doesn't either.
 
I can confirm the problem as well. I also checked the log on the receiving server and no ftp attempt was made.
 
System backups uses an external script called sysbk for creating and uploading backups. This script expects ncftp package to be installed if backup is to be uploaded via FTP.

The error regarding missing /usr/bin/ncftpput command is printed to stdout and discarded when sysbk runs in quiet mode and most importantly not reported to the log file. The error visible if tool is called manually with /usr/local/sysbk/sysbk -s.

Make sure ncftp package is installed with yum install ncftp or apt-get install ncftp. It seems ncftp is no longer installed as part of the standard DA installation. Both sysbk and ncftp are quite ancient. Thanks for reporting this issue.
 
It seems ncftp is no longer installed as part of the standard DA installation.
That was probably removed at some time when DA started to use curl for backups via FTP.
Maybe it's possible to put ncftp back into the default DA installation or change the tool to use curl also like with other backups.

However, it's still odd that the system did not thrown an error into the DA notice or is missing a function check.

Thank you for looking at it and finding the cause.
 
I installed ncftp and the backup still did not get transferred. How about you Richard?
 
First time by accident, I gave a wrong FTP url so the backup was aborted due to wrong credentials.

So I changed the FTP url (in fact it becoming a different server too) and now this happens:
Performing sanity checks: backup already performed for 04-05-24 (//backup/04-05-24), aborting...
Performing cleanup operations: Completed
<br>
Aborting because the backup was already performed? @fln Don't I as server admin may decide how many times I want to run the backup?

Since I couldn't retry from this server, I tried from another server to this one. And backup does get transferred @floyd so to me seems fix for the most part. Except that you can only backup once a day it seems.
 
Nice!
Do you also have the issue that you can only do it once in a day? Because that is a bit odd.
If the backup fails, there is no way to do it again the same day. Feels off to me.
 
My problem is that I had set up a system backup on e particular server as a test and then forgot which one it was. Once I figured out the correct one it worked.

If you leave the backups on the source server then yes only once per day. If you check "Delete the local backup after remote transfer" then you can backup more than once a day but it will overwrite what is on the remote server.

Keep in mind that DA does not recommend System Backup. https://forum.directadmin.com/threa...gher-than-acceptable-limits.48606/post-249481
 
Keep in mind that DA does not recommend System Backup.
Yes thank you. I've read that. I was only testing to see if this was a bug or not. Normally I don't use it.
DA does recommend to use the admin backup/transfer. However, that one does not have some important backups one would like to make, like the DNS backup and the system files and directory's one can include by selection.
Not all are required but a DNS data backup is something which can come in handy if things go wrong.

If you check "Delete the local backup after remote transfer"
Ah thanks, then that was the cause. I thought it would just work as admin backup/transfer and doesn't matter how many times you do it. Which is in fact what one would expect.
 
Not all are required but a DNS data backup is something which can come in handy if things go wrong.

I guess that is true if you have some custom DNS settings. Otherwise wouldn't just recovering the user backups restore all the DNS. Even then I would think the user's custom DNS would be backed up with the user account but maybe not.

I use the Admin/Backup Transfer all the time to move user accounts. Isn't that what you would essentially be doing if you had to completely rebuild a server and recover using the user backups?

I have a document that I follow so that all of my servers are built exactly the same. There are no custom settings for one server that is different from another. Maybe most do not do this.
 
Back
Top