Skip to content

Instantly share code, notes, and snippets.

@andreiashu
Created August 19, 2014 15:09
Show Gist options
  • Save andreiashu/54f0ccd212991cf9ddb5 to your computer and use it in GitHub Desktop.
Save andreiashu/54f0ccd212991cf9ddb5 to your computer and use it in GitHub Desktop.
Jenkins self-backup to S3 job
cd /var/lib
tar czf ${WORKSPACE}/ecm_jenkins.tar.gz --exclude='*.log' --exclude='jenkins/jobs/*/builds/*' --exclude='jenkins/jobs/*/workspace/*' jenkins
s3cmd put ${WORKSPACE}/ecm_jenkins.tar.gz s3://[bucket-name]/ecm_jenkins.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment