1ONEDRIVE(1)                      User Commands                     ONEDRIVE(1)
2
3
4

NAME

6       onedrive - folder synchronization with OneDrive
7

SYNOPSIS

9       onedrive [OPTION] --synchronize
10       onedrive [OPTION] --monitor
11       onedrive [OPTION] --display-config
12       onedrive [OPTION] --display-sync-status
13

DESCRIPTION

15       A complete tool to interact with OneDrive on Linux.
16

OPTIONS

18       Without any option given, no sync is done and the program exits.
19
20       --auth-files ARG
21              Perform authorization via two files passed in as ARG in the for‐
22              mat authUrl:responseUrl.  The authorization URL  is  written  to
23              the  authUrl, then onedrive waits for the file responseUrl to be
24              present, and reads the response from that file.
25
26       --auth-response ARG
27              Perform authentication not via interactive dialog but  via  pro‐
28              viding the reponse url directly.
29
30       --check-for-nomount
31              Check for the presence of .nosync in the syncdir root. If found,
32              do not perform sync.
33              Configuration file key: check_nomount (default: false)
34
35       --check-for-nosync
36              Check for the presence of .nosync in each directory.  If  found,
37              skip directory from sync.
38              Configuration file key: check_nosync (default: false)
39
40       --classify-as-big-delete
41              Number  of children in a path that is locally removed which will
42              be classified as a 'big data delete'
43              Configuration file key: classify_as_big_delete (default: 1000)
44
45       --confdir ARG
46              Set the directory used to store the configuration files
47
48       --create-directory ARG
49              Create a directory on OneDrive - no sync will be performed.
50
51       --create-share-link ARG
52              Create a shareable link for an existing file on OneDrive
53
54       --debug-https
55              Debug OneDrive HTTPS communication.
56              Configuration file key: debug_https (default: false)
57
58       --destination-directory ARG
59              Destination directory for renamed or move on OneDrive - no  sync
60              will be performed.
61
62       --disable-download-validation
63              Disable download validation when downloading from OneDrive
64              Configuration  file  key:  disable_download_validation (default:
65              false)
66
67       --disable-notifications
68              Do not use desktop notifications in monitor mode
69              Configuration file key: disable_notifications (default: false)
70
71       --disable-upload-validation
72              Disable upload validation when uploading to OneDrive
73              Configuration  file  key:  disable_upload_validation   (default:
74              false)
75
76       --display-config
77              Display what options the client will use as currently configured
78              - no sync will be performed.
79
80       --display-sync-status
81              Display the sync status of the client - no  sync  will  be  per‐
82              formed.
83
84       --download-only
85              Replicate the OneDrive online state locally, by only downloading
86              changes from OneDrive. Do not upload local changes to OneDrive.
87              Configuration file key: download_only (default: false)
88
89       --dry-run
90              Perform a trial sync with no changes made. Can ONLY be used with
91              --synchronize. Will be ignored for --monitor
92              Configuration file key: dry_run (default: false)
93
94       --enable-logging
95              Enable client activity to a separate log file
96              Configuration file key: enable_logging (default: false)
97
98       --force
99              Force the deletion of data when a 'big delete' is detected
100
101       --force-http-2
102              Force the use of HTTP/2 for all operations where applicable
103              Configuration file key: force_http_2 (default: false)
104
105       --force-sync
106              Force  a  synchronization  of a specific folder, only when using
107              --synchronize --single-directory and ignore
108              all non-default skip_dir and skip_file rules
109
110       --get-O365-drive-id ARG
111              Query and return the Office 365 Drive ID for a given Office  365
112              SharePoint Shared Library
113
114       --get-file-link ARG
115              Display the file link of a synced file
116
117       --list-shared-folders
118              List OneDrive Business Shared Folders
119
120       --local-first
121              Synchronize  from the local directory source first, before down‐
122              loading changes from OneDrive.
123              Configuration file key: local_first (default: false)
124
125       --logout
126              Logout the current user
127
128       --log-dir ARG
129              defines the directory where logging output is saved to, needs to
130              end with a slash
131              Configuration file key: log_dir (default: /var/log/onedrive/)
132
133       --min-notify-changes
134              the  minimum  number  of  pending  incoming changes necessary to
135              trigger a desktop notification
136              Configuration file key: min_notify_changes (default: 5)
137
138       -m --modified-by ARG
139              Display the last modified by details of a given path
140
141       -m --monitor
142              Keep monitoring for local and remote changes
143
144       --monitor-interval ARG
145              The number of seconds by which each sync operation is undertaken
146              when idle under monitor mode
147              Configuration file key: monitor_interval (default: 300)
148
149       --monitor-fullscan-frequency ARG
150              Number  of  sync runs before performing a full local scan of the
151              synced directory
152              Configuration file key: monitor_fullscan_frequency (default: 10)
153
154       --monitor-log-frequency ARG
155              Frequency of logging in monitor mode
156              Configuration file key: monitor_log_frequency (default: 5)
157
158       --no-remote-delete
159              Do not delete local file  'deletes'  from  OneDrive  when  using
160              --upload-only
161              Configuration file key: no_remote_delete (default: false)
162
163       --operation-timeout ARG
164              Set the maximum amount of time (seconds) a file operation is al‐
165              lowed to take. This includes DNS  resolution,  connecting,  data
166              transfer, etc.
167              Configuration file key: operation_timeout (default: 3600)
168
169       --print-token
170              Print the access token, useful for debugging
171
172       --reauth
173              Reauthenticate the client with OneDrive
174
175       --remove-directory ARG
176              Remove a directory on OneDrive - no sync will be performed.
177
178       --remove-source-files
179              Remove  source  file  after successful transfer to OneDrive when
180              using --upload-only
181              Configuration file key: remove_source_files (default: false)
182
183       --resync
184              Forget the last saved state, perform a full sync
185
186       --resync-auth
187              Approve the use of performing a --resync action without  needing
188              CLI authorization
189
190       --single-directory ARG
191              Specify  a  single  local  directory within the OneDrive root to
192              sync.
193
194       --skip-dir ARG
195              Skip any directories that match this pattern from syncing
196
197       --skip-dir-strict-match
198              When matching skip_dir directories, only match explicit matches
199              Configuration file key: skip_dir_strict_match (default: false)
200
201       --skip-dot-files
202              Skip dot files and folders from syncing
203              Configuration file key: skip_dotfiles (default: false)
204
205       --skip-file
206              Skip any files that match this pattern from syncing
207              Configuration file key: skip_file (default: ~*|.~*|*.tmp)
208
209       --skip-size ARG
210              Skip new files larger than this size (in MB)
211
212       --skip-symlinks
213              Skip syncing of symlinks
214              Configuration file key: skip_symlinks (default: false)
215
216       --source-directory ARG
217              Source directory to rename or move on OneDrive - no sync will be
218              performed.
219
220       --space-reservation ARG
221              The  amount  of disk space to reserve (in MB) to avoid 100% disk
222              space utilisation
223
224       --sync-root-files
225              Sync all files in sync_dir root when using sync_list.
226
227       --sync-shared-folders
228              Sync OneDrive Business Shared Folders
229              Configuration file key:  sync_business_shared_folders  (default:
230              false)
231
232       --syncdir ARG
233              Set the directory used to sync the files that are synced
234              Configuration file key: sync_dir (default: ~/OneDrive)
235
236       --synchronize
237              Perform a synchronization
238
239       --upload-only
240              Replicate  the locally configured sync_dir state to OneDrive, by
241              only uploading  local  changes  to  OneDrive.  Do  not  download
242              changes from OneDrive.
243              Configuration file key: upload_only (default: false)
244
245       --user-agent ARG
246              Set the used User Agent identifier
247              Configuration file key: user_agent (default: don't change)
248
249       -v --verbose
250              Print  more  details,  useful for debugging. Given two times (or
251              more) enables even more verbose debug statements.
252
253       --version
254              Print the version and exit
255
256       -h --help
257              This help information.
258

FEATURES

260       State caching
261
262       Real-Time file monitoring with Inotify
263
264       File upload / download validation to ensure data integrity
265
266       Resumable uploads
267
268       Support OneDrive for Business (part of Office 365)
269
270       Shared Folder support for OneDrive Personal and OneDrive  Business  ac‐
271       counts
272
273       SharePoint / Office365 Shared Libraries
274
275       Desktop notifications via libnotify
276
277       Dry-run capability to test configuration changes
278
279       Prevent  major  OneDrive  accidental  data deletion after configuration
280       change
281
282       Support for National cloud deployments (Microsoft Cloud for US  Govern‐
283       ment,  Microsoft  Cloud  Germany,  Azure  and  Office  365  operated by
284       21Vianet in China)
285
286
287

CONFIGURATION

289       You should copy the default config file into your home directory before
290       making changes:
291       mkdir -p ~/.config/onedrive
292       cp @DOCDIR@/config ~/.config/onedrive/config
293
294       For  the  supported  options see the above list of command line options
295       for the availability of a configuration key.
296
297       Pattern are case insensitive.  * and ? wildcards  characters  are  sup‐
298       ported.  Use | to separate multiple patterns.
299
300       After  changing the filters (skip_file or skip_dir in your configs) you
301       must execute onedrive --synchronize --resync.
302
303

FIRST RUN

305       After installing the application you must run it at least once from the
306       terminal to authorize it.
307
308       You  will be asked to open a specific link using your web browser where
309       you will have to login into your Microsoft Account and give the  appli‐
310       cation  the  permission  to access your files. After giving the permis‐
311       sion, you will be redirected to a blank page. Copy the URI of the blank
312       page into the application.
313
314
315

SYSTEMD INTEGRATION

317       Service files are installed into user and system directories.
318
319       OneDrive service running as root user
320              To enable this mode, run as root user
321              systemctl enable onedrive
322              systemctl start onedrive
323
324
325       OneDrive service running as root user for a non-root user
326              This  mode  allows  starting  the OneDrive service automatically
327              with system start for multiple users. For each <username> run:
328              systemctl enable onedrive@<username>
329              systemctl start onedrive@<username>
330
331
332       OneDrive service running as non-root user
333              In this mode the service will be started when the user logs  in.
334              Run as user
335              systemctl --user enable onedrive
336              systemctl --user start onedrive
337
338

LOGGING OUTPUT

340       When running onedrive all actions can be logged to a separate log file.
341       This can be enabled by using the --enable-logging  flag.   By  default,
342       log files will be written to /var/log/onedrive.
343
344       All  logfiles  will  be in the format of %username%.onedrive.log, where
345       %username% represents the user who ran the client.
346
347
348

NOTIFICATIONS

350       If OneDrive has been compiled with support for notifications, a running
351       onedrive  in  monitor mode will send notifications about initialization
352       and errors via libnotify to the dbus.
353
354       Note that this does not work if onedrive is started as root for a  user
355       via the onedrive@<username> service.
356
357

SEE ALSO

359       Further  examples  and documentation is available in README.md docs/US‐
360       AGE.md docs/advanced-usage.md docs/BusinessSharedFolders.md docs/Share‐
361       Point-Shared-Libraries.md docs/national-cloud-deployments.md
362
363
364
365v2.4.19                            June 2022                       ONEDRIVE(1)
Impressum