Introduction:
Sometime, you have a huge data sets to transfer and you may not want to hold an active connection all the time. One solution is to use OneDrive especially if you or your organisation has subscribed to Office 365. You should have 1TB of online space.
Step 1: Install Dependencies
yum install libcurl-devel yum install sqlite-devel curl -fsS https://dlang.org/install.sh | bash -s dmd
Step 2: Git Clone the OneDrive Code
git clone https://github.com/abraunegg/onedrive.git cd onedrive make sudo make install
Step 3a: Authorize Microsoft to access your account
You need to authorize onedrive with Microsoft so it can access your account. First start by typing on the console
onedrive
Step 3b: You will be prompted to visit the URL to get permission
Step 4: Log in to your OneDrive account, and grant the app permission to access your account
Step 5: You will see a blank white page. Copy the URL and paste it into the Xterm
Step 6: Copy the URL and paste it into the Xterm “Enter the response uri”
Configuration
By default, all files are downloaded in ~/OneDrive and hidden files are skipped. If you want to change the defaults, you can copy and edit the included config file into your ~/.config/onedrive directory:
mkdir -p ~/.config/onedrive cp ./config ~/.config/onedrive/config nano ~/.config/onedrive/config
Available options:
- sync_dir: directory where the files will be synced
- skip_file: any files or directories that match this pattern will be skipped during sync.
For example,
If I want to sync everything except Confidential and Personal Folders
# Directory where the files will be synced sync_dir = "~/OneDrive/" # Skip files and directories that match this pattern skip_file = ".*|Confidential|Personal"
Note: after changing the sync list, you must perform a full synchronization by executing
onedrive --resync
One Drive Service
If you want to sync your files automatically, enable and start the systemd service:
systemctl --user enable onedrive
systemctl --user start onedrive
References:
The ‘skilion’ client was abandoned in 2018 and contains defects that put you at risk of data loss and data corruption if you use it. All new development & code is now done here: https://github.com/abraunegg/onedrive
LikeLike