Giter Site home page Giter Site logo

chef-backup's Introduction

chef-backup

Simple backup scripts to do daily backups of an open source chef server (and to do disaster recovery on a new chef server)

Usage

Perform a daily backup (add to your crontab): chef-daily-backup BACKUP_DIR RETENTION_DAYS

Restore a daily backup: chef-restore-from-backup BACKUP_DIR BACKUP_DATE(YYYY-MM-DD)

Examples

chef-daily-backup /chef-backups 10

Creates backups of the database, uploaded cookbooks, and basic .pem files (webui.pem and validation.pem) that can be used to restore your chef environment on a newly built chef server. The backups are stored in /chef-backups (which must already exist). Any backups in /chef-backups older than 10 days will be deleted after the current backup finishes.

chef-restore-from-backup /chef-backups 2013-03-19

A warning is displayed asking if you really want to overwrite the current data on your chef server. If you choose to continue, /chef-backups will be checked to see if it contains all the necessary backups (created via chef-daily-backup). If everything's good, the script continues to tear down the existing chef environment, expand the backup for March 19th, 2013, and restart chef services.

Notes

Currently this only works for chef 10.x, which uses couchdb to store data.

The restore script makes some assumptions about your setup (location of various directories, existance of the chef-webui user). Most of these can be found in constants at the top of the file. Please review before use.

Systems

These scripts were written for Ubuntu systems. Patches and/or pull requests for compatibility with other systems are more than welcome.

License

MIT. See LICENSE

chef-backup's People

Contributors

agentdave avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

obazoud ist-lmc

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.