Transferring Recordings to SFTP not FTP

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Transferring Recordings to SFTP not FTP

Postby udfxrookie » Wed Nov 11, 2015 1:49 pm

So I'm having issues sending recordings to a secure FTP (SFTP) which uses port 22 like SSH.

Here's what I get:
Code: Select all
/usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --debugX

----- DEBUG -----


----- SUPER DEBUG -----

/bootincluded_archives.filelist 2464
/license.tar.gz 42268
/.readahead 62940
/ssh2-0.10.tgz 22187
/bootincluded_archives.filelist 2464


|select recording_id,start_time from recording_log where filename='bootincluded_archives.filelist' order by recording_id desc LIMIT 1;|
||2015-11-11|bootincluded_archives.filelist|     ||
Net::FTP>>> Net::FTP(2.77)
Net::FTP>>>   Exporter(5.68)
Net::FTP>>>   Net::Cmd(2.29)
Net::FTP>>>   IO::Socket::INET(1.33)
Net::FTP>>>     IO::Socket(1.36)
Net::FTP>>>       IO::Handle(1.34)
Net::FTP=GLOB(0x1e900a0)<<< SSH-2.0-OpenSSH
Can't call method "login" on an undefined value at /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl line 447.


I edited astguiclient.conf with the details... but unsure what needs to be changed to allow SFTP vs FTP
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.10-452n build: 14111-0554 | Asterisk 1.8.31.0-vici | 1 AIO Setup Helping local companies startup www.AKAMarketing.net
udfxrookie
 
Posts: 178
Joined: Thu Dec 10, 2009 9:42 am
Location: Florida

Re: Transferring Recordings to SFTP not FTP

Postby dspaan » Sun Mar 12, 2017 6:48 pm

I would like to know this too since the server we need to send recordings to does not allow standard FTP.
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1377
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Transferring Recordings to SFTP not FTP

Postby mflorell » Sun Mar 12, 2017 7:29 pm

SFTP is a pain to deal with, it is slow, it uses more CPU resources, and in most cases it is unnecessary. Also, the perl modules for it can be difficult to get working, and some SFTP servers won't work with any of the existing SFTP perl modules.

If you want to use SFTP for the cron audio scripts you will have to rewrite them to use SFTP, which is completely different from how FTP works. I've created SFTP perl scripts before (like AST_VDsales_export_SFTP.pl), but the SFTP servers are so temperamental, it's difficult to get them working.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Transferring Recordings to SFTP not FTP

Postby dspaan » Sun Mar 12, 2017 8:21 pm

Hi Matt, i've worked with the AST_VDsales script before. I was looking at the parameters for the script but do you know if there is a way to force the script to write all files to one directory instead of creating a directory of the year and underneath the day folders and the files within?
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1377
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Transferring Recordings to SFTP not FTP

Postby mflorell » Sun Mar 12, 2017 9:17 pm

There are two variables set in the script for that:

$NODATEDIR = 0; # Don't use dated directories for audio
$YEARDIR = 1; # put dated directories in a year directory first
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: Bing [Bot] and 72 guests