Wiki source code of Using rclone to copy files
Version 8.1 by Jan LOŠŤÁK on 2023/02/13 10:24
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
3.1 | 1 | In this example you will find how to copy large files or folders to or from your owncloud account. |
![]() |
2.1 | 2 | |
![]() |
8.1 | 3 | == {{id name="PřenossouborůpomocíRCLONE-Installrclone"/}}Install rclone == |
![]() |
2.1 | 4 | |
![]() |
8.1 | 5 | (% class="code" %) |
6 | ((( | ||
7 | (% class="language-sh" %){{code language="none"}}yum install -y rclone | ||
8 | {{/code}} | ||
9 | ))) | ||
10 | |||
11 | == {{id name="PřenossouborůpomocíRCLONE-CreateownCloudconfig"/}}Create ownCloud config == | ||
12 | |||
![]() |
3.1 | 13 | First we need open configuration wizard: |
14 | |||
![]() |
8.1 | 15 | (% class="code" %) |
16 | ((( | ||
17 | (% class="language-sh" %){{code language="none"}}rclone config | ||
18 | {{/code}} | ||
19 | ))) | ||
![]() |
3.1 | 20 | |
21 | Then in configuration wizard create new remote endpoint: | ||
22 | |||
![]() |
8.1 | 23 | (% class="code" %) |
24 | ((( | ||
25 | (% class="language-sh" %){{code language="none"}}No remotes found - make a new one | ||
![]() |
3.1 | 26 | n) New remote |
27 | s) Set configuration password | ||
28 | q) Quit config | ||
29 | n/s/q> n | ||
![]() |
8.1 | 30 | {{/code}} |
31 | ))) | ||
![]() |
3.1 | 32 | |
33 | Enter the name of your endpoint: | ||
34 | |||
![]() |
8.1 | 35 | (% class="code" %) |
36 | ((( | ||
37 | (% class="language-sh" %){{code language="none"}}name> myowncloud | ||
38 | {{/code}} | ||
39 | ))) | ||
![]() |
3.1 | 40 | |
41 | Choose type of storage: | ||
42 | |||
![]() |
8.1 | 43 | (% class="code" %) |
44 | ((( | ||
45 | (% class="language-sh" %){{code language="none"}}Type of storage to configure. | ||
![]() |
3.1 | 46 | Choose a number from below, or type in your own value |
47 | .. | ||
48 | 37 / Webdav | ||
49 | \ "webdav" | ||
50 | .. | ||
51 | Storage> webdav | ||
![]() |
8.1 | 52 | {{/code}} |
53 | ))) | ||
![]() |
3.1 | 54 | |
55 | Enter the URL of ownCloud server: | ||
56 | |||
![]() |
8.1 | 57 | (% class="code" %) |
58 | ((( | ||
59 | (% class="language-sh" %){{code language="none"}}** See help for webdav backend at: https://rclone.org/webdav/ ** | ||
![]() |
3.1 | 60 | |
61 | URL of http host to connect to | ||
62 | Enter a string value. Press Enter for the default (""). | ||
63 | Choose a number from below, or type in your own value | ||
64 | 1 / Connect to example.com | ||
65 | \ "https://example.com" | ||
![]() |
6.1 | 66 | url> https://privatecloud.imtm.cz/remote.php/dav/files/<YOUR_USERNAME>/ |
![]() |
8.1 | 67 | {{/code}} |
68 | ))) | ||
![]() |
3.1 | 69 | |
70 | Enter webdav service type: | ||
71 | |||
![]() |
8.1 | 72 | (% class="code" %) |
73 | ((( | ||
74 | (% class="language-sh" %){{code language="none"}}Name of the Webdav site/service/software you are using | ||
![]() |
3.1 | 75 | Enter a string value. Press Enter for the default (""). |
76 | Choose a number from below, or type in your own value | ||
77 | 1 / Nextcloud | ||
78 | \ "nextcloud" | ||
79 | 2 / Owncloud | ||
80 | \ "owncloud" | ||
81 | 3 / Sharepoint Online, authenticated by Microsoft account. | ||
82 | \ "sharepoint" | ||
83 | 4 / Sharepoint with NTLM authentication. Usually self-hosted or on-premises. | ||
84 | \ "sharepoint-ntlm" | ||
85 | 5 / Other site/service or software | ||
86 | \ "other" | ||
87 | vendor> owncloud | ||
![]() |
8.1 | 88 | {{/code}} |
89 | ))) | ||
![]() |
3.1 | 90 | |
91 | Enter your username: | ||
92 | |||
![]() |
8.1 | 93 | (% class="code" %) |
94 | ((( | ||
95 | (% class="language-sh" %){{code language="none"}}User name. In case NTLM authentication is used, the username should be in the format 'Domain\User'. | ||
![]() |
3.1 | 96 | Enter a string value. Press Enter for the default (""). |
97 | user> <YOUR_USERNAME> | ||
![]() |
8.1 | 98 | {{/code}} |
99 | ))) | ||
![]() |
3.1 | 100 | |
101 | Enter your password: | ||
102 | |||
![]() |
8.1 | 103 | (% class="code" %) |
104 | ((( | ||
105 | (% class="language-sh" %){{code language="none"}}Password. | ||
![]() |
3.1 | 106 | y) Yes type in my own password |
107 | g) Generate random password | ||
108 | n) No leave this optional password blank (default) | ||
109 | y/g/n> y | ||
110 | Enter the password: | ||
111 | password: | ||
112 | Confirm the password: | ||
113 | password: | ||
114 | Bearer token instead of user/pass (e.g. a Macaroon) | ||
115 | Enter a string value. Press Enter for the default (""). | ||
116 | bearer_token> | ||
117 | Edit advanced config? (y/n) | ||
118 | y) Yes | ||
119 | n) No (default) | ||
120 | y/n> n | ||
![]() |
8.1 | 121 | {{/code}} |
122 | ))) | ||
![]() |
3.1 | 123 | |
124 | Confirm config summary: | ||
125 | |||
![]() |
8.1 | 126 | (% class="code" %) |
127 | ((( | ||
128 | (% class="language-sh" %){{code language="none"}}Remote config | ||
![]() |
3.1 | 129 | -------------------- |
130 | [myowncloud] | ||
131 | type = webdav | ||
132 | url = https://privatecloud.imtm.cz/remote.php/dav/files/<YOUR_USERNAME>/ | ||
133 | vendor = owncloud | ||
134 | user = <YOUR_USERNAME> | ||
135 | pass = *** ENCRYPTED *** | ||
136 | -------------------- | ||
137 | y) Yes this is OK (default) | ||
138 | e) Edit this remote | ||
139 | d) Delete this remote | ||
140 | y/e/d> y | ||
![]() |
8.1 | 141 | {{/code}} |
142 | ))) | ||
![]() |
3.1 | 143 | |
144 | If everything is configured your rclone config mneu should look like this: | ||
145 | |||
![]() |
8.1 | 146 | (% class="code" %) |
147 | ((( | ||
148 | (% class="language-sh" %){{code language="none"}}Current remotes: | ||
![]() |
3.1 | 149 | |
150 | Name Type | ||
151 | ==== ==== | ||
152 | myowncloud webdav | ||
153 | |||
154 | e) Edit existing remote | ||
155 | n) New remote | ||
156 | d) Delete remote | ||
157 | r) Rename remote | ||
158 | c) Copy remote | ||
159 | s) Set configuration password | ||
160 | q) Quit config | ||
161 | e/n/d/r/c/s/q> q | ||
![]() |
8.1 | 162 | {{/code}} |
163 | ))) | ||
![]() |
3.1 | 164 | |
![]() |
8.1 | 165 | = {{id name="PřenossouborůpomocíRCLONE-Copyingfiles"/}}Copying files = |
![]() |
3.1 | 166 | |
![]() |
8.1 | 167 | == {{id name="PřenossouborůpomocíRCLONE-CopydirectorytoownCloud"/}}Copy directory to ownCloud == |
![]() |
3.1 | 168 | |
![]() |
8.1 | 169 | (% class="code" %) |
170 | ((( | ||
171 | (% class="language-sh" %){{code language="none"}}rclone copy --progress /backup myowncloud:/backup | ||
172 | {{/code}} | ||
173 | ))) | ||
![]() |
3.1 | 174 | |
![]() |
8.1 | 175 | == {{id name="PřenossouborůpomocíRCLONE-CopyfiletoownCloud"/}}Copy file to ownCloud == |
![]() |
3.1 | 176 | |
![]() |
8.1 | 177 | (% class="code" %) |
178 | ((( | ||
179 | (% class="language-sh" %){{code language="none"}}rclone copy --progress /myfile.tar myowncloud:/backup | ||
180 | {{/code}} | ||
181 | ))) | ||
182 | |||
183 | == {{id name="PřenossouborůpomocíRCLONE-CopydirectoryfromownCloud"/}}Copy directory from ownCloud == | ||
184 | |||
185 | (% class="code" %) | ||
186 | ((( | ||
187 | (% class="language-sh" %){{code language="none"}}rclone copy --progress myowncloud:/backup /backup | ||
188 | {{/code}} | ||
189 | ))) | ||
190 | |||
191 | == {{id name="PřenossouborůpomocíRCLONE-CopyfilefromownCloud"/}}Copy file from ownCloud == | ||
192 | |||
193 | (% class="code" %) | ||
194 | ((( | ||
195 | (% class="language-sh" %){{code language="none"}}rclone copy --progress myowncloud:/backup/myfile.tar /myfile.tar | ||
196 | {{/code}} | ||
197 | ))) |