Click to See Complete Forum and Search --> : upload to a ftp site


klax33
02-26-2000, 08:21 PM
i'm trying to write something to perform backups every night. so far i can make the backup file and log into the ftp server, but i don't know how to tell it to upload. here is what works so far:

tar -cvpf backup.tar backup | gzip backup.tar ftp ftp.site.net

X_console
02-27-2000, 01:27 AM
If you check the FTP manual, it says something about auto-login and macros. From what I understand, you create a .netrc file with contains your username, password, and the machine, as well as macros. I understand the macros to be the commands that you run when you execute FTP. Haven't tried this, but I thought it was what you were looking for.

------------------
License Agreements are for people who have no confidence in their software.
Home: http://members.tripod.com/LunarsBlood/index.html
PGP: http://members.tripod.com/LunarsBlood/pgpkey.html

hardigunawan
11-29-2000, 04:04 AM
i can't really remember, but the following might work

ftp -n ftp.yourdomain.com <<End-Of-Session
user yourid yourpasswd
binary
bell
hash
put $yourfile
bye
End-Of-Session

ph34r
11-29-2000, 12:30 PM
I asked a similar question a little bit ago, and got a nice perl script to do it in return.
http://www.linuxnewbie.org/ubb/Forum14/HTML/001684.html