LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2004, 11:58 PM   #1
madunix
LQ Newbie
 
Registered: Oct 2003
Posts: 25

Rep: Reputation: 0
FTP archive logs


I want your opinion people about this issue
We have 3 X Risc machines AIX UNIX
I am running Oracle9i on AIX RAC with 2Nodes (RS1 and RS2)
with archive mode, each oracle instant creates his own archive logs
on the first machine RS1 it creates logs1*.arc
rs1:/archive1# ls -al
-rw-r----- 1 oracle dba 104852480 Feb 19 15:37 log11740.arc
-rw-r----- 1 oracle dba 104857088 Feb 19 15:38 log11741.arc
-rw-r----- 1 oracle dba 104855040 Feb 19 15:39 log11742.arc
-rw-r----- 1 oracle dba 104856576 Feb 21 15:22 log11743.arc
-rw-r----- 1 oracle dba 23519744 Feb 23 14:32 log11744.arc
.......

and on the RS2 it creates logs2*.arc
rs2:/archive2# ls -al
-rw-r----- 1 oracle dba 104857088 Feb 25 12:59 log21271.arc
-rw-r----- 1 oracle dba 104849408 Feb 25 15:16 log21272.arc
-rw-r----- 1 oracle dba 47743488 Feb 25 15:31 log21273.arc
-rw-r----- 1 oracle dba 104857088 Feb 26 12:45 log21274.arc
-rw-r----- 1 oracle dba 104857088 Feb 26 14:41 log21275.arc
-rw-r----- 1 oracle dba 65959936 Feb 26 16:09 log21276.arc
.....

1- I want at the end of day to FTP the above files from each server
to standby AIX server rs3 to /backup folder
this folder will contain all the logs from both servers
2- now the part of file comparsion, if the logs1*.arc and logs2*.arc already exist (the same serial no. on source and destination) on the /backup folder the script should check up for the size of the simillar files
if this log files on the /backup folder less than the orginal one .. then it should be FTP it again, if not then skip the FTP and look for another file
3- After the script has been run successfully on both server RS1 and
and RS2 ...then it should give a report of wich files has been created
with there size..

All AIX server using KornShell as shell interface.
This FTP will be managed by oracle user

I started with this script

$host=192.168.0.1
$username=testuser
$passwd=testpwd
$file=log$seq.arc
$logdir=/archive1

#===begin ftp part===
ftp -i -n <<EOF
open $host
user $username $passwd
lcd $logdir
put $file
bye
EOF

I need some hints to end the script
I am really tired from FTP it manually

I was thinking with this solution too
find /archiveX -mtime -2 -exec rcp -p {} rsX:/backup \; # Copy all files that changed in the last 2 days;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I am not if the above command would do what I want .

Or any other solution might be helpful

What you thik about it?


Thanks
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp server - Pure ftp - logs in OK but no files visible tp11235 Linux - Networking 2 08-30-2005 05:11 AM
Strange FTP logs dominant Linux - Security 1 08-24-2004 01:46 AM
archive system logs? ANU Linux - General 3 12-01-2003 11:48 AM
importing an MS Outlook archive archive.pst alloydog Linux - Software 2 08-29-2003 03:02 PM
ftp logs Cristian Negres Linux - Software 1 12-02-2002 11:39 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration