How to fix CPanel FTP Backup cpbackup login undefined error

February 6th, 2006

As a side note to Joomla components I also maintain many linux servers around the world for many top companies and high profile sites. It was while trying to configure CPANEL Backups recently that I came across a problem.

Having scoured the web looking for help and advice on different forums I finally drew the conclusion that no one really had a clue and that I would have to investigate and fix the problem byself.

The Environment

WHM 10.8.0 cPanel 10.8.1-C112
RedHat Enterprise 3 i686 – WHM X v3.1.0

The Problem

When running /scripts/cpbackup on the nightly cron the script would terminate on trying to FTP te packaged files to the FTP server, the error produced is:

Net::FTP=GLOB(0×83259bc): Timeout at /scripts/cpbackup line 389 Can’t call method “login” on an undefined value at /scripts/cpbackup line 391, line 31.

The Issue

The real issue I am not expert enough to tell you however I know that my problem is now fixed by following these simple steps. Basicaly reinstalling Perl’s Net:FTP module.

The Solution (1)

I ran the following commands, while logged in SSH by root.

perl -MCPAN -e shell

cpan> force install Net::FTP

Do you want to modify/update your configuration (y|n) ? [no]

quit

The Solution (2)

Update: Well I dont know if this was the problem but it is worth mentioning I guess. MAKE SURE THE FTP SERVER NAME IS VALID!! Mine had a typo in it so I really cant say which of these two solutions fixed the problem now – oh well – the backups are working and thats the main thing :-)

I hope this helps someone – please comment on this if it does help you – this problem caused me nights of sleeplessness :-)

Phil.

Leave a Reply