vamboo 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/vamboo +8 -0
  2. data/lib/vamboo/version.rb +1 -1
  3. metadata +2 -2
data/bin/vamboo CHANGED
@@ -3,6 +3,7 @@
3
3
  require "vamboo"
4
4
  require "vamboo/vamboofile"
5
5
  require "thor"
6
+ require "logger"
6
7
 
7
8
  class VambooCLI < Thor
8
9
  desc "init", "Create configuration files at /usr/local/etc/vamboo or VAMBOO_HOME"
@@ -14,14 +15,21 @@ class VambooCLI < Thor
14
15
  desc "full_backup","Backup all virtual machines there are written in ${VAMBOO_HOME}/vm_glass.list"
15
16
  def full_backup(dest_dir)
16
17
  vamboo = VambooKernel.new(Vamboo.default_vamboo_home)
18
+ log = Logger.new("#{Vamboo.default_vamboo_home}/backup.log")
19
+ log.formatter = proc do |severity, datetime, progname, msg|
20
+ "#{@name}:#{datetime}: #{msg}\n"
21
+ end
22
+ log.info("Start Backup")
17
23
  threads = vamboo.domains.map do |domain|
18
24
  Thread.new do
25
+ log.info("Backup #{domain.name}")
19
26
  domain.backup(dest_dir)
20
27
  end
21
28
  end
22
29
  threads.each do |thread|
23
30
  thread.join
24
31
  end
32
+ log.info("Finish backup")
25
33
  end
26
34
 
27
35
  desc "backup NAME VMHD_PATH","Back up specified virtual machine there are VM_NAME, VMHD_PATH"
@@ -1,3 +1,3 @@
1
1
  module Vamboo
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vamboo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-01-07 00:00:00.000000000 Z
13
+ date: 2014-04-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler