Coder Social home page Coder Social logo

ldoming / jenkins-backup-s3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from artsy/jenkins-backup-s3

0.0 1.0 0.0 6.75 MB

A collection of scripts to backup Jenkins configuration to S3, as well as manage and restore those backups

License: MIT License

Python 98.98% Shell 1.02%

jenkins-backup-s3's Introduction

jenkins-backup-s3

A collection of scripts to backup Jenkins configuration to S3, as well as manage and restore those backups. By default runs silently (no output) with proper exit codes. Log Level option enables output.

Setup

pip install jenkins-backup-s3

Configure S3 and IAM

  • Create an S3 bucket to store backups.

  • Create an IAM role with STS:AssumeRole and a trust Service ec2.amazonaws.com. The IAM role must have the GetObject, DeleteObject, PutObject and ListBucket S3 permissions for that bucket.

Usage

Setup with cron for ideal usage.

backup-jenkins {OPTIONS} {COMMAND} {COMMAND_OPTIONS}

Options can be set directly or via and environment variable.

The only required option is your S3 bucket:

  • backup-jenkins --bucket={BUCKET_NAME}

Other available options are:

Bucket prefix (defaults to "jenkins-backups"):

  • backup-jenkins --bucket-prefix={BUCKET_PREFIX}

Bucket region (defaults to "us-east-1"):

  • backup-jenkins --bucket-region={BUCKET_REGION}

Available commands:

  • create
  • restore
  • list
  • delete
  • prune

Run backup-jenkins {COMMAND} --help for command-specific options.

Running a daily backup on Jenkins

Create a new item in Jenkins and configure a build of this repository.

Set the shell / virtualenv builder (if you have it installed) to run backup-jenkins create.

Set the build on a daily CRON schedule.

jenkins-backup-s3's People

Contributors

izakp avatar matt0x6f avatar ssmiller25 avatar mcgillij avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.