moving logs automatically but not removing


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers moving logs automatically but not removing
# 1  
Old 03-08-2010
moving logs automatically but not removing

hello all,

Need assistance on the subject line above.

I have a logserver.log located at /usr/local/logserver. It's NSLOGDEPTH=100. I'm not sure if this is the reason but my log file retention is only up to 100 only..
sample
logserver001.log
logserver002.log
...
...
logserver100.log

The other logs were already removed. I do not have any scripts on logrotate for this specific logs. My question now is: How can I move some logs automatically so that it will not be removed totally from the system. I'm planning to move it locally on the server and compressed it at the same time. My second plan is to move it on another server. Do I need to create a script on this or can be done on logrotate? (note: i do not want to remove old logs however)

thank you and appreciate your help.
# 2  
Old 03-08-2010
If u send a single file then you can achieve using a scp command itself. if u need more than some amount of file to be send you must write a script with scp.
# 3  
Old 03-08-2010
thank you..it will not work with logrotate right? as it will remove logs that will be rotated?

so just a scp script on crontab? thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies

2. UNIX for Dummies Questions & Answers

Removing PATTERN from txt without removing lines and general text formatting

Hi Everybody! First post! Totally noobie. I'm using the terminal to read a poorly formatted book. The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this. I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies

3. UNIX for Dummies Questions & Answers

Removing the logs of previous date

Hi folks, Please advise there is directory named logs and which there are several logs are there with the name appended by date , I can take out the latest one through cd /var/log ls -ltr but please suggest the command through which I can remove the logs of all the previous dats , the... (2 Replies)
Discussion started by: SankalpS
2 Replies

4. OS X (Apple)

Moving Files Automatically

I'm looking to find/create a script so that when a download is complete, I can run the script in order for it to automatically move a file such as... 'example.avi' into my videos folder I'm a novice when it comes to scripting, any advice/help would be greatly appreciated! Thanks Andrew (10 Replies)
Discussion started by: abudis
10 Replies

5. Solaris

Removing "Failed none for" error messages from sshd logs files

We have a number of system running the same patch level, OS version and sshd version. The systems also have the same sshd config and syslog.conf entries , however one of the systems keeps logging the following message everytime someone logs in: Nov 16 09:36:02 server389 sshd: Failed none for... (3 Replies)
Discussion started by: Mr_Webster
3 Replies

6. Shell Programming and Scripting

automatically removing a file

Hello, Is there a script that i could write to automatically delete a file everytime that it is created (ex. i have an append file that is created everytime I run a program but I need it to get deleted automatically because everytime I run the program it add the original number of files... (3 Replies)
Discussion started by: TDS
3 Replies

7. Shell Programming and Scripting

Grep yesterday logs from weblogic logs

Hi, I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows: """"""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies

8. Shell Programming and Scripting

automatically open

Hi I am trying to write a script to automatically use a predefined program to open a file according to its extension... But I don't know how to pass "programeta" ... :confused: while ]; do case $1 in -pdf ) programeta="kpdf" shift 1 ;; ... (1 Reply)
Discussion started by: pau
1 Replies

9. Shell Programming and Scripting

Removing files automatically from a directory after 30 days.

Hello; I have a directory that is collecting log and act files. I need to write a script that will remove these files once they are 30 days old. I have read through a number of threads on this site that have given me a great deal of information. However I have what seems to be a unique... (7 Replies)
Discussion started by: justinb_155
7 Replies

10. UNIX for Dummies Questions & Answers

moving or removing a file

Hi, Happy 2002. Now I am actually encountering a problem. Suppose I have a file which I can see has been named as -rw-rwx or .rwxrw-- . when I try to move this file I am unable to do so. Can someone please help me , How can i get rid of the file. Thanks in advance . :confused: (3 Replies)
Discussion started by: rooh
3 Replies
Login or Register to Ask a Question