1) do you already have the backup script on the remote server ?
2) I see you have scp so I'll assume you have ssh (secure shell) If so you can do ssh user@remoteserver name_of_backup_script.sh
This will prompt you for the users password and then run the backup script.
3) Depending on how your backup script works (lets say it creates a tar file [fred08012003.tar]) then you can have another script (or as part of the backup) to ftp the file to you.
ssh user@remoteserver name_of_backup_script.sh; ftp_script.sh
If thats the case why login? just set a crontab to run the two scripts for you!
AND FINALLY:
4) if you have neither 1, 2, 3 then "allthough very basic" maybe these will help:
------------------------------------------------------------
Weekly_backup.sh
#!/bin/ksh
#
# NAME: Weeklybackup.sh
# TASK: To do level 0 backup
# CODE: Laurie Baker
#
# To Rewind the tape add...
#
# mt -f /dev/rmt/0 rewind
#
# Back up the local disks /, /usr, /.bigpart, /opt
#
#
# Set-up the lists of volumes to backup
#
UFSDUMPLISTLOCAL="/ /usr /.bigpart /opt"
VXDUMPLISTLOCAL=""
LOCALMACH=localhost
DUMPLOG=`date '+%d%b%Y'`
DUMPLOG="/backups/logs/dumplog$DUMPLOG.log"
cat /dev/null > $DUMPLOG
echo " ¬¬¬ CAUTION! ¬¬¬"
echo " ****** SYSTEM BACKUP IN PROCESS ******"
echo "+++++++ LAurie BAker ++++++++"
for i in `echo $UFSDUMPLISTLOCAL`
do
echo "****** $i ******"
/usr/sbin/ufsdump 0fcu /dev/rmt/0cn $i >> $DUMPLOG 2>&1
done
# Note: change device if writing to disk
#
# Backup the shared disks
#
for i in `echo $VXDUMPLISTLOCAL`
do
echo "****** $i ******"
/usr/sbin/vxdump -0fcus /dev/rmt/0cn 87040 $i >> $DUMPLOG 2>&1
done
#
# Backup other local disks (uncomment if required)
#
# for i in /etc/opt/SUNWcluster/conf/ccdssa
# do
# echo "****** $i ******"
# /usr/sbin/ufsdump 0fcu /dev/rmt/0cn $i >> $DUMPLOG 2>&1
# done
mt rewoffl
# Uncomment next line to reboot if required
#/usr/sbin/init 6
-----------------------------------------------------------
NOTE this backup is for output to tape so needs changing if you need to write to disk :¬)
AND
------------------------------------------------------------
FTP_TO_HOME.sh
#!/bin/sh
Date=`/usr/bin/date '+%Y%m%d'`
Filelocation=/path_to/backup.file
host=someftphost.com
local=/u01/backups
login_name=someuser
password=somepassword
cp $Filelocation $local/$Date.backup
/usr/bin/gzip $local/*
cd $local
ftp -v -n $host << EOF
user $login_name $password
prompt
bin
mput *
quit
EOF
rm -f /u01/backups/*
------------------------------------------------------------