Ftp Sheel

Your link show here

It turns out this is so a problem quite annoying for most people. When Automaticuploads require from our server to another server. Imagine if a file that must be uploaded it a lot and have quite a long distance of time, we should still be kah upload those files manually? If I'm not, because I am the type of person basically lazy, so as much as possible I find ways how it runs automatically
We analogikan we have 2 servers, where:
Server1 = 192.168.1.1
Server2 = 192.168.1.2

Automatic FTP Shell Script on Linux Ubuntu

In his scenario we will upload automatically over ftp from server1 to server2, then the shell script for automatic ftp in linux ubuntu would like this:

SHELL =/bin/sh
Path =/sbin:/bin:/usr/sbin:/usr/bin

HOST = ' 192.168.1.2 '
User = ' server1 '
Password = ' server1pwd '
File = '/path/file/anda/berada '

FTP-n $HOST < END_SCRIPT <
quote USER $USER
quote PASS $PASSWORD
put $FILE
Quit
END_SCRIPT
exit 0

Need I remind, the path the files to be uploaded is worth is not saved in the folder/root/because this is potentially a shell script could not access or ftp path. It happened to me, I keep a file to be uploaded in folder/root/foldersaya/filesaya.txt
Or if you want to save the file is exactly the same as the illustration above, then it's good your ftp shell script is stored in the folder/root/folder-shell-script/shell-script-anda.sh. I recommend also to let you upload a file that will be the same with difolder shell script you. And then on the FILE in shell script you shall become like this:

File = './file-you '

Because if it were not so, the problem is the file will not be readable and more or less will pop up an error like this: "Could not creating file"