Answers: <p>Corey's answer ended up inspiring me to take another look at the plugins available, this time considering anything that could be applied to jobs as a post-build step. </p>
  
  <p>I found <a href="https://wiki.jenkins.io/display/JENKINS/AWS+CloudWatch+Logs+Publisher+Plugin" rel="nofollow noreferrer">AWS CloudWatch Logs Publisher Plugin</a>, which is a post-build step that pushes your logs to CloudWatch. Not quite the destination we originally had in mind, but it worked for us. Easy to configure too! Only downside is it doesn't currently have Pipeline functionality.</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-07-06T12:22:25.363Z
Answers: 2017-07-06T12:22:25.363Z
Answers: Alex
Answers: <p>Historically, I approached this a bit differently. I added a post-build step to each job, and had it copy the output to S3 at execution time via the S3 plugin.  <a href="https://vnextcoder.wordpress.com/2016/10/25/part-3-storing-jenkins-output-to-aws-s3-bucket/" rel="nofollow noreferrer">This blog post</a> covers the moving parts n a pretty granular detail. </p>
  
  <p>You may want to reference </p>
  
  <blockquote>
    <p>wget -O console-output.log ${BUILD_URL}consoleText </p>
  </blockquote>
  
  <p>as the output for the job in question in your build task. </p>
  
Answers: CC BY-SA 3.0
Answers: 2017-07-05T00:28:06.097Z
Answers: 2017-07-05T00:28:06.097Z
Answers: Corey Quinn
Answers: <ol>
  <li><p>you can wrirte python script with Boto3 package to upload your logs to s3 bucket and clear the logs in master and slave.</p></li>
  <li><p>Then create a job to run the python script . Make the job to run in desired time intervals.</p></li>
  <li><p>you can also monitor your jenkins using some monitoring tools like Splunk where you can see the build trends in dashboards in real time and create alerts to send mail notification or trigger a jenkins jobs which cleans the log when the memory is full.</p></li>
  </ol>
  
Answers: CC BY-SA 4.0
Answers: 2018-05-22T08:14:16.280Z
Answers: 2018-05-22T08:14:16.280Z
Answers: user7950
Body: <p>I'm looking to automatically back up Jenkins log files for all jobs running on our master and slaves once a week, moving them to aws' s3 and deleting them from their respective directories when done. </p>
  
  <p>My question is, is there an existing plugin that has the capabilities I need, or will I need to do this manually?</p>
  
  <p>I've found the <a href="https://wiki.jenkins.io/display/JENKINS/PeriodicBackup+Plugin" rel="noreferrer">Periodic Backup Plugin</a> but it only seems to back up locally, and is focused on config files, not log files (although I could use negative pathing to ignore everything but log files...which would be a massive pain). Likewise, <a href="https://wiki.jenkins.io/display/JENKINS/thinBackup" rel="noreferrer">ThinBackup</a> is also config-only. I'm hoping someone might have seen something googling isn't turning up.</p>
  
Tags: <jenkins><jenkins-plugins><backup>
Title: Backup Jenkins log files to external cloud storage
UserDisplayName: Alex
ThreadText: # Backup Jenkins log files to external cloud storage
  
  (Asked by: username_0 on 2017-07-03)
  
  I'm looking to automatically back up Jenkins log files for all jobs running on our master and slaves once a week, moving them to aws' s3 and deleting them from their respective directories when done.
  
  My question is, is there an existing plugin that has the capabilities I need, or will I need to do this manually?
  
  I've found the [Periodic Backup Plugin](https://wiki.jenkins.io/display/JENKINS/PeriodicBackup+Plugin) but it only seems to back up locally, and is focused on config files, not log files (although I could use negative pathing to ignore everything but log files...which would be a massive pain). Likewise, [ThinBackup](https://wiki.jenkins.io/display/JENKINS/thinBackup) is also config-only. I'm hoping someone might have seen something googling isn't turning up.
  
  **Tags:** jenkins, jenkins-plugins, backup
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2017-07-06. Score: 2 | Accepted answer
  
  username_1's answer ended up inspiring me to take another look at the plugins available, this time considering anything that could be applied to jobs as a post-build step.
  
  I found [AWS CloudWatch Logs Publisher Plugin](https://wiki.jenkins.io/display/JENKINS/AWS+CloudWatch+Logs+Publisher+Plugin), which is a post-build step that pushes your logs to CloudWatch. Not quite the destination we originally had in mind, but it worked for us. Easy to configure too! Only downside is it doesn't currently have Pipeline functionality.
  
  
  ---
  
  ### Answer by username_1 on 2017-07-05. Score: 4
  
  Historically, I approached this a bit differently. I added a post-build step to each job, and had it copy the output to S3 at execution time via the S3 plugin. [This blog post](https://vnextcoder.wordpress.com/2016/10/25/part-3-storing-jenkins-output-to-aws-s3-bucket/) covers the moving parts n a pretty granular detail.
  
  You may want to reference
  
  > wget -O console-output.log ${BUILD\_URL}consoleText
  
  as the output for the job in question in your build task.
  
  
  ---
  
  ### Answer by username_2 on 2018-05-22. Score: 0
  
  1. you can wrirte python script with Boto3 package to upload your logs to s3 bucket and clear the logs in master and slave.
  2. Then create a job to run the python script . Make the job to run in desired time intervals.
  3. you can also monitor your jenkins using some monitoring tools like Splunk where you can see the build trends in dashboards in real time and create alerts to send mail notification or trigger a jenkins jobs which cleans the log when the memory is full.
  
  
  ---
  
  