GithubHelp home page GithubHelp logo

marianschmotzer / backup Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 7 KB

Puppet module and scripts to create lvm backup and wrapper to do lvm backup of kvm lists

License: Apache License 2.0

Puppet 55.08% Shell 34.77% Ruby 10.14%

backup's Introduction

backup

Puppet module and scripts to create lvm backup and wrapper to do lvm backup of kvm lists.

All scripts are really simple, but were quite usefull for me so i guess could be source of inspiration for others :-D

Puppet module

Includes puppet module to copy selected script and schedule a cron job.

Example :

backup {'sys_backup':
  hour         => 21,
  minute       => 30,
  script       => 'lvm_backup.sh',
  script_args  => 'sys',
}->
  backup {'kvm_backup':
  hour   => 23,
  minute => 00,
  script => 'kvm_backup.sh',
}

Scripts

You can find two of them

  • files/lvm_backup.sh
  • files/kvm_backup.sh

lvm_backup.sh

This script is used to create backup of LVs. It will get list of LVs identified with prefix. For example if you run ./lvm_backup.sh sys_ from LVs: sys_home sys_test bigtest

only first two will be backed up.

At the beggining of sctipt you can declare basic variables - like volume group name, disk to mount as an backup disk and so on.

kvm_backup.sh

Is only wrapper for lvm_backup.sh, it gets list of virtual machines from libvirt and runs lvm_backup.sh with prefixes to backup them.

backup's People

Contributors

marianschmotzer avatar

Watchers

 avatar  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.