Your link show here
We analogikan we have 2 servers, where:
Server1 = 192.168.1.1
Server2 = 192.168.1.2
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:
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"
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"