Wiki source code of Transfer files using RCLONE

Last modified by Jan LOŠŤÁK on 2023/03/27 15:46

Show last authors
1 This guide demonstrates connecting to cloud storage using RCLONE.
2
3 Connecting to cloud storage with **RCLONE **is possible on **MAC, Linux and Windows**.
4
5 Detailed documentation for RCLONE [[here>>url:https://rclone.org/docs/||shape="rect"]].
6
7 == {{id name="TransferfilesusingRCLONE-InstallingRCLONE"/}}Installing RCLONE ==
8
9 ==== {{id name="TransferfilesusingRCLONE-LinuxCentOS/RHEL"/}}Linux CentOS/RHEL ====
10
11 (% class="code" %)
12 (((
13 (% class="language-sh" %){{code language="none"}}yum install -y rclone
14 {{/code}}
15 )))
16
17 ==== {{id name="TransferfilesusingRCLONE-LinuxUbuntu/Debian"/}}Linux Ubuntu/Debian ====
18
19 (% class="language-sh" %){{code language="none"}}apt install -y rclone{{/code}}
20
21 ==== {{id name="TransferfilesusingRCLONE-Windows"/}}Windows ====
22
23 [[https:~~/~~/rclone.org/install/#windows>>url:https://rclone.org/install/#windows||shape="rect"]]
24
25 == {{id name="TransferfilesusingRCLONE-Settingupaconnectiontocloudstorage"/}}Setting up a connection to cloud storage ==
26
27 (% class="tw-data-text tw-text-large tw-ta" %)
28 === {{id name="TransferfilesusingRCLONE-Firstweneedtoopentheconfigurationwizardwiththecommand:"/}}First we need to open the configuration wizard with the command: ===
29
30 (% class="code" %)
31 (((
32 rclone config
33 )))
34
35 === {{id name="TransferfilesusingRCLONE-Thenintheconfigurationwizard,createanewremoteendpoint:"/}}Then in the configuration wizard, create a new remote endpoint: ===
36
37 (% class="code" %)
38 (((
39 (% class="language-sh" %){{code language="none"}}No remotes found - make a new one
40 n) New remote
41 s) Set configuration password
42 q) Quit config
43 n/s/q> n
44 {{/code}}
45 )))
46
47 === {{id name="TransferfilesusingRCLONE-Enterthenameofyourendpoint:"/}}Enter the name of your endpoint: ===
48
49 (% class="code" %)
50 (((
51 (% class="language-sh" %){{code language="none"}}name> myowncloud
52 {{/code}}
53 )))
54
55 Choose type of storage:
56
57 (% class="code" %)
58 (((
59 (% class="language-sh" %){{code language="none"}}Type of storage to configure.
60 Choose a number from below, or type in your own value
61 ..
62 37 / Webdav
63 \ "webdav"
64 ..
65 Storage> webdav
66 {{/code}}
67 )))
68
69 (% class="tw-data-text tw-text-large tw-ta" %)
70 === {{id name="TransferfilesusingRCLONE-EntertheURLofthecloudstorageserver:"/}}Enter the URL of the cloud storage server: ===
71
72 (% class="code" %)
73 (((
74 (% class="language-sh" %){{code language="none"}}** See help for webdav backend at: https://rclone.org/webdav/ **
75
76 URL of http host to connect to
77 Enter a string value. Press Enter for the default ("").
78 Choose a number from below, or type in your own value
79 1 / Connect to example.com
80 \ "https://example.com"
81 url> https://privatecloud.imtm.cz/remote.php/dav/files/<YOUR_USERNAME>/
82 {{/code}}
83 )))
84
85 === {{id name="TransferfilesusingRCLONE-Enterthewebdavservicetype:"/}}Enter the webdav service type: ===
86
87 (% class="code" %)
88 (((
89 (% class="language-sh" %){{code language="none"}}Name of the Webdav site/service/software you are using
90 Enter a string value. Press Enter for the default ("").
91 Choose a number from below, or type in your own value
92 1 / Nextcloud
93 \ "nextcloud"
94 2 / Owncloud
95 \ "owncloud"
96 3 / Sharepoint Online, authenticated by Microsoft account.
97 \ "sharepoint"
98 4 / Sharepoint with NTLM authentication. Usually self-hosted or on-premises.
99 \ "sharepoint-ntlm"
100 5 / Other site/service or software
101 \ "other"
102 vendor> owncloud
103 {{/code}}
104 )))
105
106 === {{id name="TransferfilesusingRCLONE-Enteryourloginname:"/}}Enter your login name: ===
107
108 (% class="code" %)
109 (((
110 (% class="language-sh" %){{code language="none"}}User name. In case NTLM authentication is used, the username should be in the format 'Domain\User'.
111 Enter a string value. Press Enter for the default ("").
112 user> <YOUR_USERNAME>
113 {{/code}}
114 )))
115
116 === {{id name="TransferfilesusingRCLONE-Enteryourpassword:"/}}Enter your password: ===
117
118 (% class="code" %)
119 (((
120 (% class="language-sh" %){{code language="none"}}Password.
121 y) Yes type in my own password
122 g) Generate random password
123 n) No leave this optional password blank (default)
124 y/g/n> y
125 Enter the password:
126 password:
127 Confirm the password:
128 password:
129 Bearer token instead of user/pass (e.g. a Macaroon)
130 Enter a string value. Press Enter for the default ("").
131 bearer_token>
132 Edit advanced config? (y/n)
133 y) Yes
134 n) No (default)
135 y/n> n
136 {{/code}}
137 )))
138
139 === {{id name="TransferfilesusingRCLONE-Confirmtheconfigurationsummary:"/}}Confirm the configuration summary: ===
140
141 (% class="code" %)
142 (((
143 (% class="language-sh" %){{code language="none"}}Remote config
144 --------------------
145 [myowncloud]
146 type = webdav
147 url = https://privatecloud.imtm.cz/remote.php/dav/files/<YOUR_USERNAME>/
148 vendor = owncloud
149 user = <YOUR_USERNAME>
150 pass = *** ENCRYPTED ***
151 --------------------
152 y) Yes this is OK (default)
153 e) Edit this remote
154 d) Delete this remote
155 y/e/d> y
156 {{/code}}
157 )))
158
159 === {{id name="TransferfilesusingRCLONE-Witheverythingconfigured,yourrcloneconfigurationshouldlooklikethis:"/}}With everything configured, your rclone configuration should look like this: ===
160
161 (% class="code" %)
162 (((
163 (% class="language-sh" %){{code language="none"}}Current remotes:
164
165 Name Type
166 ==== ====
167 myowncloud webdav
168
169 e) Edit existing remote
170 n) New remote
171 d) Delete remote
172 r) Rename remote
173 c) Copy remote
174 s) Set configuration password
175 q) Quit config
176 e/n/d/r/c/s/q> q
177 {{/code}}
178 )))
179
180 == {{id name="TransferfilesusingRCLONE-Transferfilesandfolders"/}}Transfer files and folders ==
181
182 === {{id name="TransferfilesusingRCLONE-Copyingfolderstocloudstorage"/}}Copying folders to cloud storage ===
183
184 (% class="code" %)
185 (((
186 (% class="language-sh" %){{code language="none"}}rclone copy --progress /backup myowncloud:/backup
187 {{/code}}
188 )))
189
190 === {{id name="TransferfilesusingRCLONE-Copyingfoldersfromcloudstorage"/}}Copying folders from cloud storage ===
191
192 (% class="code" %)
193 (((
194 (% class="language-sh" %){{code language="none"}}rclone copy --progress myowncloud:/backup /backup{{/code}}
195 )))
196
197 === {{id name="TransferfilesusingRCLONE-Copyfilestocloudstorage"/}}Copy files to cloud storage ===
198
199 (% class="code" %)
200 (((
201 (% class="language-sh" %){{code language="none"}}rclone copy --progress /myfile.tar myowncloud:/backup
202 {{/code}}
203 )))
204
205 === {{id name="TransferfilesusingRCLONE-Copyfilesfromcloudstorage"/}}Copy files from cloud storage ===
206
207 (% class="language-sh" %)##rclone copy ~-~-progress [[myowncloud:/backup/myfile.tar>>url:http://myowncloud/backup/myfile.tar||shape="rect"]] myfile.tar##
208
209 == {{id name="TransferfilesusingRCLONE-Movingfilesandfolderswithincloudstorage"/}}Moving files and folders within cloud storage ==
210
211 === {{id name="TransferfilesusingRCLONE-Moveonefile"/}}Move one file ===
212
213 (% class="code" %)
214 (((
215 (% class="language-sh" %)##rclone moveto ~-~-progress [[myowncloud:>>url:http://myowncloud/backup/myfile.tar||shape="rect"]]/myfile.zip [[myowncloud:/newlocation/>>url:http://myowncloud/newlocation/folder/||shape="rect"]]myfile.zip##
216 )))
217
218 === {{id name="TransferfilesusingRCLONE-Moveafolder"/}}Move a folder ===
219
220 (% class="language-sh" %)##rclone move ~-~-progress [[myowncloud:>>url:http://myowncloud/backup/myfile.tar||shape="rect"]]/folder/ myowncloud:/newlocation/folder/##
221
222 == {{id name="TransferfilesusingRCLONE-Checksum"/}}Checksum ==
223
224 === {{id name="TransferfilesusingRCLONE-Filechecksum"/}}File checksum ===
225
226 (% class="code" %)
227 (((
228 (% class="language-sh" %){{code language="none"}}rclone copy --progress myowncloud:/backup/myfile.tar /myfile.tar
229 {{/code}}
230 )))
231
232 === {{id name="TransferfilesusingRCLONE-Checksumofthefilesinthefolder"/}}Checksum of the files in the folder ===
233
234 (% class="code" %)
235 (((
236 (% class="language-sh" %){{code language="none"}}rclone copy --progress myowncloud:/backup /backup
237 {{/code}}
238 )))
239
240 (% class="code" %)
241 (((
242 \\
243 )))
244
245 \\