mysql_truck 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mysql_truck/loader.rb +11 -11
- data/lib/mysql_truck/version.rb +1 -1
- metadata +1 -1
data/lib/mysql_truck/loader.rb
CHANGED
@@ -27,20 +27,20 @@ module MysqlTruck
|
|
27
27
|
@time = Time.new(*backup_date_str.split("-"))
|
28
28
|
initialize_directories
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
puts "Download & gunzip backups"
|
31
|
+
puts "-------------------"
|
32
32
|
|
33
33
|
|
34
|
-
|
35
|
-
|
34
|
+
@bucket.keys(:prefix => s3_path).each do |key|
|
35
|
+
next unless (filename = download_file(key))
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
37
|
+
# gunzip file
|
38
|
+
if tmp_path.join(filename).exist?
|
39
|
+
print " - Inflating #{filename} ... "
|
40
|
+
time = benchmark { `gunzip -f #{tmp_path.join(filename)}` }
|
41
|
+
print "complete (#{formatted_time time}).\n"
|
42
|
+
end
|
43
|
+
end
|
44
44
|
|
45
45
|
# Load data
|
46
46
|
puts "\nLoading schema and data by table"
|
data/lib/mysql_truck/version.rb
CHANGED