Log Management

In a cluster there are 4 servers namely,
Master-1,Master2,Slave-1,Slave-2
The logs of these servers are saved in a specific location- /nas/archive/"under the specific server name".
I need to take the logs of each server,archive it and put it in another location according to the servers.can anyone suggest as to how i can take the logs of each server?

Any thoughts or ideas would be very helpful.

Thanks,
Lekha.

Do a google search for "linux cp command", "linux mv command", and "gzip" :slight_smile:
jz

I am creating a script.so this action should be scripted.

you may move the four log files in a directory, and then create a tar-zipped file as:

tar -czvf logs.tgz /nas/archive/four_logs/

then copy the tar-zipped file to remote location using scp / ftp / sftp

this could be done in a script, with further enhancements such as adding date and time in the name of the tar-zipped file, check for failures etc.