Page 1 of 1

Transferring Recordings to SFTP not FTP

PostPosted: Wed Nov 11, 2015 1:49 pm
by udfxrookie
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

Re: Transferring Recordings to SFTP not FTP

PostPosted: Sun Mar 12, 2017 6:48 pm
by dspaan
I would like to know this too since the server we need to send recordings to does not allow standard FTP.

Re: Transferring Recordings to SFTP not FTP

PostPosted: Sun Mar 12, 2017 7:29 pm
by mflorell
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.

Re: Transferring Recordings to SFTP not FTP

PostPosted: Sun Mar 12, 2017 8:21 pm
by dspaan
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?

Re: Transferring Recordings to SFTP not FTP

PostPosted: Sun Mar 12, 2017 9:17 pm
by mflorell
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