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

FEATURES

273       State caching
274
275       Real-Time file monitoring with Inotify
276
277       File upload / download validation to ensure data integrity
278
279       Resumable uploads
280
281       Support OneDrive for Business (part of Office 365)
282
283       Shared  Folder  support for OneDrive Personal and OneDrive Business ac‐
284       counts
285
286       SharePoint / Office365 Shared Libraries
287
288       Desktop notifications via libnotify
289
290       Dry-run capability to test configuration changes
291
292       Prevent major OneDrive accidental  data  deletion  after  configuration
293       change
294
295       Support  for National cloud deployments (Microsoft Cloud for US Govern‐
296       ment, Microsoft  Cloud  Germany,  Azure  and  Office  365  operated  by
297       21Vianet in China)
298
299
300

CONFIGURATION

302       You should copy the default config file into your home directory before
303       making changes:
304       mkdir -p ~/.config/onedrive
305       cp @DOCDIR@/config ~/.config/onedrive/config
306
307       For the supported options see the above list of  command  line  options
308       for the availability of a configuration key.
309
310       Pattern  are  case  insensitive.  * and ? wildcards characters are sup‐
311       ported.  Use | to separate multiple patterns.
312
313       After changing the filters (skip_file or skip_dir in your configs)  you
314       must execute onedrive --synchronize --resync.
315
316

FIRST RUN

318       After installing the application you must run it at least once from the
319       terminal to authorize it.
320
321       You will be asked to open a specific link using your web browser  where
322       you  will have to login into your Microsoft Account and give the appli‐
323       cation the permission to access your files. After  giving  the  permis‐
324       sion, you will be redirected to a blank page. Copy the URI of the blank
325       page into the application.
326
327
328

SYSTEMD INTEGRATION

330       Service files are installed into user and system directories.
331
332       OneDrive service running as root user
333              To enable this mode, run as root user
334              systemctl enable onedrive
335              systemctl start onedrive
336
337
338       OneDrive service running as root user for a non-root user
339              This mode allows starting  the  OneDrive  service  automatically
340              with system start for multiple users. For each <username> run:
341              systemctl enable onedrive@<username>
342              systemctl start onedrive@<username>
343
344
345       OneDrive service running as non-root user
346              In  this mode the service will be started when the user logs in.
347              Run as user
348              systemctl --user enable onedrive
349              systemctl --user start onedrive
350
351

LOGGING OUTPUT

353       When running onedrive all actions can be logged to a separate log file.
354       This  can  be  enabled by using the --enable-logging flag.  By default,
355       log files will be written to /var/log/onedrive.
356
357       All logfiles will be in the format  of  %username%.onedrive.log,  where
358       %username% represents the user who ran the client.
359
360
361

NOTIFICATIONS

363       If OneDrive has been compiled with support for notifications, a running
364       onedrive in monitor mode will send notifications  about  initialization
365       and errors via libnotify to the dbus.
366
367       Note  that this does not work if onedrive is started as root for a user
368       via the onedrive@<username> service.
369
370

SEE ALSO

372       Further examples and documentation is available in  README.md  docs/US‐
373       AGE.md docs/advanced-usage.md docs/BusinessSharedFolders.md docs/Share‐
374       Point-Shared-Libraries.md docs/national-cloud-deployments.md
375
376
377
378v2.4.25                            June 2023                       ONEDRIVE(1)
Impressum