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 +1 -0
- data/lib/adapters/postgres_adapter.rb +3 -3
- data/lib/models/database_backup.rb +2 -2
- data/lib/s3backup-manager.rb +1 -0
- metadata +3 -2
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
|
-
|
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/#{
|
33
|
-
super(filename, timestamp,
|
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
|
data/lib/s3backup-manager.rb
CHANGED
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.
|
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.
|
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
|