Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ONEDRIVE(1)			 User Commands			   ONEDRIVE(1)

NAME
       onedrive	- A client for the Microsoft OneDrive Cloud Service

SYNOPSIS
       onedrive	[OPTION] --sync
       onedrive	[OPTION] --monitor
       onedrive	[OPTION] --display-config
       onedrive	[OPTION] --display-sync-status
       onedrive	[OPTION] -h | --help
       onedrive	--version

DESCRIPTION
       This is a free Microsoft	OneDrive Client	designed to work with OneDrive
       Personal, OneDrive for Business,	Office365 OneDrive, and	SharePoint Li-
       braries.	 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	 plat-
       forms.

FEATURES
       *  Compatible  with  OneDrive Personal, OneDrive	for Business including
       accessing Microsoft SharePoint Libraries
       * Provides rules	for client-side	filtering to select data  for  syncing
       with Microsoft OneDrive accounts
       * Caches	sync state for efficiency
       * Supports a dry-run option for safe configuration testing
       * Validates file	transfers to ensure data integrity
       * Monitors local	files in real-time using inotify
       * Supports interrupted uploads for completion at	a later	time
       * Capability to sync remote updates immediately via webhooks
       * Enhanced synchronisation speed	with multi-threaded file transfers
       * Manages traffic bandwidth use with rate limiting
       *  Supports  seamless  access  to  shared folders and files across both
       OneDrive	Personal and OneDrive for Business accounts
       * Supports national cloud deployments including Microsoft Cloud for  US
       Government,  Microsoft Cloud Germany, and Azure and Office 365 operated
       by VNET in China
       * Supports sending desktop alerts using libnotify
       * Protects against significant data loss	on OneDrive  after  configura-
       tion changes
       * Works with both single	and multi-tenant applications

CONFIGURATION
       By default, the client will use a sensible set of default values	to in-
       teract with the Microsoft OneDrive service.

       Should you wish to change these defaults, you should copy the default
       config file into	your home directory before making any applicable
       changes:

	      mkdir -p ~/.config/onedrive
	      cp @DOCDIR@/config ~/.config/onedrive/config

       Please refer to the online documentation	file application-config-op-
       tions.md	for details on all configuration file options.

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  directo-
       ries  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 fa-
       cilitate	this:

       skip_dir
	      Specifies	directories  that  should  not	be  synchronised  with
	      OneDrive.	 Useful	 for  omitting large or	irrelevant directories
	      from the sync process.

       skip_dotfiles
	      Excludes dotfiles, usually configuration files or	scripts,  from
	      the sync.	Ideal for users	who prefer to keep these files local.

       skip_file
	      Allows  specifying  specific  files to exclude from synchronisa-
	      tion. Offers flexibility in selecting essential files for	 cloud
	      storage.

       skip_symlinks
	      Prevents	symlinks,  which  often	 point	to  files  outside the
	      OneDrive directory or to irrelevant locations,  from  being  in-
	      cluded in	the sync.

       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 synchroni-
       sation,	ensuring  that	only necessary data is transferred to and from
       Microsoft OneDrive.

       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 im-
       portant files are always	backed up and accessible.

       NOTE:  After changing any Client	Side Filtering rule,  a	 full  re-syn-
	      chronisation must	be performed using --resync

FIRST RUN
       Once  you've installed the application, you'll need to authorise	it us-
       ing your	Microsoft OneDrive Account. This can be	done by	simply running
       the application without any additional command switches.

       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.

       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 ac-
       cess 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.

       This process authenticates your application with	your account informa-
       tion, and it is now ready to use	to sync	your data between your local
       system and Microsoft OneDrive.

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.

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

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 al-
       ready authenticated, the	client will exit without any further action.

       --sync Do a one-time synchronisation with OneDrive.

       --monitor
	      Monitor filesystem for changes and sync regularly.

       --display-config
	      Display  the  currently  used  configuration  for	 the  onedrive
	      client.

       --display-sync-status
	      Query OneDrive service and report	on pending changes.

       --auth-files ARG
	      Perform  authentication not via interactive dialog but via files
	      that are read/written when using this option. The	two files  are
	      passed  in as ARG	in the format authUrl:responseUrl.  The	autho-
	      risation URL is written to the authUrl file, then	onedrive waits
	      for the file responseUrl to be present, and reads	 the  response
	      from that	file.
	      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/)

       --auth-response ARG
	      Perform  authentication  not via interactive dialog but via pro-
	      viding the response URL directly.

       --check-for-nomount
	      Check for	the presence of	.nosync	in the syncdir root. If	found,
	      do not perform sync.

       --check-for-nosync
	      Check for	the presence of	.nosync	in each	directory.  If	found,
	      skip directory from sync.

       --classify-as-big-delete	ARG
	      Number  of children in a path that is locally removed which will
	      be classified as a 'big data delete'.

       --cleanup-local-files
	      Cleanup additional local files when using	--download-only.  This
	      will remove local	data.

       --confdir ARG
	      Set the directory	used to	store the configuration	files.

       --create-directory ARG
	      Create a directory on OneDrive - no sync will be performed.

       --create-share-link ARG
	      Create a shareable link for an existing file on OneDrive.

       --debug-https
	      Debug OneDrive HTTPS communication.

       --destination-directory ARG
	      Destination  directory  for renamed or moved items on OneDrive -
	      no sync will be performed.

       --disable-download-validation
	      Disable download validation when downloading from	OneDrive.

       --disable-notifications
	      Do not use desktop notifications in monitor mode.

       --disable-upload-validation
	      Disable upload validation	when uploading to OneDrive.

       --display-quota
	      Display the quota	status of the client - no sync	will  be  per-
	      formed.

       --display-running-config
	      Display  what  options  the client has been configured to	use on
	      application startup.

       --download-only
	      Replicate	the OneDrive online state locally, by only downloading
	      changes from OneDrive. Do	not upload local changes to OneDrive.

       --dry-run
	      Perform a	trial sync with	no changes made.

       --enable-logging
	      Enable client activity to	a separate log file.

       --force
	      Force the	deletion of data when a	'big delete' is	detected.

       --force-http-11
	      Force the	use of HTTP 1.1	for all	operations.

       --force-sync
	      Force a synchronisation of a specific folder,  only  when	 using
	      --sync  --single-directory  and  ignore all non-default skip_dir
	      and skip_file rules.

       --get-O365-drive-id ARG
	      Query and	return the Office 365 Drive ID for a given Office  365
	      SharePoint Shared	Library	(DEPRECATED).

       --get-file-link ARG
	      Display the file link of a synced	file.

       --get-sharepoint-drive-id
	      Query  and return	the Office 365 Drive ID	for a given Office 365
	      SharePoint Shared	Library.

       --help, -h
	      Display application help.

       --list-shared-items
	      List OneDrive Business Shared Items.

       --local-first
	      Synchronise from the local directory source first, before	 down-
	      loading changes from OneDrive.

       --log-dir ARG
	      Directory	 where logging output is saved to, needs to end	with a
	      slash.

       --logout
	      Logout the current user.

       --modified-by ARG
	      Display the last modified	by details of a	given path.

       --monitor-interval ARG
	      Number of	seconds	by which each  sync  operation	is  undertaken
	      when idle	under monitor mode.

       --monitor-log-frequency ARG
	      Frequency	of logging in monitor mode.

       --no-remote-delete
	      Do  not  delete  local  file  'deletes' from OneDrive when using
	      --upload-only.

       --print-access-token
	      Print the	access token, useful for debugging.

       --reauth
	      Reauthenticate the client	with OneDrive.

       --remove-directory ARG
	      Remove a directory on OneDrive - no sync will be performed.

       --remove-source-files
	      Remove source file after successful transfer  to	OneDrive  when
	      using --upload-only.

       --resync
	      Forget the last saved state, perform a full sync.

       --resync-auth
	      Approve the use of performing a --resync action.

       --single-directory ARG
	      Specify  a  single  local	 directory within the OneDrive root to
	      sync.

       --skip-dir ARG
	      Skip any directories that	match this pattern from	syncing.

       --skip-dir-strict-match
	      When matching skip_dir directories, only match explicit matches.

       --skip-dot-files
	      Skip dot files and folders from syncing.

       --skip-file ARG
	      Skip any files that match	this pattern from syncing.

       --skip-size ARG
	      Skip new files larger than this size (in MB).

       --skip-symlinks
	      Skip syncing of symlinks.

       --source-directory ARG
	      Source directory to rename or move on OneDrive - no sync will be
	      performed.

       --space-reservation ARG
	      The amount of disk space to reserve (in MB) to avoid  100%  disk
	      space utilisation.

       --sync-root-files
	      Sync all files in	sync_dir root when using sync_list.

       --sync-shared-files
	      Sync OneDrive Business Shared Files to the local filesystem.

       --syncdir ARG
	      Specify	the   local  directory	used  for  synchronisation  to
	      OneDrive.

       --synchronize
	      Perform a	synchronisation	with Microsoft OneDrive	(DEPRECATED).

       --upload-only
	      Replicate	the locally configured sync_dir	state to OneDrive,  by
	      only  uploading  local  changes  to  OneDrive.  Do  not download
	      changes from OneDrive.

       --verbose, -v+
	      Print more details, useful for debugging (repeat for  extra  de-
	      bugging).

       --version
	      Print the	version	and exit.

       --with-editing-perms
	      Create  a	 read-write  shareable	link  for  an existing file on
	      OneDrive when used with --create-share-link <file>.

DOCUMENTATION
       All	 documentation	     is	      available	      on       GitHub:
       https://github.com/abraunegg/onedrive/tree/master/docs/

SEE ALSO
       curl(1),

v2.5.4				  April	2025			   ONEDRIVE(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=onedrive&sektion=1&manpath=FreeBSD+Ports+14.3.quarterly>

home | help