Hi,
Attatched is a simple script I produced to backup the etc folder to an FTP server. All works well except I'm now trying to add the option to upload the backup to a second FTP server.
The if statement work well EXCEPT for when the ftp statements is there. I get an unexpected end of file?
Any help would be appreciated.
Thanks!
Ok realised that your not allowed to indent the !EOF Now fixed, enjoy the file
Message was edited by: The-Kevster
Hello,
Change the following lines from
ftp -n ${strFtp2_Server} << !EOF user ${strFtp2_Username} ${strFtp2_Password} put /tmp/${strFilename} ${strFtp2_Path}${strFilename} quit !EOF
to
ftp -n ${strFtp2_Server} << !EOF user ${strFtp2_Username} ${strFtp2_Password} put /tmp/${strFilename} ${strFtp2_Path}${strFilename} quit !EOF
Note that you should NOT have any white space in front of the ftp commands or the !EOF line.
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education. CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354
As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization
Hello,
Change the following lines from
ftp -n ${strFtp2_Server} << !EOF user ${strFtp2_Username} ${strFtp2_Password} put /tmp/${strFilename} ${strFtp2_Path}${strFilename} quit !EOF
to
ftp -n ${strFtp2_Server} << !EOF user ${strFtp2_Username} ${strFtp2_Password} put /tmp/${strFilename} ${strFtp2_Path}${strFilename} quit !EOF
Note that you should NOT have any white space in front of the ftp commands or the !EOF line.
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education. CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354
As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization