Hi,
kein Problem:
#!/bin/bash
FTP_SERVER="servernameoderip"
FTP_USER="ftpbenutzer"
FTP_PW="passwort"
FTP_REMOTEBACKUPDIR="/pfad/zum/backupdir"
FTP_LOCALDIR="/wo/liegt/der/dump/lokal"
FTP_MEINDUMP="backup.dump"
echo "machine $FTP_SERVER login $FTP_USER password $FTP_PW" >/root/.netrc
echo "macdef init" >>/root/.netrc
echo "passive" >>/root/.netrc
echo "binary" >>/root/.netrc
echo "lcd $FTP_LOCALDIR" >>/root/.netrc
echo "cd $FTP_REMOTEBACKUPDIR" >>/root/.netrc
echo "put $FTP_MEINDUMP" >>/root/.netrc
echo "quit" >>/root/.netrc
echo "" >>/root/.netrc
chmod 600 /root/.netrc
ftp $FTP_SERVER
rm /root/.netrc
Gruß
Dani