BASH script to FTP a log file to another server monthly
I recently wrote a quick BASH shell script to FTP a log file to another server monthly. First, I modified the logrorate configuration to rotate a service’s logs monthly. Then I added a cron job to be executed the following script once a month. NOTE: It’s important to give logrotate enough time to finish rotating the logs. Here’s my script: