The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Possible to use a Java app with dll files on Unix-systems Scorp-D UNIX for Dummies Questions & Answers 3 03-29-2007 09:52 AM
Creating create mirrored disk files systems using mkfs command GLJ@USC UNIX for Dummies Questions & Answers 4 11-07-2006 01:52 PM
Managing nodes??? TRUEST UNIX for Advanced & Expert Users 5 03-21-2003 05:47 AM
Number of disks, space available, files systems ? geogeo Filesystems, Disks and Memory 2 09-30-2002 05:28 AM
managing users SmartJuniorUnix UNIX for Dummies Questions & Answers 4 09-20-2000 02:34 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-22-2008
yabai yabai is offline
Registered User
  
 

Join Date: May 2008
Posts: 11
advice on managing files between two systems

I am looking for some guidance to see if this is the most efficient solution.

I have a piece of software that updates a directory every night at 2am. The directory contains xml files so at 2am any new files are written, any modified files are modified and any deleted files are removed from the directory.

I need to send new and modified files to a different system. I also need to send a list of deleted files.

I had thought about using rsynch but the system I am feeding doesn't want to upload all files every day as it is a drain. That is why they want new/amended files only and a list of deleted files.

Here's my plan;
- directory on main server (let's call is 'a') is refreshed at 2.00am
- i can run rscnch on 'a' and a new folder 'b' at 4.00am
- between 2.00am and 4.00am folder 'a' and 'b' will be different.
- at 2.30am i can run a chron job on directory 'a' to send the new/amended files to the other system.
- at 3.00am i can run a script to cmpare the difference between 'a' and 'b' and output a list of files that are in 'b' but not 'a'. this can then be sent to the other system.

It seems a bit long winded but I am not aware of another way to do this. Does anyone have any suggestions for a better approach?

Thanks
  #2 (permalink)  
Old 05-22-2008
nua7 nua7 is offline
Registered User
  
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 353
I don't know , if I got this correct, but you need to send the modified files and list of deleted files to another machine.

The update/operation on files takes place at 2.00 AM in the morning.Suppose this is script1.

Suppose this operation takes place till 4.00 AM. You can run a script , say script2 which would list the deleted files and the modified files by script1.

Script2 can use find command with atime(or some other) option to find the modified files.These files can be ftp'ied to other machine , say host2.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0