FTP transfer problem | Joomla Support | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
The forums are currently locked and only available for read only access
sp_TopicIcon
FTP transfer problem
May 17, 2011
10:41 pm
Avatar
alex099
New Member
Members
Forum Posts: 2
Member Since:
May 17, 2011
sp_UserOfflineSmall Offline

Usefull information: Joomla 1.5, Rokettheme template
identifying information, like server names, config file name, login info was changed for security purposes.

Backups work! After the backup, the file is to be transferred to another server (/home/backupserver/public_html/conf1).

In the email below the file path from the put command in the warning message is wrong but the paths extracted from the config (conf1.php) are correct in the rest of the email. It looks like the put command is not getting the path from the config.

This is after the directory permissions involved were temporarily changed to 777.

****************************
email from Cron
****************************
Cron <origserver@rs4> /usr/bin/php /home/origserver/public_html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php conf1.php
...
From:
Cron Daemon <[email protected]>
...
Add to Contacts
To:

X-Powered-By: PHP/5.2.16
Set-Cookie: auth_clone=1
Content-type: text/html

<b>Using configs/conf1.php as configuration file</b><br />
<b>Starting /home/origserver/public_html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php</b><br />
<b>Starting XCloner for site http://www.origserver.com at 2011-05-16 03:15</b><br />
<b>Creating a fullbackup</b><br />
<b>Generating Backup ...</b><br />
<b>    Archive Name: backup_2011-05-16_03-15_www.origserver.com-sql-nodrop.tgz
<br />
    Number of Files: 8236
<br />
    Size of Original File: 52.9 MB
<br />
    Size of Archive: 24.36 MB
<br />
    Database Backup: <b>Fake_DB:</b> Backup Completed ( 377.21 KB )
<br />
    ### END REPORT
    </b><br />
<b>Backup Done</b><br />
<b>Backup file: /home/origserver/public_html/administrator/backups/backup_2011-05-16_03-15_www.FakeWebsite.com-sql-nodrop.tgz</b><br />
<b>Starting ftp transfer:</b><br />
Connected to Normal <b>ftp.backupserver.net Mode: Active</b><br /><br />

<b>Warning</b>:  ftp_put() [<a href='function.ftp-put'>function.ftp-put</a>]: Can't open that file: No such file or directory in <b>/home/origserver/public_html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php</b> on line <b>250</b><br />
<b style='color:red'>FTP upload has failed for file /home/origserver/public_html/administrator/backups/backup_2011-05-16_03-15_www.origserver.com-sql-nodrop.tgz ! Stopping ....<br /></b>

The following is the warning message from the next days backup after I blanked out the delivery path in the conf1.php config file. Its trying to find the directory in the current server (/home/origserver/)instead of the backup server (/home/backupserver/) server where FTP connected.

<b>Starting ftp transfer:</b><br />
Connected to Normal <b>ftp.backupserver.net Mode: Active</b><br /><br />
<b>Warning</b>:  ftp_put() [<a href='function.ftp-put'>function.ftp-put</a>]: Can't open that file: No such file or directory in <b>/home/origserver/public_html/administrator/components/com_xcloner-backupandrestore/cloner.cron.php</b> on line <b>250</b><br />
<b style='color:red'>FTP upload has failed for file /home/origserver/public_html/administrator/backups/backup_2011-05-17_03-15_www.origserver.com-sql-nodrop.tgz ! Stopping ....<br /></b>

Before this last backup I blanked out the delivery path for the ftp operation in the conf1.php config file and successfully completed a manual  file move using the cloners ftp transfer.

**********************************
config file - conf1.php
**********************************
$_CONFIG['license_code']='';
$_CONFIG['backup_path']="/home/origserver/public_html/";
$_CONFIG['clonerPath']="/home/origserver/public_html/administrator/backups";
$_CONFIG['jcuser']='info deleted';
$_CONFIG['jcpass']='info deleted';
$_CONFIG['mysql_host']="localhost";
$_CONFIG['mysql_user']='Fake_DB';
$_CONFIG['mysql_pass']='info deleted';
$_CONFIG['mysql_database']="Fake_DB";
$_CONFIG['select_folders']="";
$_CONFIG['select_lang']="english";
$_CONFIG['secure_ftp']="0";
$_CONFIG['backup_compress']="1";
$_CONFIG['cron_logemail']="[email protected]";
$_CONFIG['cron_exclude']="";
$_CONFIG['cron_send']="1";
$_CONFIG['cron_btype']="0";
$_CONFIG['cron_bname']="";
$_CONFIG['cron_ip']="";
$_CONFIG['cron_ftp_server']="ftp.backupserver.net";
$_CONFIG['cron_ftp_user']='[email protected]';
$_CONFIG['cron_ftp_pass']='info deleted;

$_CONFIG['cron_ftp_path']="/home/backupserver/public_html/conf1/"; Note: I blanked this out for the manual transfer and the next days backup and transfer. Permission was 777.

$_CONFIG['cron_ftp_delb']="";
$_CONFIG['databases_incl_list']="";
$_CONFIG['cron_sql_drop']="";
$_CONFIG['cron_email_address']="";
$_CONFIG['cron_file_delete']="8";
$_CONFIG['cron_file_delete_act']="1";
$_CONFIG['mem']="";
$_CONFIG['backup_refresh']="0";
$_CONFIG['refresh_time']="1";
$_CONFIG['refresh_mode']="0";
$_CONFIG['recordsPerSession']="40000";
$_CONFIG['excludeFilesSize']="-1";
$_CONFIG['splitBackupSize']="2048";
$_CONFIG['backup_refresh_number']="1000";
$_CONFIG['sql_mem']="";
$_CONFIG['enable_db_backup']="1";
$_CONFIG['zippath']="";
$_CONFIG['tarpath']="tar";
$_CONFIG['sqldump']="mysqldump --quote-names ";
$_CONFIG['system_dlink']="";
$_CONFIG['mosConfig_live_site']="www.origserver.com";
$_CONFIG['system_ftptransfer']="0";
$_CONFIG['system_mdatabases']="1";
$_CONFIG['add_backups_dir']="0";
$_CONFIG['cron_amazon_active']="";
$_CONFIG['cron_amazon_awsAccessKey']='';
$_CONFIG['cron_amazon_awsSecretKey']='';
$_CONFIG['cron_amazon_bucket']='';
$_CONFIG['cron_amazon_dirname']='';
$_CONFIG['debug']="0";

****************************
cloner.cron.php - line 250 to 259
****************************
$upload = ftp_put($conn_id, $destination_files[$i], $source_files[$i], FTP_BINARY);

// check upload status
if (!$upload) {
       echo "<b style='color:red'>FTP upload has failed for file $source_files[$i] ! Stopping ....<br /></b>";return;
   } else {
       echo "<b>Upload success from file <i>$source_files[$i]</i> <br />to <i>$destination_files[$i]</i> ...<br /></b>";
   }

}
******************************

May 18, 2011
6:30 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Hi Alex, from the looks of it, the ftp upload path seems incorrect, it needs to be a ftp path as shown in your ftp client, and not a full server path. Try using an empty value as path and see how it goes, it should put the backup in your ftp root path for those ftp details.

 

Regards, Ovidiu

May 18, 2011
9:25 pm
Avatar
alex099
New Member
Members
Forum Posts: 2
Member Since:
May 17, 2011
sp_UserOfflineSmall Offline

Thanks Ovidiu for your quick response.

That occurred to me and if you look at the configs cron_ftp_path setting I added a note saying that I blanked the setting and at the end of the email message from the Cron I added the warning I got from the next days backup with the setting blank. It looks like the put command in line 250 of the Cron script is not picking up the the cron_ftp_path setting from the config nor the default folder of the remote servers connection when the cron_ftp_path is blank. Please look into this as I am not knowledgeable enough.

Thanks

May 19, 2011
6:18 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Hi Alex, the ftp cron path is being properly prefixed if you check the cloner.cron.php file, line 198. I still think the error you have there is related to an improper path, did you resave the config1 cron config after making the changes?

 

if you like, opem the cloner.cron.php file, and replace line 254 

 

echo "<b style='color:red'>FTP upload has failed for file $source_files[$i] ! Stopping ....<br /></b>";return;

 

with

 

echo "<b style='color:red'>FTP upload has failed for file $source_files[$i] to <i>$destination_files[$i]</i>! Stopping ....<br /></b>";return;

 

this should give you the destiantion path it's being added

 

Ovidiu

May 19, 2011
7:08 am
Avatar
Victor
Mexico
New Member
Members
Forum Posts: 1
Member Since:
May 19, 2011
sp_UserOfflineSmall Offline

I have the following error:

There was an error retrieving the JSON data from the server, try again or contact the developers!

Details: error -- undefined

JSON url: index2.php?option=com_cloner&task=refresh&json=1&startf=20100&lines=43864&backup=backup_2011-05-19_01-53_www.bajaswingers.com-sql-nodrop.tar&excl_manual=

 

is ther anything i should do from this end

May 19, 2011
8:12 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Have you  checked the disk space available?

 

It seems the backup process is stopping when processing lines 20100-20200 from the administrator/backups/perm.txt file, try and open that and see if you notice any large files!

 

Ovidiu

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
Andy: 21
D: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 738
Members: 10030
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Omar Vera
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0