rubypond-s3backup-manager 0.1.02 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/s3backup_monitor CHANGED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env ruby
@@ -18,7 +18,7 @@ module S3BackupManager
18
18
  end
19
19
 
20
20
  def restore_database_from_file(username, database, directory)
21
- directory = "#{directory}/tmp/#{database}/s3postgresbackup/#{database}"
21
+ system "chown -R #{username} #{directory}"
22
22
  user_file = "#{directory}/globals.pgsql"
23
23
  system "cd /tmp && sudo -u #{username} psql -f #{user_file} >/dev/null 2>&1"
24
24
  exit(1) unless $?.success?
@@ -30,8 +30,8 @@ module S3BackupManager
30
30
 
31
31
  private
32
32
  def recreate_database!(username, database)
33
- system "cd /tmp && sudo -u #{username} dropdb #{database}"
34
- system "cd /tmp && sudo -u #{username} createdb --encoding=UNICODE #{database}"
33
+ # system "cd /tmp && sudo -u #{username} dropdb #{database}"
34
+ system "cd /tmp && sudo -u #{username} createdb --encoding=UNICODE #{database} > /dev/null 2>&1"
35
35
  end
36
36
 
37
37
  end
@@ -29,8 +29,8 @@ module S3BackupManager
29
29
 
30
30
  def restore(database, timestamp)
31
31
  filename = "#{@options[:adapter]}/#{timestamp}/#{database}"
32
- @dumped_filename = "/tmp/#{random_string}"
33
- super(filename, timestamp, @dumped_filename, "databases")
32
+ @dumped_filename = "/tmp/#{database}/s3postgresbackup/#{database}"
33
+ super(filename, timestamp, "/", "databases")
34
34
  restore_database_from_file(@options[:username], database, @dumped_filename)
35
35
  db_cleanup!
36
36
  end
@@ -4,6 +4,7 @@ require 'zlib'
4
4
  require 'archive/tar/minitar'
5
5
  require 'yaml'
6
6
 
7
+
7
8
  Dir["#{File.dirname(__FILE__)}/adapters/*"].each do |lib|
8
9
  require lib
9
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubypond-s3backup-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.02
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glenn Gillen
@@ -74,6 +74,7 @@ files:
74
74
  - spec/spec_helper.rb
75
75
  has_rdoc: "false"
76
76
  homepage: http://github.com/rubypond/s3backup-manager
77
+ licenses:
77
78
  post_install_message:
78
79
  rdoc_options: []
79
80
 
@@ -95,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
96
  requirements: []
96
97
 
97
98
  rubyforge_project:
98
- rubygems_version: 1.2.0
99
+ rubygems_version: 1.3.5
99
100
  signing_key:
100
101
  specification_version: 2
101
102
  summary: Scripts and daemon to manage encrypted backups on AmazonS3