Koozali.org: home of the SME Server

Using SME as centralised storage

robert

Using SME as centralised storage
« on: December 10, 2002, 03:50:10 AM »
Hey Im really getting into this GREAT PRODCUT - onya SME!
Ive got the Ibays happily running, but I need to automatically
pull a couple of files off of a SCO-UNIX box (or have it push them to SME).

I know how to manage cron, but Ive been reading
man & example pages and think
ftp is not suitable,
rcp is good, but i cant get the host.equiv files right!

Id be gratefull if anyone knows how to
rcp 192.168.168.1:/tmp/file 192.168.168.2:/tmp/xfile
(.2 is the SME, .1 is the SCO)
 
(If this is an inappropriate place for this Q, apology
& Pls ignore)

regards Rob

stephen noble

Re: Using SME as centralised storage
« Reply #1 on: December 10, 2002, 08:39:55 AM »
use scp
more explanation at the bottom of http://dungog.net/sme/products/backup.php

it's a good question, you clearly made an effort


regards
stephen noble

Gavin Jackson

Re: Using SME as centralised storage
« Reply #2 on: December 11, 2002, 05:55:56 AM »
Good news / Bad news

SCO does not include the ssh,sftp, or scp binaries as default.

Steve, This was my exact question in the offline email.

Possible transfers are

use samba and pull files from SCO - Messy
use rsync and pull files from SCO - Possible
use scp and pull files from SCO - Messy

Push via ftp from SCO in a cron job may work also .

Robert, Cannot recommend highly enough the work that steve has done.
 
SME <---> SME - works brilliantly
SME <--->  anyone else - can be done with enough time.

Robert, if you need rsync/ssh for SCO with an install shell  , Let me know offline and I can send them to you on a CD , No problem.


Regards,
Gav

robert

Re: FIXED with FTP
« Reply #3 on: December 11, 2002, 10:37:18 AM »
1st thanks to those who offfered advice
and SEASONS GREETINGS to SME-ers

my basic problem was moving file automatically
from a SCO OS5 box to an SME.
(sco lacks scp, ssh etc.!)

The solution is to use ftp, but it took some finding
to work out how to automate it.
So for those who (like me) dont know how to automate ftp,
here's the basics...

1. you need a .netrc file on the sending machine (sco)
in the home dir of the user that invokes it (ie root)
with a line per machine you want to ftp to
defining the machine/login/password
AND a blank line at the end

==.netrc================================
machine sme login root password fred

========================================

2. the ftp command used will automate the login per
the .netrc file, and will execute commands in a file you
create to define the transfer session details.

I called the file cron invokes /usr/bin/ftp1
and put the list of ftp commands in /usr/bin/ftp2
(note you dont put a 'prompt' line in the command file
as the 'ftp -i' must do that)

==/usr/bin/fpt1=========================
cd /where-input-files-are
ftp -i sme < /usr/bin/ftp2
========================================

==/usr/bin/fpt2=========================
cd /where-files-should-go-on-sme
binary
mput filespec*
========================================


i hope this saves someone else some effort
regards Rob