Error Backup After DA 1.31 Update

DRKT

Verified User
Joined
Oct 8, 2003
Messages
217
Hi!

i upgrade Directadmin to 1.31 and a have a error with my autobackup...

--------
*** Backup not uploaded ***
Please install /usr/bin/ncftpput by running:

cd /usr/local/directadmin/scripts
./ncftp.sh
--------

and i have a error if install this file:

--------
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/usr/local/directadmin/scripts/packages/ncftp-3.0.2.fix/ncftp'
make: *** [all] Error 2
( cd ncftp ; make "CC=gcc" "CFLAGS=-D_LARGEFILE64_SOURCE -g -O2" )
make[1]: Entering directory `/usr/local/directadmin/scripts/packages/ncftp-3.0.2.fix/ncftp'
gcc -D_LARGEFILE64_SOURCE -g -O2 -Dncftp -DBINDIR=\"/usr/bin\" -DHAVE_CONFIG_H -I/usr/local/directadmin/scripts/packages/ncftp-3.0.2.fix -I/usr/local/include -I. -I../libncftp -I../Strn -I../sio main.c -c
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
main.c: In function `PreInit':
main.c:265: `LC_ALL' undeclared (first use in this function)
main.c:265: (Each undeclared identifier is reported only once
main.c:265: for each function it appears in.)
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/usr/local/directadmin/scripts/packages/ncftp-3.0.2.fix/ncftp'
make: *** [install] Error 2
---------

Why?? and how to fix?
 
Hello,

I found this with google:
http://linuxfromscratch.org/pipermail/blfs-support/2003-October.txt
You may have inadvertently managed to
compile glibc without locale support because LC_ALL is supposed to be
defined in locale.h, which sits in /usr/include IF your glibc is
correct.
I checked a few of our build systems and they've all got LC_ALL defined in the locale.h file as mentioned on that page:
Code:
[root@server ~]# [b]grep LC_ALL /usr/include/locale.h[/b]
#define LC_ALL            __LC_ALL
# define LC_ALL_MASK            (LC_CTYPE_MASK \
[root@server ~]#
So try running the grep command as I did to see if you've got LC_ALL defined inside your locale.h file as well.

As for the solution if you dont have it, I would say to reinstall glibc from a package, depending on which OS you have.

If you don't want to fight with that error, you can also try "curl" instead of ncftpput:
http://help.directadmin.com/item.php?id=111

John
 
I don''t know if this is the same issue,
But after update to version 1.31.0

When using Admin Backup/Transfer RC1
I receive message tickets from the backups like this:

User user 1 has been backed up.
Invalid reply: "USER PASS QUIT PORT NLST LIST TYPE MODE RETR STOR"
Invalid reply: "DELE CWD CDUP PWD XPWD MKD XMKD RMD XRMD NOOP"
Invalid reply: "SYST ABOR RNFR RNTO PASV REST APPE STAT HELP SIZE"
Invalid reply: "SITE FEAT OPTS "

User user 2 has been backed up.
Invalid reply: "USER PASS QUIT PORT NLST LIST TYPE MODE RETR STOR"
Invalid reply: "DELE CWD CDUP PWD XPWD MKD XMKD RMD XRMD NOOP"
Invalid reply: "SYST ABOR RNFR RNTO PASV REST APPE STAT HELP SIZE"
Invalid reply: "SITE FEAT OPTS "

After giving the command in directadmin in "system backup"
and select al the home directory's
it runs beatifully, en tranfers it to remote ftp perfect.
with no error..

In previous versions of DA the Admin Backup/Transfer RC1 runs perfect.
Oh..And I'm running 2 servers with Directadmin and both are giving the same error.

any Idea what could get wrong.

regards Marco
 
Last edited:
Hello,

One thing to check in your ftp_upload.php is to add the "quotes" around the $variables... basically, make it look like the ncftpput command in thie guide:
http://help.directadmin.com/item.php?id=111

eg:
Code:
$FTPPUT -t 25 -m -u "$ftp_username" -p "$ftp_password" "$ftp_ip" "$ftp_path" "$ftp_local_file" 2>&1
Or you can switch back to the php format, which is also in the guide, just at the bottom.

John
 
Hello,

I noticed that there was a file called ftp_upload.php.old
it was renamed on the time that the update is performed.
the original file php_upload.php was completely changed.
so i renamed the original ftp_upload.php to let say ftp_upload.old2
en renamed the ftp_upload.old to ftp_upload.php.
en forced an backup right away.

the backups then runs perfect, why is the ftp_upload renamed to an different file? is this a bug? en wil this also be changed on next updates?

regards, Marco
 
So, I edited ftp_upload.php to this

/bin/sh
/usr/bin/ncftpput -t 25 -m -u "$ftp_username" -p "$ftp_password" "$ftp_ip" "$ftp_path" "$ftp_local_file" 2>&1
RET=$?
exit $RET

because I assummed Its the new standard of directadmin
and then it would use ncftpput,
But the same error occurs, and ncftpput is installed

am I getting this wrong...or ?

And isn't system backup using the same ftp_upload script? and that one runs perfect..?
 
Last edited:
I noticed on Fedora servers (seems to be mostly core 3 servers) that ncftpput is simply not there on them, other servers have it though that run Centos but not FC3 (and Redhat 9 either it seems), is this a new program (ncftpput) that was recently added or did it disappear during the .31 update?

Ah never mind looks like:
Code:
cd /usr/local/directadmin/scripts
./ncftp.sh

Fixed it :)
 
Last edited:
Same problem

Hello,

I noticed that there was a file called ftp_upload.php.old
it was renamed on the time that the update is performed.
the original file php_upload.php was completely changed.
so i renamed the original ftp_upload.php to let say ftp_upload.old2
en renamed the ftp_upload.old to ftp_upload.php.
en forced an backup right away.

the backups then runs perfect, why is the ftp_upload renamed to an different file? is this a bug? en wil this also be changed on next updates?

regards, Marco

I had the same problem.
Thanks for the solution :)
 
I was hoping my backup issues were solved after using the improved backup 'system'. But I still get errors during a backup for some (not all) users.

Details:

Error writing settings file for [x]_db
Error while backing up database [x]_db
Error while backing up database [x]_db: Cannot find the sql file after backup was run: /home/admin/user_backups/[x]/backup/[x]_db.sql

Error Compressing the backup file /home/admin/user_backups/[x]/backup/home.tar.gz : /bin/tar: /home/admin/user_backups/[x]/backup/home.tar.gz: Cannot open: Permission denied
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: Error exit delayed from previous errors

gzip: stdout: Broken pipe


Does anyone has a solution to fix these errors?
 
Most likely, your /home/admin/user_backups directory needs to be chowned to admin:admin, chmod to 711. Also make sure there are no sub-directories under user_backups if no backup is in progress.

John
 
Most likely, your /home/admin/user_backups directory needs to be chowned to admin:admin, chmod to 711. Also make sure there are no sub-directories under user_backups if no backup is in progress.

John

Details about the directory, chmod seems to be ok:

Code:
# ls -lart /home/admin/user_backups/
total 761560
drwx--x--x  6 admin admin           4096 2006-06-24 08:19 ..
-rw-r-----  1 admin       1010    169546 2006-06-28 03:34 a-user.tar.gz
-rw-r-----  1 admin       1006    949848 2006-08-18 03:34 another-user.tar.gz
-rw-r-----  1 admin username    86216390 2007-06-02 03:33 username.tar.gz
-rw-r-----  1 admin usernameII     30665 2007-10-22 03:34 usernameII.tar.gz
dr--------  2 admin admin           4096 2007-10-22 03:34 .

So it seems some 'old' backup files are still present.
 
No, this is not correct:

dr-------- 2 admin admin 4096 2007-10-22 03:34 .

Type:
Code:
chmod 711 /home/admin/user_backups
John
 
Ok, I just looked at the files in it. Chmodded now. After next backup will let you know if it is working again.
 
Back
Top