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