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-1.1
93              Force the use of HTTP 1.1 for all operations (DEPRECIATED)
94              Configuration file key: force_http_11 (default: false)
95
96       --force-http-2
97              Force the use of HTTP/2 for all operations where applicable
98              Configuration file key: force_http_2 (default: false)
99
100       --get-O365-drive-id ARG
101              Query  and return the Office 365 Drive ID for a given Office 365
102              SharePoint Shared Library
103
104       --get-file-link ARG
105              Display the file link of a synced file
106
107       --list-shared-folders
108              List OneDrive Business Shared Folders
109
110       --local-first
111              Synchronize from the local directory source first, before  down‐
112              loading changes from OneDrive.
113              Configuration file key: local_first (default: false)
114
115       --logout
116              Logout the current user
117
118       --log-dir ARG
119              defines the directory where logging output is saved to, needs to
120              end with a slash
121              Configuration file key: log_dir (default: /var/log/onedrive/)
122
123       --min-notify-changes
124              the minimum number of  pending  incoming  changes  necessary  to
125              trigger a desktop notification
126              Configuration file key: min_notify_changes (default: 5)
127
128       -m --monitor
129              Keep monitoring for local and remote changes
130
131       --monitor-interval ARG
132              The number of seconds by which each sync operation is undertaken
133              when idle under monitor mode
134              Configuration file key: monitor_interval (default: 300)
135
136       --monitor-fullscan-frequency ARG
137              Number of sync runs before performing a full local scan  of  the
138              synced directory
139              Configuration file key: monitor_fullscan_frequency (default: 10)
140
141       --monitor-log-frequency ARG
142              Frequency of logging in monitor mode
143              Configuration file key: monitor_log_frequency (default: 5)
144
145       --no-remote-delete
146              Do  not  delete  local  file  'deletes' from OneDrive when using
147              --upload-only
148              Configuration file key: no_remote_delete (default: false)
149
150       --print-token
151              Print the access token, useful for debugging
152
153       --resync
154              Forget the last saved state, perform a full sync
155
156       --remove-directory ARG
157              Remove a directory on OneDrive - no sync will be performed.
158
159       --remove-source-files
160              Remove source file after successful transfer  to  OneDrive  when
161              using --upload-only
162              Configuration file key: remove_source_files (default: false)
163
164       --single-directory ARG
165              Specify  a  single  local  directory within the OneDrive root to
166              sync.
167
168       --skip-dir ARG
169              Skip any directories that match this pattern from syncing
170
171       --skip-dir-strict-match
172              When matching skip_dir directories, only match explicit matches
173              Configuration file key: skip_dir_strict_match (default: false)
174
175       --skip-dot-files
176              Skip dot files and folders from syncing
177              Configuration file key: skip_dotfiles (default: false)
178
179       --skip-file
180              Skip any files that match this pattern from syncing
181              Configuration file key: skip_file (default: ~*|.~*|*.tmp)
182
183       --skip-size ARG
184              Skip new files larger than this size (in MB)
185
186       --skip-symlinks
187              Skip syncing of symlinks
188              Configuration file key: skip_symlinks (default: false)
189
190       --source-directory ARG
191              Source directory to rename or move on OneDrive - no sync will be
192              performed.
193
194       --sync-root-files
195              Sync all files in sync_dir root when using sync_list.
196
197
198       --sync-shared-folders
199              Sync OneDrive Business Shared Folders
200              Configuration  file  key: sync_business_shared_folders (default:
201              false)
202
203       --syncdir ARG
204              Set the directory used to sync the files that are synced
205              Configuration file key: sync_dir (default: ~/OneDrive)
206
207       --synchronize
208              Perform a synchronization
209
210       --upload-only
211              Replicate the locally configured sync_dir state to OneDrive,  by
212              only  uploading  local  changes  to  OneDrive.  Do  not download
213              changes from OneDrive.
214              Configuration file key: upload_only (default: false)
215
216       --user-agent ARG
217              Set the used User Agent identifier
218              Configuration file key: user_agent (default: don't change)
219
220       -v --verbose
221              Print more details, useful for debugging. Given  two  times  (or
222              more) enables even more verbose debug statements.
223
224       --version
225              Print the version and exit
226
227       -h --help
228              This help information.
229

FEATURES

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

CONFIGURATION

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

FIRST RUN

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

SYSTEMD INTEGRATION

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

LOGGING OUTPUT

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

NOTIFICATIONS

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

SEE ALSO

330       Further  examples  and  documentation   is   available   in   README.md
331       docs/USAGE.md    docs/advanced-usage.md   docs/BusinessSharedFolders.md
332       docs/Office365.md docs/national-cloud-deployments.md
333
334
335
336v2.4.8                           November 2020                     ONEDRIVE(1)
Impressum