×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Copying log files out to back up server

Copying log files out to back up server

Copying log files out to back up server

(OP)
Hi, this is probably an easy question to answer, but would like how to write the script for this as I am not a scripted and have not used cron tab or anything before...

Got a CentOS server, has the log files under /var/log/radius and not only need to copy these to a local directory on the server, like /etc/var/log/radius-logs or whatever name we make, we also need to be able to have these log files automatically copied to centralised server (not the same box).

Can someone please help with the script how to achieve this


Thanks

RE: Copying log files out to back up server

cp /etc/var/log/radius/* full/path/to/new/location/for/files/

enter 'man cp' or 'cp --help' for more info

between servers, use scp (Secure CoPy) the command syntax is basically the same as the CoPy command, again use 'man scp' to get all the options.




Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: Copying log files out to back up server

My suggestion is using nfs and mount it and using rsync to backup log files rather than using cp command..

RE: Copying log files out to back up server

Ah yes nfs. Wasted errrm spent many an hour trying to get it to work 100% reliably

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: Copying log files out to back up server

(OP)
Thank you for the help guys.
Yes, I figured out the cp command and tested and it worked fine........ I had a feeling that the system would need to be mounted, but I have since found out that the organisation complete a snapshot every night anyway, so a local back up is fine.

Thank you for the help. Very much appreciated.

RE: Copying log files out to back up server

rsync does not need nfs to work , it will quite happily copy over ssh (& is operfect to the task for copying to a remote server)

man rsync

A Maintenance contract is essential, not a Luxury.
Do things on the cheap & it will cost you dear

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close