Moving files from one server to another server every 5 min


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Moving files from one server to another server every 5 min
# 1  
Old 06-02-2010
Power Moving files from one server to another server every 5 min

HI All,

I am trying to automate my stuff to make 'to-do-easier'.


I am new to shell scripting. I need help to you regarding the below problem.

I have one directory in my server, frequently files will store in that directory. I want to move that files into another server on every 5 minites.

I want one shell script for automate the above process. and i am unable to find files which is still under process.

Thanks in advance
# 2  
Old 06-02-2010
Quote:
I am unable to find files which is still under process.
I'm not sure what this means.

To copy files from one server to another, you can run the scp command.

Code:
scp local-file remote-server:/path/to/remote/file

To login without a password, you should use pre-shared keys. (The instructions for ssh are the same as for scp. Whenever ssh can login, scp can login, it's the same protocol in the end.)
# 3  
Old 06-04-2010
MySQL Thanks Corona688

Thanks for you reply. Now, I am able to scp but main problem is "finding files which is under process". some times my script takes updating files. I lossing some data.
# 4  
Old 06-04-2010
Smiliealso you can use the tar command
# 5  
Old 06-04-2010
what do u mean by files under process.. does ur process has some specific name...

moreover, can you tell me the output of "ps -eaf " in ur source directory from where u do scp.
# 6  
Old 06-04-2010
Why you don't try rsync
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with moving files on remote server using sftp

I need to sftp a file ABC_sysdate.csv (File name with system date and timestamp) to a temporary directory on the remote server and once the file is copied I've to move the file from temporary directory to the main directory with the same name. I have to generate a new file every hour and repeat... (6 Replies)
Discussion started by: srinup
6 Replies

2. Solaris

Script to get files from remote server to local server through sftp without prompting for password

Hi, I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script. Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies

3. Red Hat

Moving boot SSD from a dead server to a new server

Hi all, We have a disk array that has the boot drive on an OCZ SSD on a PCIe card. Well, the motherboard died and we got a new motherboard. We moved the controllers, NICs, etc, to the exact same slots on the new motherboard, except now it won't boot. I guess it doesn't recognize the OS on the... (1 Reply)
Discussion started by: glowe57
1 Replies

4. Shell Programming and Scripting

KSH fetching files from server A onto server B and putting on server C

Dear Friends, Sorry for this basic request. But I just started learning Ksh recently and still I am a newbie in this field. Q: I have files on one server and the date format is 20121001000009_224625.in which has year (yyyy) month (mm) and date (dd). I have these files on server A. The task... (8 Replies)
Discussion started by: BrownBob
8 Replies

5. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

6. Solaris

Key Points when Moving from Server A to Server B??

Hi Everyone, I'm still learning daily about UNIX (specifically Solaris 10). I'm tasked with moving my current application and database from Datacenter A to Datacenter B. There will be no updates and no changes other than a new server and new location. So far, I have Solaris... (3 Replies)
Discussion started by: smckech1972
3 Replies

7. Shell Programming and Scripting

script for to take files from FTP server to UNIX server and Unzipped that files

script for to take files from FTP server to UNIX server and Unzipped that files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

8. AIX

moving to new server

I'm moving an application from an old RS6000 running 4.3.2 to a p5 running 5.3. Could someone point me a the direction on docs to perform such a function? Critical OS files, moving of printers and print queues especially. thanks (5 Replies)
Discussion started by: sullivjp
5 Replies

9. Post Here to Contact Site Administrators and Moderators

It seems last 20 min Server was very very Slow

Hi Guys, Since last 20-30 min Server was Too slow ..even few of times i got Database connection error. Thanks Sanjay Tripathi (0 Replies)
Discussion started by: SanjayLinux
0 Replies

10. UNIX for Dummies Questions & Answers

moving files from one server to another

Hi guys, I have few files on my laptop(win XP). I am connected to a network called 'asx'(intranet). I have ssh2 and reflections on my system. I need to copy these few files from my system to a folder on the UNIX server(called 'CSSX'). Please can anyone explain me how to acheive this? I am... (1 Reply)
Discussion started by: uniksbro
1 Replies
Login or Register to Ask a Question