Office server => laptop =>client server ...a lengthy and laborious ftp procedure

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions Office server => laptop =>client server ...a lengthy and laborious ftp procedure
# 1  
Old 12-05-2010
Office server => laptop =>client server ...a lengthy and laborious ftp procedure

Hi All,

I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible.

I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then transfer these to client servers to import these into the database over there.This has become a laborious task and frustrating , as I get the requests in the middle of the night also.

How I do it.
1. Using command prompt of windows i ftp the files to my laptop

2. Using the same ftp i transfer these to client server.

I have to do this because there is no direct connectivity from office servers to the client servers due to firewall restrictions.

Can you help me automate this process( of step 1 and step2)?
Or guide me to the post if this has been already discussed.

Regds,
Kunwar
# 2  
Old 12-06-2010
There's some ideas for a MSDOS Batch File to automate ftp in this post.

https://www.unix.com/shell-programmin...ix-server.html

We can take this idea a lot further but if the filenames are always the same a Batch File is a straightforward method for a repetitive task.
You don't mention Operating System versions or the actual file sizes but if we assume that the existing process works then it must be possible to automate that task.
This User Gave Thanks to methyl For This Post:
# 3  
Old 12-07-2010
Thanks methyl. I am able to transfer files using the method given in the link. But the thing is that the filenames to be transferred are of different name always.

So can you help me automate it? I have come to know that we can pass parameter to a .bat file using % parameter .But i dont know batch scripting.
I am not getting how to implement it in the .bat file.

PFB the details you asked:
=================================================
1. Office server: SunOs
2. Laptop: Windows XP Service Pack 3
3. Client server: SunOs

File sizes can vary from few MBs to few GBs(<10GB).
=================================================
# 4  
Old 12-07-2010
Within a Batch File for example.
Code:
set FILE_NAME=%1
You can then refer to the variable
echo %FILE_NAME%


Here is an example of providing four variables, creating a FTP input file, and then executing the lot. In a live environment think carefully about holding passwords in flat files.

Code:
REM ftptest.bat
REM parameter driven with autologin

set X_FILE=%1
set X_USER=%2
set X_PASS=%3
set X_SERV=%4

echo %X_FILE% %X_USER% %X_PASS% %X_SERV%

echo user %X_USER% %X_PASS% > ftptest.inp
echo ascii >> ftptest.inp
echo get %X_FILE% >> ftptest.inp
echo quit >> ftptest.inp

ftp -n -s:ftptest.inp %X_SERV%

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Update/Download file from FTP server to UNIX Server

HI Guys, I want to download files from FTP Server to my Unix server. I have tried , buy No Luck . Below Command i have tried. 1-Wget - Error "wget' not found" 2.ftp -n $HOST ...Not Working. 3.scp -i ftp://user:passowrd@hostname:21/ran/on/test.txt Any Suggestion (2 Replies)
Discussion started by: pareshkp
2 Replies

2. Shell Programming and Scripting

Sftp script for dev server to client server

hi, i am new to unix, cuold u send some sftp acripts to send files to dev server to clint server, (1 Reply)
Discussion started by: Koti.annam
1 Replies

3. Red Hat

Implement FTP server on RHEL server without using FTP client

We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies

4. Linux

Unable to connect to Server machine from a client machine using ftp service

Hi, Could you please help me with the below issue.. I'm running RHEL6 OS on both server (192.168.0.10) and client machines (192.168.0.1). I'm trying to connect to server from the client machine using ftp service. I have installed vsftpd daemon on both the machines. I'm getting... (4 Replies)
Discussion started by: raosr020
4 Replies

5. Programming

[C++] [Unix] TCP non-blocking. Detect server disconnection procedure over, from client.

Hello! I searched forum for similar topic, with no luck, if you know one, delete this topic, and send me private message with link please. Little background: I have a lot of clients and one serwer. Client can make multiple connections on different ports and ips, but only one can be acctive... (2 Replies)
Discussion started by: ikeban
2 Replies

6. Red Hat

when users ftp to server the timezone reflected is UTC but the server is set to TZ in localtime

Guys, Need your help coz my server runs in local time GMT +8, but when client use ftp and login, the resulting timestamp seen in each file is in UTC format. We need to set that the time should be the same as GMT +8 when in ftp session. I am using RHEL 5.3. root@]# ll total 1740... (2 Replies)
Discussion started by: shtobias
2 Replies

7. Shell Programming and Scripting

preserving the timestamp of a file when copied from remote server to local server using ftp

Hi, I need to copy few files from remote server to local server. I write a shell script to connect to the remote server using ftp and go to that path. Now i need to copy those files in the remote directory to my local server with the timestamp of all those files shouldnt be changed. ... (5 Replies)
Discussion started by: arunkumarmc
5 Replies

8. Programming

Client/Server Socket Application - Preventing Client from quitting on server crash

Problem - Linux Client/Server Socket Application: Preventing Client from quitting on server crash Hi, I am writing a Linux socket Server and Client using TCP protocol on Ubuntu 9.04 x64. I am having problem trying to implement a scenario where the client should keep running even when the... (2 Replies)
Discussion started by: varun.nagpaal
2 Replies

9. Shell Programming and Scripting

how to move a file from one server to another server using FTP in shell script?

I have a file --> file1.txt i need to copy this file to another server using FTP....the 2 servers are server1 and server2..may i know how to write a script that can do this? thanks in advance! Im a newbie to this... (4 Replies)
Discussion started by: forevercalz
4 Replies

10. Linux

ftp server/client buffers

Hi all, and again, I need help by you :-) I am using RH Advanced Server 2.1 with the defaukt wu-ftpd deamon. Now i want to tune the speed of my ftp transfers, but for this I need to increase the buffers for reading/writing from/to a filesystem and the sending/receiving buffers of the network.... (1 Reply)
Discussion started by: malcom
1 Replies
Login or Register to Ask a Question