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 +4 -4
- data/CHANGELOG +6 -0
- data/README.markdown +0 -1
- data/lib/web_translate_it/safe/pigz.rb +31 -0
- data/lib/web_translate_it/safe/sftp.rb +2 -2
- data/lib/web_translate_it/safe.rb +8 -2
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a8304cc611880266f79c56c9be3a4e5cea6275073c93889a4dfd599ad6cf851
|
4
|
+
data.tar.gz: 46a96b97260f9458625e433681562dd0997e4b7d79e19082dd52add75a9712f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 670a84fa71b7b52132670219d064e816bd68475c3a40bbc96fc9fcce9471ef073c8aea272800490c97517e1e8c01536f1db7c35badbe193169530fca32b01946
|
7
|
+
data.tar.gz: 75b72ba9cb7ef01b6e327187479e379db60feb60a0eceac7e96d34f9637206f01fed991c6e8f84f5ee0bfe376eb72d3165337be62dc14c417cde8fb8c92c4580
|
data/CHANGELOG
CHANGED
data/README.markdown
CHANGED
@@ -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
|
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.
|
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-
|
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
|
72
|
-
Backups can be stored locally or remotely and can be
|
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
|