Note: Present if you add a shared folder to "Add shortcut to my files", then this client may not work.
So, access the shared files only from shared with me section of portal instead of adding shortcut.
On ubuntu 20, install using below commands:
sudo apt install -y build-essential libcurl4-openssl-dev libsqlite3-dev pkg-config git curl libnotify-dev
wget https://github.com/ldc-developers/ldc/releases/download/v1.27.0-beta2/ldc2-1.27.0-beta2-linux-x86_64.tar.xz
tar -xvf ldc2-1.27.0-beta2-linux-x86_64.tar.xz
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
./configure DC=~/ldc2-1.27.0-beta2-linux-x86_64/bin/ldmd2
make clean; make
sudo make install
last command will create shortcut for ~/onedrive/onedrive to bin folder so you can access the executable directly.
you can install ldc using below command also:
curl -fsS https://dlang.org/install.sh | bash -s ldc
To list the available shared folders:
onedrive --list-shared-folders
From the above, copy the shared folder name to the custom configuration file.
cat ~/.config/onedrive/business_shared_folders
Shared_folder_1
And you can filter only particular folders to download using sync_list file:
cat ~/.config/onedrive/business_shared_folders
Shared_folder_1/Sub_folder_2
onedrive --synchronize --sync-shared-folders --upload-only --no-remote-delete --single-directory 'Jenkins' --verbose --resync
Remove --resync if it is fresh install.Add it only when there is change in the existing configuration.
--upload-only is for only upload.
But it has some issues when I checked last time, you can check with latest versions.
Complete sync:
onedrive --synchronize --sync-shared-folders --single-directory 'Jenkins' --verbose
The command I used for my job:
onedrive --synchronize --verbose --verbose --sync-shared-folders --single-directory 'Jenkins' --confdir '~/.config/onedrive-business'
More details:
https://github.com/abraunegg/onedrive/issues/1533
https://github.com/abraunegg/onedrive/blob/master/docs/BusinessSharedFolders.md
https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#performing-a-one-way-upload-sync
https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#selective-sync-via-sync_list-file
https://github.com/abraunegg/onedrive/issues/1548
https://github.com/abraunegg/onedrive/discussions/1549
https://github.com/abraunegg/onedrive/issues/1546
https://github.com/abraunegg/onedrive/issues/1541
when token get's expired, follow below steps.
ReplyDeletehttps://github.com/abraunegg/onedrive/discussions/1619