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

FEATURES

227       State caching
228
229       Real-Time file monitoring with Inotify
230
231       File upload / download validation to ensure data integrity
232
233       Resumable uploads
234
235       Support OneDrive for Business (part of Office 365)
236
237       Shared  Folder  support for OneDrive Personal and OneDrive Business ac‐
238       counts
239
240       SharePoint / Office365 Shared Libraries
241
242       Desktop notifications via libnotify
243
244       Dry-run capability to test configuration changes
245
246       Prevent major OneDrive accidental  data  deletion  after  configuration
247       change
248
249       Support  for National cloud deployments (Microsoft Cloud for US Govern‐
250       ment, Microsoft  Cloud  Germany,  Azure  and  Office  365  operated  by
251       21Vianet in China)
252
253
254

CONFIGURATION

256       You should copy the default config file into your home directory before
257       making changes:
258       mkdir -p ~/.config/onedrive
259       cp @DOCDIR@/config ~/.config/onedrive/config
260
261       For the supported options see the above list of  command  line  options
262       for the availability of a configuration key.
263
264       Pattern  are  case  insensitive.  * and ? wildcards characters are sup‐
265       ported.  Use | to separate multiple patterns.
266
267       After changing the filters (skip_file or skip_dir in your configs)  you
268       must execute onedrive --synchronize --resync.
269
270

FIRST RUN

272       After installing the application you must run it at least once from the
273       terminal to authorize it.
274
275       You will be asked to open a specific link using your web browser  where
276       you  will have to login into your Microsoft Account and give the appli‐
277       cation the permission to access your files. After  giving  the  permis‐
278       sion, you will be redirected to a blank page. Copy the URI of the blank
279       page into the application.
280
281
282

SYSTEMD INTEGRATION

284       Service files are installed into user and system directories.
285
286       OneDrive service running as root user
287              To enable this mode, run as root user
288              systemctl enable onedrive
289              systemctl start onedrive
290
291
292       OneDrive service running as root user for a non-root user
293              This mode allows starting  the  OneDrive  service  automatically
294              with system start for multiple users. For each <username> run:
295              systemctl enable onedrive@<username>
296              systemctl start onedrive@<username>
297
298
299       OneDrive service running as non-root user
300              In  this mode the service will be started when the user logs in.
301              Run as user
302              systemctl --user enable onedrive
303              systemctl --user start onedrive
304
305

LOGGING OUTPUT

307       When running onedrive all actions can be logged to a separate log file.
308       This  can  be  enabled by using the --enable-logging flag.  By default,
309       log files will be written to /var/log/onedrive.
310
311       All logfiles will be in the format  of  %username%.onedrive.log,  where
312       %username% represents the user who ran the client.
313
314
315

NOTIFICATIONS

317       If OneDrive has been compiled with support for notifications, a running
318       onedrive in monitor mode will send notifications  about  initialization
319       and errors via libnotify to the dbus.
320
321       Note  that this does not work if onedrive is started as root for a user
322       via the onedrive@<username> service.
323
324

SEE ALSO

326       Further examples and documentation is available in  README.md  docs/US‐
327       AGE.md docs/advanced-usage.md docs/BusinessSharedFolders.md docs/Share‐
328       Point-Shared-Libraries.md docs/national-cloud-deployments.md
329
330
331
332v2.4.13                            July 2021                       ONEDRIVE(1)
Impressum