Skip to main content

Backup Jenkins to S3

Project description


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.


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 The IAM role must have the GetObject, DeleteObject, PutObject and ListBucket S3 permissions for that bucket.


Setup with cron for ideal usage.


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.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jenkins-backup-s3, version 0.1.9
Filename, size File type Python version Upload date Hashes
Filename, size jenkins_backup_s3-0.1.9-py3-none-any.whl (6.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size jenkins-backup-s3-0.1.9.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page