This is a discussion on script for uploading files to a FTP server within the Shell scripting forums, part of the Development/Scripting category; Hi, Is there a way to open a connection to a FTP server and upload the files I want? Say ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hi,
Is there a way to open a connection to a FTP server and upload the files I want? Say I have some backups which I want to upload to a secure server. The backups are named something like backup.`date +%d.%m.%y`.tgz. I need to upload these daily files to FTP. I believe NET::FTP (or something like that - if this help is installed.Thank you guys! Love this site |
| Sponsored Links | ||
|
|
|
|||
|
Here is sample code:
Code:
#/bin/bash FTPU="user" # ftp login name FTPP="passwd" # ftp password FTPS="ftp.server.com" # remote ftp server FTPF="/home/backup/" # remote ftp server directory for $FTPU & $FTPP LOCALD="backup.$(date +%d.%m.%y).tgz" ncftpput -m -u $FTPU -p $FTPP $FTPS $FTPF $LOCALD |
|
||||
|
dam charvi you are too fast
May this http://bash.cyberciti.biz/ftp/ftptreeupload.bash.html help u, it is same stuff but u need ot make few mods
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
Quote:
Thank you charvi and rockdalinux!! You guys rule! Regards, Marin M. |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script for FTP'ing 8 differnt server for pulling the files | vishal_titre | Shell scripting | 0 | 08-17-2007 07:09 PM |
| How to Prevent Uploading Perl Scripts in /tmp Directory | bipinkdas | Web servers | 1 | 06-25-2007 09:57 PM |
| Script to extract some part of files: | satish1482 | Shell scripting | 0 | 03-13-2007 06:30 PM |
| Shell script for automatic conversion of files in tar files | kasimani | Shell scripting | 2 | 02-08-2007 04:45 PM |
| Script to remove executable files | sweta | Shell scripting | 4 | 03-12-2005 02:21 PM |