cant backup to ftp

YairNet

Verified User
Joined
Apr 29, 2010
Messages
18
DA Panel:
Code:
Subject: An error occurred during the backup	Today at 15:39
User annette has been backed up. <15:39:09>
ncftpput /home/tmp/admin/myuser.tar.gz: server said: Could not create file.
<15:39:10>

debug:
Code:
Debug mode. Level 8000

root priv set: uid:0 gid:0 euid:0 egid:0
pidfile written
staring queue
dataskq: command: action=backup&database%5Fdata%5Faware=yes&ftp%5Fip=%38%34%2E%39%35%2E%32%34%31%2E%39%38&ftp%5Fpassword=NjE%34MTgxMA%3D%3D&ftp%5Fpath=%2F&ftp%5Fport=%32%31&ftp%5Fusername=linuxup&owner=admin&select%30=myuser&type=reseller&value=multiple&when=now&where=ftp
InternalText::init(user)
InternalText::init(backup)
InternalText::init(backup)
InternalText::init(user)
User::setQuota(0) user=myuser
quota command: /usr/sbin/setquota myuser 0 0 0 0 /
Quotas set
InternalText::init(email)
InternalText::init(ftp)
InternalText::init(database)
Database::connect 0
Database::connect 0.5 - da_admin : 111
Database::connect 1
Database::connect 5
Users list for DB myuser_nolan
listType: 0
 0: myuser
 1: myuser_nolan
0 User: myuser
1 User: myuser
2 User: myuser
3 User: myuser
0 User: myuser_nolan
1 User: myuser_nolan
2 User: myuser_nolan
3 User: myuser_nolan
0 settings file: 
 0: myuser=alter_priv=Y&create_priv=Y&create_tmp_table_priv=Y&delete_priv=Y&drop_priv=Y&grant_priv=N&index_priv=Y&insert_priv=Y&lock_tables_priv=Y&passwd=*02A97F3A3726BC3F5C5F4F4CD71D762506A88799&references_priv=Y&select_priv=Y&update_priv=Y
 1: myuser_nolan=alter_priv=Y&create_priv=Y&create_tmp_table_priv=Y&delete_priv=Y&drop_priv=Y&grant_priv=N&index_priv=Y&insert_priv=Y&lock_tables_priv=Y&passwd=*092BA3F84E90EE79654C0147D8E2ED819781FD57&references_priv=Y&select_priv=Y&update_priv=Y
1 settings file: 
 0: accesshosts=0=localhost
 1: myuser=alter_priv=Y&create_priv=Y&create_tmp_table_priv=Y&delete_priv=Y&drop_priv=Y&grant_priv=N&index_priv=Y&insert_priv=Y&lock_tables_priv=Y&passwd=*02A97F3A3726BC3F5C5F4F4CD71D762506A88799&references_priv=Y&select_priv=Y&update_priv=Y
 2: myuser_nolan=alter_priv=Y&create_priv=Y&create_tmp_table_priv=Y&delete_priv=Y&drop_priv=Y&grant_priv=N&index_priv=Y&insert_priv=Y&lock_tables_priv=Y&passwd=*092BA3F84E90EE79654C0147D8E2ED819781FD57&references_priv=Y&select_priv=Y&update_priv=Y
2 settings file: 
 0: accesshosts=0=localhost
 1: myuser=alter_priv=Y&create_priv=Y&create_tmp_table_priv=Y&delete_priv=Y&drop_priv=Y&grant_priv=N&index_priv=Y&insert_priv=Y&lock_tables_priv=Y&passwd=*02A97F3A3726BC3F5C5F4F4CD71D762506A88799&references_priv=Y&select_priv=Y&update_priv=Y
 2: myuser_nolan=alter_priv=Y&create_priv=Y&create_tmp_table_priv=Y&delete_priv=Y&drop_priv=Y&grant_priv=N&index_priv=Y&insert_priv=Y&lock_tables_priv=Y&passwd=*092BA3F84E90EE79654C0147D8E2ED819781FD57&references_priv=Y&select_priv=Y&update_priv=Y
InternalText::init(serverinfo)



*************
Dump command: /usr/bin/mysqldump --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --host=localhost --add-drop-table --create-options --extended-insert --quick --quote-names --no-create-db myuser_nolan > /home/tmp/admin/myuser/backup/myuser_nolan.sql 2> /home/tmp/admin/myuser/backup/myuser_nolan.dump.log

eUID: 0 UID: 0 eGID: 0 GID: 0
InternalText::init(domain)
just after hc.init("domain"); for myuser-interiors.com.
Currently in getlock(/home/tmp/admin/myuser/backup/myuser_nolan.conf) : finished
InternalText::init(redirect)
executeAsUser('/bin/nice -n 19 /bin/tar czfp /home/tmp/admin/myuser/backup/home.tar.gz -C /home/myuser/ 2>&1 '.bash_logout' '.bash_profile' '.bashrc' '.emacs' 'Maildir'', 155, myuser, 1, '(null)', int *child_pid, *snd, group=(null)) uid=553 gid=555
Running backup command: /bin/nice -n 19 /bin/tar czfp /home/tmp/admin/myuser/myuser.tar.gz  -C /home/tmp/admin/myuser backup -C /home/myuser/ domains > /dev/null
User::setQuota(250) user=myuser
quota command: /usr/sbin/setquota myuser 256000 281600 0 0 /
Quotas set
Load to env:
 0: action=backup
 1: database_data_aware=yes
 2: ftp_ip=1.2.3.4
 3: ftp_local_file=/home/tmp/admin/myuser.tar.gz
 4: ftp_password=mypass
 5: ftp_path=/
 6: ftp_port=21
 7: ftp_remote_file=myuser.tar.gz
 8: ftp_username=linuxup
 9: owner=admin
10: select0=myuser
11: type=reseller
12: value=multiple
13: when=now
14: where=ftp
executeAsUser('/bin/sh', 512, diradmin, 1, 'FTPPUT=/usr/bin/ncftpput
TOUCH=/bin/touch
PORT=${ftp_port}

if [ ! -e $TOUCH ] && [ -e /usr/bin/touch ]; then
	TOUCH=/usr/bin/touch
fi

if [ ! -e $FTPPUT ]; then
	echo "";
	echo "*** Backup not uploaded ***";
	echo "Please install $FTPPUT by running:";
	echo "";
	echo "cd /usr/local/directadmin/scripts";
	echo "./ncftp.sh";
	echo "";
	exit 10;
fi

if [ ! -e "${ftp_local_file}" ]; then
	echo "Cannot find backup file ${ftp_local_file} to upload";
	exit 11;
fi

CFG=${ftp_local_file}.cfg
/bin/rm -f $CFG
$TOUCH $CFG
/bin/chmod 600 $CFG
/bin/echo "host $ftp_ip" >> $CFG
/bin/echo "user $ftp_username" >> $CFG
/bin/echo "pass $ftp_password" >> $CFG

$FTPPUT -f $CFG -V -t 25 -P $PORT -m "$ftp_path" "$ftp_local_file" 2>&1
RET=$?

/bin/rm -f $CFG

exit $RET
', int *child_pid, *snd, group=(null)) uid=102 gid=103
InternalText::init(ticket)
InternalText::init(user)
InternalText::init(user)
Tally::scan_log: /var/log/secure:   cur_size (105450) == last_size (105450). Assuming nothing changed. Skipping.
Tally::scan_log: /var/log/maillog:   cur_size (584205) == last_size (584205). Assuming nothing changed. Skipping.
check_brute_force_logs: begin IP sorting
check_brute_force_logs: done IP sorting. Begin User sorting
check_brute_force_logs: done User sorting
done queue
 
Last edited:
Code:
server said: Could not create file.

This means the remote ftp server could not create the file.

You could log in to the ftp with a client manually and try to upload a file, see if it is possible. If so, try to upload a file named exactly the same, e.g. myuser.tar.gz (the real name of course).
 
This means the remote ftp server could not create the file.

You could log in to the ftp with a client manually and try to upload a file, see if it is possible. If so, try to upload a file named exactly the same, e.g. myuser.tar.gz (the real name of course).
Code:
[root@server user_backups]# ftp ip
Connected to ip.
220 (vsFTPd 2.2.2)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (...:admin): linuxup
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> send ...tar.gz
local: ....tar.gz remote: ....tar.gz
227 Entering Passive Mode (///...,223,142).
150 Ok to send data.
 
Maybe try to use ncftpput as well to see if that works

Code:
/usr/bin/ncftpput -t 25 -m -u "username" -p "password" "server.ip" "/path" "file.tar.gz"
 
Maybe try to use ncftpput as well to see if that works

Code:
/usr/bin/ncftpput -t 25 -m -u "username" -p "password" "server.ip" "/path" "file.tar.gz"

Code:
[root@server user_backups]# /usr/bin/ncftpput -t 25 -m -u "user" -p "pass" "ip" "/" "update.tar.gz"
ncftpput update.tar.gz: server said: Could not create file.

now i try:
Code:
[root@server user_backups]# /usr/bin/ncftpput -t 25 -m -u "user" -p "pass" "ip" "/home/user" "update.tar.gz"
update.tar.gz:                     ETA:   0:23    1.44/  9.39 MB  352.49 kB/s

work!

i try:

205xith.jpg
(see img!)

give me:

Code:
Error during Backup Creation

Details

ncftpls: Could not change directory: server said: Failed to change directory.
/usr/bin/ncftpls returned error code 5
FTP information invalid.
 

Attachments

  • 205xith.jpg
    205xith.jpg
    19.3 KB · Views: 137
Your remote path is wrong then if you get failed to change directory.
 
It's odd, but it may be that your ftp server simply doesn't do what most ftp servers do.

You could debug around in /usr/local/directadmin/scripts/ftp_list.php (it seems it gets stuck there now)

It may be easier to try a different ftp server. Or update vsftpd, as I see you are running an old version.
 
It could be the fact that its already chrooted into /home/user and it has no where to go. Make the remote path . or make an actual folder like backups or something.
 
It could be the fact that its already chrooted into /home/user and it has no where to go. Make the remote path . or make an actual folder like backups or something.

this has hit me before, using /backups or any name (I did have issues with _ in name) worked for me. not positive but I think I had to leave trailing slash off, remember had to mess with it just cannot remember if I left it (the /) on or off.
 
I just checked my notes. Using the admin reseller backup solution you do need to leave off the trailing slash.

Jeff
 
Back
Top