-
-
Notifications
You must be signed in to change notification settings - Fork 864
/
onedrive.1.in
364 lines (291 loc) · 12.8 KB
/
onedrive.1.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
.TH ONEDRIVE "1" "@PACKAGE_DATE@" "@PACKAGE_VERSION@" "User Commands"
.SH NAME
onedrive \- A client for the Microsoft OneDrive Cloud Service
.SH SYNOPSIS
.B onedrive
[\fI\,OPTION\/\fR] --sync
.br
.B onedrive
[\fI\,OPTION\/\fR] --monitor
.br
.B onedrive
[\fI\,OPTION\/\fR] --display-config
.br
.B onedrive
[\fI\,OPTION\/\fR] --display-sync-status
.br
.B onedrive
[\fI\,OPTION\/\fR] -h | --help
.br
.B onedrive
--version
.SH DESCRIPTION
This is a free Microsoft OneDrive Client designed to work with OneDrive Personal, OneDrive for Business, Office365 OneDrive, and SharePoint Libraries. It's fully compatible with most major Linux distributions and FreeBSD, and can be containerised using Docker or Podman. The client offers secure one-way and two-way synchronisation capabilities, making it easy to connect to Microsoft OneDrive services across various platforms.
.SH FEATURES
.br
* Compatible with OneDrive Personal, OneDrive for Business including accessing Microsoft SharePoint Libraries
.br
* Provides rules for client-side filtering to select data for syncing with Microsoft OneDrive accounts
.br
* Caches sync state for efficiency
.br
* Supports a dry-run option for safe configuration testing
.br
* Validates file transfers to ensure data integrity
.br
* Monitors local files in real-time using inotify
.br
* Supports interrupted uploads for completion at a later time
.br
* Capability to sync remote updates immediately via webhooks
.br
* Enhanced synchronisation speed with multi-threaded file transfers
.br
* Manages traffic bandwidth use with rate limiting
.br
* Supports seamless access to shared folders and files across both OneDrive Personal and OneDrive for Business accounts
.br
* Supports national cloud deployments including Microsoft Cloud for US Government, Microsoft Cloud Germany, and Azure and Office 365 operated by VNET in China
.br
* Supports sending desktop alerts using libnotify
.br
* Protects against significant data loss on OneDrive after configuration changes
.br
* Works with both single and multi-tenant applications
.SH CONFIGURATION
By default, the client will use a sensible set of default values to interact with the Microsoft OneDrive service.
.TP
Should you wish to change these defaults, you should copy the default config file into your home directory before making any applicable changes:
.nf
\fB
mkdir\ \-p\ ~/.config/onedrive
cp\ @DOCDIR@/config\ ~/.config/onedrive/config
\fP
.fi
.TP
Please refer to the online documentation file application-config-options.md for details on all configuration file options.
.SH CLIENT SIDE FILTERING
Client Side Filtering in the context of the OneDrive Client for Linux refers to user-configured rules that determine what files and directories the client should upload or download from Microsoft OneDrive. These rules are crucial for optimising synchronisation, especially when dealing with large numbers of files or specific file types. The OneDrive Client for Linux offers several configuration options to facilitate this:
.TP
.B skip_dir
Specifies directories that should not be synchronised with OneDrive. Useful for omitting large or irrelevant directories from the sync process.
.TP
.B skip_dotfiles
Excludes dotfiles, usually configuration files or scripts, from the sync. Ideal for users who prefer to keep these files local.
.TP
.B skip_file
Allows specifying specific files to exclude from synchronisation. Offers flexibility in selecting essential files for cloud storage.
.TP
.B skip_symlinks
Prevents symlinks, which often point to files outside the OneDrive directory or to irrelevant locations, from being included in the sync.
.PP
Additionally, the OneDrive Client for Linux allows the implementation of Client Side Filtering rules through a 'sync_list' file. This file explicitly states which directories or files should be included in the synchronisation. By default, any item not listed in the 'sync_list' file is excluded. This approach offers granular control over synchronisation, ensuring that only necessary data is transferred to and from Microsoft OneDrive.
.PP
These configurable options and the 'sync_list' file provide users with the flexibility to tailor the synchronisation process to their specific needs, conserving bandwidth and storage space while ensuring that important files are always backed up and accessible.
.TP
.B NOTE:
After changing any Client Side Filtering rule, a full re-synchronisation must be performed using --resync
.SH FIRST RUN
Once you've installed the application, you'll need to authorise it using your Microsoft OneDrive Account. This can be done by simply running the application without any additional command switches.
.TP
Please be aware that some companies may require you to explicitly add this app to the Microsoft MyApps portal. To add an approved app to your apps, click on the ellipsis in the top-right corner and select "Request new apps." On the next page, you can add this app. If it's not listed, you should make a request through your IT department.
.TP
When you run the application for the first time, you'll be prompted to open a specific URL using your web browser, where you'll need to log in to your Microsoft Account and grant the application permission to access your files. After granting permission to the application, you'll be redirected to a blank page. Simply copy the URI from the blank page and paste it into the application.
.TP
This process authenticates your application with your account information, and it is now ready to use to sync your data between your local system and Microsoft OneDrive.
.SH GUI NOTIFICATIONS
If the client has been compiled with support for notifications, the client will send notifications about client activity via libnotify to the GUI via DBus when the client is being run in --monitor mode.
.SH APPLICATION LOGGING
When running onedrive all actions can be logged to a separate log file. This can be enabled by using the \fB--enable-logging\fP flag. By default, log files will be written to \fB/var/log/onedrive\fP. All logfiles will be in the format of \fB%username%.onedrive.log\fP, where \fB%username%\fP represents the user who ran the client.
.SH ALL CLI OPTIONS
The options below allow you to control the behavior of the onedrive client from the CLI. Without any specific option, if the client is already authenticated, the client will exit without any further action.
.TP
\fB\-\-sync\fR
Do a one-time synchronisation with OneDrive.
.TP
\fB\-\-monitor\fR
Monitor filesystem for changes and sync regularly.
.TP
\fB\-\-display-config\fR
Display the currently used configuration for the onedrive client.
.TP
\fB\-\-display-sync-status\fR
Query OneDrive service and report on pending changes.
.TP
\fB\-\-auth-files\fR \fIARG\fR
Perform authentication not via interactive dialog but via files that are read/written when using this option. The two files are passed in as \fBARG\fP in the format \fBauthUrl:responseUrl\fP.
The authorisation URL is written to the \fBauthUrl\fP file, then \fBonedrive\fP waits for the file \fBresponseUrl\fP to be present, and reads the response from that file.
.br
Always specify the full path when using this option, otherwise the application will default to using the default configuration path for these files (~/.config/onedrive/)
.TP
\fB\-\-auth-response\fR \fIARG\fR
Perform authentication not via interactive dialog but via providing the response URL directly.
.TP
\fB\-\-check-for-nomount\fR
Check for the presence of .nosync in the syncdir root. If found, do not perform sync.
.TP
\fB\-\-check-for-nosync\fR
Check for the presence of .nosync in each directory. If found, skip directory from sync.
.TP
\fB\-\-classify-as-big-delete\fR \fIARG\fR
Number of children in a path that is locally removed which will be classified as a 'big data delete'.
.TP
\fB\-\-cleanup-local-files\fR
Cleanup additional local files when using --download-only. This will remove local data.
.TP
\fB\-\-confdir\fR \fIARG\fR
Set the directory used to store the configuration files.
.TP
\fB\-\-create-directory\fR \fIARG\fR
Create a directory on OneDrive - no sync will be performed.
.TP
\fB\-\-create-share-link\fR \fIARG\fR
Create a shareable link for an existing file on OneDrive.
.TP
\fB\-\-debug-https\fR
Debug OneDrive HTTPS communication.
.TP
\fB\-\-destination-directory\fR \fIARG\fR
Destination directory for renamed or moved items on OneDrive - no sync will be performed.
.TP
\fB\-\-disable-download-validation\fR
Disable download validation when downloading from OneDrive.
.TP
\fB\-\-disable-notifications\fR
Do not use desktop notifications in monitor mode.
.TP
\fB\-\-disable-upload-validation\fR
Disable upload validation when uploading to OneDrive.
.TP
\fB\-\-display-quota\fR
Display the quota status of the client - no sync will be performed.
.TP
\fB\-\-display-running-config\fR
Display what options the client has been configured to use on application startup.
.TP
\fB\-\-download-only\fR
Replicate the OneDrive online state locally, by only downloading changes from OneDrive. Do not upload local changes to OneDrive.
.TP
\fB\-\-dry-run\fR
Perform a trial sync with no changes made.
.TP
\fB\-\-enable-logging\fR
Enable client activity to a separate log file.
.TP
\fB\-\-force\fR
Force the deletion of data when a 'big delete' is detected.
.TP
\fB\-\-force-http-11\fR
Force the use of HTTP 1.1 for all operations.
.TP
\fB\-\-force-sync\fR
Force a synchronisation of a specific folder, only when using --sync --single-directory and ignore all non-default skip_dir and skip_file rules.
.TP
\fB\-\-get-O365-drive-id\fR \fIARG\fR
Query and return the Office 365 Drive ID for a given Office 365 SharePoint Shared Library (DEPRECATED).
.TP
\fB\-\-get-file-link\fR \fIARG\fR
Display the file link of a synced file.
.TP
\fB\-\-get-sharepoint-drive-id\fR
Query and return the Office 365 Drive ID for a given Office 365 SharePoint Shared Library.
.TP
\fB\-\-help\fR, \fB\-h\fR
Display application help.
.TP
\fB\-\-list-shared-items\fR
List OneDrive Business Shared Items.
.TP
\fB\-\-local-first\fR
Synchronise from the local directory source first, before downloading changes from OneDrive.
.TP
\fB\-\-log-dir\fR \fIARG\fR
Directory where logging output is saved to, needs to end with a slash.
.TP
\fB\-\-logout\fR
Logout the current user.
.TP
\fB\-\-modified-by\fR \fIARG\fR
Display the last modified by details of a given path.
.TP
\fB\-\-monitor-interval\fR \fIARG\fR
Number of seconds by which each sync operation is undertaken when idle under monitor mode.
.TP
\fB\-\-monitor-log-frequency\fR \fIARG\fR
Frequency of logging in monitor mode.
.TP
\fB\-\-no-remote-delete\fR
Do not delete local file 'deletes' from OneDrive when using --upload-only.
.TP
\fB\-\-print-access-token\fR
Print the access token, useful for debugging.
.TP
\fB\-\-reauth\fR
Reauthenticate the client with OneDrive.
.TP
\fB\-\-remove-directory\fR \fIARG\fR
Remove a directory on OneDrive - no sync will be performed.
.TP
\fB\-\-remove-source-files\fR
Remove source file after successful transfer to OneDrive when using --upload-only.
.TP
\fB\-\-resync\fR
Forget the last saved state, perform a full sync.
.TP
\fB\-\-resync-auth\fR
Approve the use of performing a --resync action.
.TP
\fB\-\-single-directory\fR \fIARG\fR
Specify a single local directory within the OneDrive root to sync.
.TP
\fB\-\-skip-dir\fR \fIARG\fR
Skip any directories that match this pattern from syncing.
.TP
\fB\-\-skip-dir-strict-match\fR
When matching skip_dir directories, only match explicit matches.
.TP
\fB\-\-skip-dot-files\fR
Skip dot files and folders from syncing.
.TP
\fB\-\-skip-file\fR \fIARG\fR
Skip any files that match this pattern from syncing.
.TP
\fB\-\-skip-size\fR \fIARG\fR
Skip new files larger than this size (in MB).
.TP
\fB\-\-skip-symlinks\fR
Skip syncing of symlinks.
.TP
\fB\-\-source-directory\fR \fIARG\fR
Source directory to rename or move on OneDrive - no sync will be performed.
.TP
\fB\-\-space-reservation\fR \fIARG\fR
The amount of disk space to reserve (in MB) to avoid 100% disk space utilisation.
.TP
\fB\-\-sync-root-files\fR
Sync all files in sync_dir root when using sync_list.
.TP
\fB\-\-sync-shared-files\fR
Sync OneDrive Business Shared Files to the local filesystem.
.TP
\fB\-\-syncdir\fR \fIARG\fR
Specify the local directory used for synchronisation to OneDrive.
.TP
\fB\-\-synchronize\fR
Perform a synchronisation with Microsoft OneDrive (DEPRECATED).
.TP
\fB\-\-upload-only\fR
Replicate the locally configured sync_dir state to OneDrive, by only uploading local changes to OneDrive. Do not download changes from OneDrive.
.TP
\fB\-\-verbose\fR, \fB\-v+\fR
Print more details, useful for debugging (repeat for extra debugging).
.TP
\fB\-\-version\fR
Print the version and exit.
.TP
\fB\-\-with-editing-perms\fR
Create a read-write shareable link for an existing file on OneDrive when used with --create-share-link <file>.
.SH DOCUMENTATION
All documentation is available on GitHub: https://github.com/abraunegg/onedrive/tree/master/docs/
.SH SEE ALSO
.BR curl(1),