backup-remote 0.0.15 → 0.0.16
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.
- checksums.yaml +4 -4
- data/lib/backup/remote/command.rb +17 -7
- data/lib/backup/remote_archive.rb +1 -1
- data/lib/backup/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6162739675f6b4821155caf28c60e1fec69f9cec
|
4
|
+
data.tar.gz: 7025b3537b82c39ee76745a901a17cb20ae4efb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e0f6c25f973fecf29c4bc5809a3cab8512bce0dcc51f37f5f0e3a673b17e3dba4478532e1e36f224f8008737e624f74741393ea47823ef7fd550199556fd74e
|
7
|
+
data.tar.gz: bed9ee7905040dfdc5fc0f3cbf98a78225f64ac8824033a2d1935d1796f15e02f870f5a69c334becf42ca14a45e58dd9f85604819baa9ffd0dd51b045254823a
|
@@ -127,21 +127,31 @@ module Backup
|
|
127
127
|
f_temp = "/tmp/#{SecureRandom.uuid}"
|
128
128
|
|
129
129
|
# sshkit
|
130
|
-
|
131
|
-
|
130
|
+
SSHKit::Coordinator.new(host).each in: :sequence do
|
131
|
+
# upload to temp file
|
132
|
+
upload! source_file, f_temp
|
132
133
|
|
133
|
-
|
134
|
+
# upload to dest
|
135
|
+
execute("cp #{f_temp} #{dest_file}", interaction_handler: handler)
|
134
136
|
|
137
|
+
end
|
138
|
+
|
139
|
+
=begin
|
140
|
+
on host do |host|
|
135
141
|
# NOT WORK with sudo
|
136
142
|
#upload! source_file, dest_file
|
137
143
|
|
138
|
-
# upload to temp file
|
139
|
-
upload! source_file, f_temp
|
140
144
|
|
141
|
-
|
142
|
-
|
145
|
+
as(user: ssh_user) do
|
146
|
+
# upload to temp file
|
147
|
+
upload! source_file, f_temp
|
148
|
+
|
149
|
+
# upload to dest
|
150
|
+
execute("cp #{f_temp} #{dest_file}", interaction_handler: handler)
|
143
151
|
|
152
|
+
end
|
144
153
|
end
|
154
|
+
=end
|
145
155
|
|
146
156
|
#
|
147
157
|
return {res: 1, output: ""}
|
@@ -105,7 +105,7 @@ module Backup
|
|
105
105
|
res_upload = remote.ssh_upload_file(server_host, server_ssh_user, server_ssh_password, files_from, files_from)
|
106
106
|
|
107
107
|
if res_upload[:res]==0
|
108
|
-
raise
|
108
|
+
raise "Cannot upload file to server - #{files_from}"
|
109
109
|
end
|
110
110
|
|
111
111
|
#
|
data/lib/backup/version.rb
CHANGED