webtranslateit-safe 0.4.8 → 0.4.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 622f6f352864fc8dc4b3938346a25a46a47874e3b439938ed3d9b177218f2564
4
- data.tar.gz: fa08df6cdc398f48a2bb5f8c7fd2289bf50b9cf6c3f6aaa39b542f8143363357
3
+ metadata.gz: 1a8304cc611880266f79c56c9be3a4e5cea6275073c93889a4dfd599ad6cf851
4
+ data.tar.gz: 46a96b97260f9458625e433681562dd0997e4b7d79e19082dd52add75a9712f5
5
5
  SHA512:
6
- metadata.gz: 458c754bea2197d46e29e9405705af3961a03b1fec4f2f72e994c022c5549412ff4f1baa00cbd868d36df07a0d94a2cda7007b6fb447b739ed36df0efefd63e5
7
- data.tar.gz: e70216d1c71e82b4d980a264e50f411b1c392a9d0f26f60605e71a8dc633199a4e195bed14786e858ff84aa415e90a69204f45869c8ea1a7850583b781591349
6
+ metadata.gz: 670a84fa71b7b52132670219d064e816bd68475c3a40bbc96fc9fcce9471ef073c8aea272800490c97517e1e8c01536f1db7c35badbe193169530fca32b01946
7
+ data.tar.gz: 75b72ba9cb7ef01b6e327187479e379db60feb60a0eceac7e96d34f9637206f01fed991c6e8f84f5ee0bfe376eb72d3165337be62dc14c417cde8fb8c92c4580
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.4.10 - 2023-07-06
2
+
3
+ * Fix retry strategy when using SCP.
4
+ ## 0.4.9 - 2023-07-06
5
+
6
+ * Use pigz instead of gzip when available on system to speed up compression time.
1
7
  ## 0.4.8 - 2023-07-05
2
8
 
3
9
  * Remove svndump feature.
data/README.markdown CHANGED
@@ -152,7 +152,6 @@ safe do
152
152
  s3 100
153
153
  cloudfiles 100
154
154
  sftp 100
155
- scp 100
156
155
  end
157
156
 
158
157
  mysqldump do
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WebTranslateIt
4
+
5
+ module Safe
6
+
7
+ class Pigz < Pipe
8
+
9
+ protected
10
+
11
+ def post_process
12
+ @backup.compressed = true
13
+ end
14
+
15
+ def pipe
16
+ '|pigz'
17
+ end
18
+
19
+ def extension
20
+ '.gz'
21
+ end
22
+
23
+ def active?
24
+ !@backup.compressed && !(find_executable 'pigz').nil?
25
+ end
26
+
27
+ end
28
+
29
+ end
30
+
31
+ end
@@ -32,7 +32,7 @@ module WebTranslateIt
32
32
  puts "Sending #{@backup.path} to #{full_path}" if verbose?
33
33
  begin
34
34
  connexion.upload! @backup.path, full_path
35
- rescue IO::TimeoutError
35
+ rescue IO::TimeoutError, Net::SCP::Error
36
36
  puts 'Upload timed out, retrying'
37
37
  retries += 1
38
38
  if retries >= MAX_RETRIES
@@ -40,7 +40,7 @@ module WebTranslateIt
40
40
  else
41
41
  retry unless retries >= MAX_RETRIES
42
42
  end
43
- rescue Net::SFTP::StatusException, Net::SCP::Error
43
+ rescue Net::SFTP::StatusException
44
44
  Net::SFTP.start(host, user, opts) do |sftp|
45
45
  puts "Ensuring remote path (#{path}) exists" if verbose?
46
46
  # mkdir -p
@@ -5,8 +5,8 @@ require 'net/scp'
5
5
  require 'tmpdir'
6
6
  require 'fileutils'
7
7
  require 'benchmark'
8
-
9
8
  require 'tempfile'
9
+ require 'mkmf'
10
10
 
11
11
  require 'web_translate_it/safe/tmp_file'
12
12
 
@@ -26,6 +26,7 @@ require 'web_translate_it/safe/mongodump'
26
26
  require 'web_translate_it/safe/pipe'
27
27
  require 'web_translate_it/safe/gpg'
28
28
  require 'web_translate_it/safe/gzip'
29
+ require 'web_translate_it/safe/pigz'
29
30
 
30
31
  require 'web_translate_it/safe/sink'
31
32
  require 'web_translate_it/safe/local'
@@ -33,6 +34,11 @@ require 'web_translate_it/safe/s3'
33
34
  require 'web_translate_it/safe/cloudfiles'
34
35
  require 'web_translate_it/safe/sftp'
35
36
 
37
+ # Keeps mkmf from littering STDOUT
38
+ MakeMakefile::Logging.quiet = true
39
+ # Keeps mkmf from creating a mkmf.log file on current path
40
+ MakeMakefile::Logging.logfile(File::NULL)
41
+
36
42
  module WebTranslateIt
37
43
 
38
44
  module Safe
@@ -51,7 +57,7 @@ module WebTranslateIt
51
57
  next unless collection = config[*path]
52
58
 
53
59
  collection.each do |name, c|
54
- klass.new(name, c).backup.run(c, :gpg, :gzip, :local, :s3, :cloudfiles, :sftp)
60
+ klass.new(name, c).backup.run(c, :gpg, :pigz, :gzip, :local, :s3, :cloudfiles, :sftp)
55
61
  end
56
62
  end
57
63
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webtranslateit-safe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edouard Briere
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-07-05 00:00:00.000000000 Z
12
+ date: 2023-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-s3
@@ -68,9 +68,9 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  description: |
71
- WebTranslateIt-Safe is a simple tool to backup databases (MySQL and PostgreSQL) and just files.
72
- Backups can be stored locally or remotely and can be enctypted.
73
- Remote storage is supported on Amazon S3, Rackspace Cloud Files, or just plain SFTP.
71
+ WebTranslateIt-Safe is a simple tool to backup databases (MySQL and PostgreSQL) and files.
72
+ Backups can be stored locally or remotely and can be encrypted.
73
+ Remote storage is supported on Amazon S3, Rackspace Cloud Files, or just plain SFTP/SCP.
74
74
  email:
75
75
  - support@webtranslateit.com
76
76
  executables:
@@ -93,6 +93,7 @@ files:
93
93
  - lib/web_translate_it/safe/mongodump.rb
94
94
  - lib/web_translate_it/safe/mysqldump.rb
95
95
  - lib/web_translate_it/safe/pgdump.rb
96
+ - lib/web_translate_it/safe/pigz.rb
96
97
  - lib/web_translate_it/safe/pipe.rb
97
98
  - lib/web_translate_it/safe/s3.rb
98
99
  - lib/web_translate_it/safe/sftp.rb