Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to use markdown alerts #2676

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a0e69a9
Update usage.md
abraunegg Mar 22, 2024
69757cd
Update usage.md
abraunegg Mar 22, 2024
3a139a2
Update usage.md
abraunegg Mar 22, 2024
f36ff44
Update usage.md
abraunegg Mar 22, 2024
77863df
Update usage.md
abraunegg Mar 22, 2024
c1c86e9
Update usage.md
abraunegg Mar 22, 2024
040b041
Update usage.md
abraunegg Mar 22, 2024
fea0291
Update usage.md
abraunegg Mar 22, 2024
191379b
Update usage.md
abraunegg Mar 22, 2024
0df4a8c
Update usage.md
abraunegg Mar 22, 2024
9585f07
Update advanced-usage.md
abraunegg Mar 22, 2024
1d9caf2
Update advanced-usage.md
abraunegg Mar 22, 2024
6a9356a
Update application-security.md
abraunegg Mar 22, 2024
99c8050
Update business-shared-items.md
abraunegg Mar 22, 2024
2ad8b57
Update client-architecture.md
abraunegg Mar 22, 2024
0e82af6
Update docker.md
abraunegg Mar 22, 2024
fab4568
Update docker.md
abraunegg Mar 22, 2024
e4a3621
Update install.md
abraunegg Mar 22, 2024
780d907
Update install.md
abraunegg Mar 22, 2024
5548dcd
Update install.md
abraunegg Mar 22, 2024
ad5d7ee
Update install.md
abraunegg Mar 22, 2024
35272de
Update national-cloud-deployments.md
abraunegg Mar 22, 2024
df6da98
Update podman.md
abraunegg Mar 23, 2024
5d4c8e3
Update sharepoint-libraries.md
abraunegg Mar 23, 2024
22d771f
Update sharepoint-libraries.md
abraunegg Mar 23, 2024
9702c3e
Update ubuntu-package-install.md
abraunegg Mar 23, 2024
08a5938
Update ubuntu-package-install.md
abraunegg Mar 23, 2024
0864f65
Update ubuntu-package-install.md
abraunegg Mar 23, 2024
14130de
Update advanced-usage.md
abraunegg Mar 23, 2024
6133ecf
Update application-config-options.md
abraunegg Mar 23, 2024
306fd9f
Update docs
abraunegg Mar 24, 2024
d443018
Update usage.md
abraunegg Mar 24, 2024
a271322
Update usage.md
abraunegg Mar 24, 2024
a9b7a80
Update usage.md
abraunegg Mar 24, 2024
7fba988
Update usage.md
abraunegg Mar 24, 2024
21a94af
Update application-config-options.md
abraunegg Mar 24, 2024
b172830
Update application-config-options.md
abraunegg Mar 24, 2024
096bde3
Update application-config-options.md
abraunegg Mar 24, 2024
3054cd6
Update application-config-options.md
abraunegg Mar 24, 2024
c6adfaa
Update application-config-options.md
abraunegg Mar 24, 2024
5f4b829
Update application-config-options.md
abraunegg Mar 24, 2024
9684fc3
Update application-config-options.md
abraunegg Mar 24, 2024
bd38326
Update application-config-options.md
abraunegg Mar 24, 2024
0cae126
Update application-config-options.md
abraunegg Mar 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions docs/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ Example:
ExecStart=/usr/local/bin/onedrive --monitor --confdir="/home/myusername/.config/my-new-config"
```

**Note:** When running the client manually, `--confdir="~/.config/......` is acceptable. In a systemd configuration file, the full path must be used. The `~` must be expanded.
> [!IMPORTANT]
> When running the client manually, `--confdir="~/.config/......` is acceptable. In a systemd configuration file, the full path must be used. The `~` must be manually expanded when editing your systemd file.


### Step 3: Enable the new systemd service
Once the file is correctly editied, you can enable the new systemd service using the following commands.
Expand Down Expand Up @@ -227,10 +229,10 @@ docker run -it --name onedrive -v onedrive_conf_sharepoint_site3:/onedrive/conf
docker run -it --name onedrive -v onedrive_conf_sharepoint_site50:/onedrive/conf -v "/use/full/local/path/no/tilda/SharePointSite50:/onedrive/data" driveone/onedrive:latest
```

#### TIP
To avoid 're-authenticating' and 'authorising' each individual Docker container, if all the Docker containers are using the 'same' OneDrive credentials, you can re-use the 'refresh_token' from one Docker container to another by copying this file to the configuration Docker volume of each Docker container.

If the account credentials are different .. you will need to re-authenticate each Docker container individually.
> [!TIP]
> To avoid 're-authenticating' and 'authorising' each individual Docker container, if all the Docker containers are using the 'same' OneDrive credentials, you can re-use the 'refresh_token' from one Docker container to another by copying this file to the configuration Docker volume of each Docker container.
>
> If the account credentials are different .. you will need to re-authenticate each Docker container individually.

## Configuring the client for use in dual-boot (Windows / Linux) situations
When dual booting Windows and Linux, depending on the Windows OneDrive account configuration, the 'Files On-Demand' option may be enabled when running OneDrive within your Windows environment.
Expand Down Expand Up @@ -262,7 +264,8 @@ There are a few options here which you can configure in your 'config' file to as
2. check_nomount
3. check_nosync

**Note:** Before making any change to your configuration, stop any sync process & stop any onedrive systemd service from running.
> [!NOTE]
> Before making any change to your configuration, stop any sync process & stop any onedrive systemd service from running.

### classify_as_big_delete
By default, this uses a value of 1000 files|folders. An undesirable unmount if you have more than 1000 files, this default level will prevent the client from executing the online delete. Modify this value up or down as desired
Expand Down
314 changes: 184 additions & 130 deletions docs/application-config-options.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions docs/application-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ read_only_auth_scope = "true"
```
This will change the user authentication scope request to use read-only access.

**Note:** When changing this value, you *must* re-authenticate the client using the `--reauth` option to utilise the change in authentication scopes.
> [!IMPORTANT]
> When changing this value, you *must* re-authenticate the client using the `--reauth` option to utilise the change in authentication scopes.

When using read-only authentication scopes, the uploading of any data or local change to OneDrive will fail with the following error:
```
Expand All @@ -100,7 +101,8 @@ As such, it is also advisable for you to add the following to your configuration
download_only = "true"
```

**Important:** Additionally when using 'read_only_auth_scope' you also will need to remove your existing application access consent otherwise old authentication consent will be valid and will be used. This will mean the application will technically have the consent to upload data. See below on how to remove your prior application consent.
> [!IMPORTANT]
> Additionally when using 'read_only_auth_scope' you also will need to remove your existing application access consent otherwise old authentication consent will be valid and will be used. This will mean the application will technically have the consent to upload data. See below on how to remove your prior application consent.

## Reviewing your existing application access consent

Expand Down
26 changes: 13 additions & 13 deletions docs/business-shared-items.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# How to sync OneDrive Business Shared Items
## Application Version
Before reading this document, please ensure you are running application version [![Version](https://img.shields.io/github/v/release/abraunegg/onedrive)](https://github.com/abraunegg/onedrive/releases) or greater. Use `onedrive --version` to determine what application version you are using and upgrade your client if required.

## Important Note
This feature has been 100% re-written from v2.5.0 onwards. A pre-requesite before using this capability in v2.5.0 and above is for you to revert any Shared Business Folder configuration you may be currently using, including, but not limited to:
* Removing `sync_business_shared_folders = "true|false"` from your 'config' file
* Removing the 'business_shared_folders' file
* Removing any local data | shared folder data from your configured 'sync_dir' to ensure that there are no conflicts or issues.
* Removing any configuration online that might be related to using this feature prior to v2.5.0
> [!CAUTION]
> Before reading this document, please ensure you are running application version [![Version](https://img.shields.io/github/v/release/abraunegg/onedrive)](https://github.com/abraunegg/onedrive/releases) or greater. Use `onedrive --version` to determine what application version you are using and upgrade your client if required.

> [!CAUTION]
> This feature has been 100% re-written from v2.5.0 onwards and is not backwards compatible with v2.4.x client versions. If enabling this feature, you must upgrade to v2.5.0 or above on all systems that are running this client.
>
> An additional pre-requesite before using this capability in v2.5.0 and above is for you to revert any v2.4.x Shared Business Folder configuration you may be currently using, including, but not limited to:
> * Removing `sync_business_shared_folders = "true|false"` from your 'config' file
> * Removing the 'business_shared_folders' file
> * Removing any local data | shared folder data from your configured 'sync_dir' to ensure that there are no conflicts or issues.
> * Removing any configuration online that might be related to using this feature prior to v2.5.0

## Process Overview
Syncing OneDrive Business Shared Folders requires additional configuration for your 'onedrive' client:
Expand All @@ -17,10 +20,6 @@ Syncing OneDrive Business Shared Folders requires additional configuration for y
4. Test the configuration using '--dry-run'
5. Remove the use of '--dry-run' and sync the OneDrive Business Shared folders as required


**NOTE:** This documentation will be updated as this feature progresses.


### Enable syncing of OneDrive Business Shared Items via config file
```text
sync_business_shared_items = "true"
Expand Down Expand Up @@ -132,7 +131,8 @@ Any shared file link you add can utilise any 'client side filtering' rules that

### Syncing OneDrive Business Shared Files using Option 2

**NOTE:** When using option 2, all files that have been shared with you will be downloaded by default. To reduce this, first use `--list-shared-items` to list all shared items with your account, then use 'client side filtering' rules such as 'sync_list' configuration to selectivly sync all the files to your local system.
> [!IMPORTANT]
> When using option 2, all files that have been shared with you will be downloaded by default. To reduce this, first use `--list-shared-items` to list all shared items with your account, then use 'client side filtering' rules such as 'sync_list' configuration to selectivly sync all the files to your local system.

1. Review all items that have been shared with you by using `onedrive --list-shared-items`. This should display output similar to the following:
```
Expand Down
6 changes: 4 additions & 2 deletions docs/client-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Depending on your operational environment, it is possible to 'tweak' the followi
* Control what IP protocol version should be used when communicating with OneDrive (Config Option: `ip_protocol_version`)
* Control what User Agent is presented to Microsoft services (Config Option: `user_agent`)

**Note:** The default 'user_agent' value conforms to specific Microsoft requirements to identify as an ISV that complies with OneDrive traffic decoration requirements. Changing this value potentially will impact how Microsoft see's your client, thus your traffic may get throttled. For further information please read: https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online
> [!IMPORTANT]
> The default 'user_agent' value conforms to specific Microsoft requirements to identify as an ISV that complies with OneDrive traffic decoration requirements. Changing this value potentially will impact how Microsoft see's your client, thus your traffic may get throttled. For further information please read: https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online

Diving a little deeper into how the client operates, the diagram below outlines at a high level the operational workflow of the OneDrive Client for Linux, demonstrating how it interacts with the OneDrive API to maintain synchronisation, manage local and cloud data integrity, and ensure that user data is accurately mirrored between the local filesystem and OneDrive cloud storage.

Expand Down Expand Up @@ -46,7 +47,8 @@ By default, both modes consider all data stored online within Microsoft OneDrive

However, in standalone mode (`--sync`), you can *change* what reference the client will use as the 'source-of-truth' for your data by using the `--local-first` option so that the application will look at your local files *first* and consider your local files as your 'source-of-truth' to replicate that directory structure to Microsoft OneDrive.

**Critical Advisory:** Please be aware that if you designate a network mount point (such as NFS, Windows Network Share, or Samba Network Share) as your `sync_dir`, this setup inherently lacks 'inotify' support. Support for 'inotify' is essential for real-time tracking of file changes, which means that the client's 'Monitor Mode' cannot immediately detect changes in files located on these network shares. Instead, synchronisation between your local filesystem and Microsoft OneDrive will occur at intervals specified by the `monitor_interval` setting. This limitation regarding 'inotify' support on network mount points like NFS or Samba is beyond the control of this client.
> [!IMPORTANT]
> Please be aware that if you designate a network mount point (such as NFS, Windows Network Share, or Samba Network Share) as your `sync_dir`, this setup inherently lacks 'inotify' support. Support for 'inotify' is essential for real-time tracking of file changes, which means that the client's 'Monitor Mode' cannot immediately detect changes in files located on these network shares. Instead, synchronisation between your local filesystem and Microsoft OneDrive will occur at intervals specified by the `monitor_interval` setting. This limitation regarding 'inotify' support on network mount points like NFS or Samba is beyond the control of this client.

## OneDrive Client for Linux High Level Activity Flows

Expand Down
21 changes: 13 additions & 8 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ The 'edge' Docker Container will align closer to all documentation and features,

Additionally there are specific version release tags for each release. Refer to https://hub.docker.com/r/driveone/onedrive/tags for any other Docker tags you may be interested in.

**Note:** The below instructions for docker has been tested and validated when logging into the system as an unprivileged user (non 'root' user).
> [!NOTE]
> The below instructions for docker has been tested and validated when logging into the system as an unprivileged user (non 'root' user).

## High Level Configuration Steps
1. Install 'docker' as per your distribution platform's instructions if not already installed.
Expand All @@ -39,7 +40,8 @@ Additionally there are specific version release tags for each release. Refer to
### 1. Install 'docker' on your platform
Install 'docker' as per your distribution platform's instructions if not already installed as per the instructions on https://docs.docker.com/engine/install/

**Note:** If you are using Ubuntu, do not install Docker from your distribution platform's repositories. You must install Docker from Docker provided packages.
> [!CAUTION]
> If you are using Ubuntu, do not install Docker from your distribution platform's repositories as these contain obsolete and outdated versions. You *must* install Docker from Docker provided packages.

### 2. Configure 'docker' to allow non-privileged users to run Docker commands
Read https://docs.docker.com/engine/install/linux-postinstall/ to configure the 'docker' user group with your user account to allow your non 'root' user to run 'docker' commands.
Expand Down Expand Up @@ -133,17 +135,19 @@ This will create a docker volume labeled `onedrive_data` and will map to a path
* The owner of this specified folder must have permissions for its parent directory
* Docker will attempt to change the permissions of the volume to the user the container is configured to run as

**NOTE:** Issues occur when this target folder is a mounted folder of an external system (NAS, SMB mount, USB Drive etc) as the 'mount' itself is owed by 'root'. If this is your use case, you *must* ensure your normal user can mount your desired target without having the target mounted by 'root'. If you do not fix this, your Docker container will fail to start with the following error message:
```bash
ROOT level privileges prohibited!
```
> [!IMPORTANT]
> Issues occur when this target folder is a mounted folder of an external system (NAS, SMB mount, USB Drive etc) as the 'mount' itself is owed by 'root'. If this is your use case, you *must* ensure your normal user can mount your desired target without having the target mounted by 'root'. If you do not fix this, your Docker container will fail to start with the following error message:
> ```bash
> ROOT level privileges prohibited!
> ```

### 6. First run of Docker container under docker and performing authorisation
The 'onedrive' client within the container first needs to be authorised with your Microsoft account. This is achieved by initially running docker in interactive mode.

Run the docker image with the commands below and make sure to change the value of `ONEDRIVE_DATA_DIR` to the actual onedrive data directory on your filesystem that you wish to use (e.g. `export ONEDRIVE_DATA_DIR="/home/abraunegg/OneDrive"`).

**Important:** The 'target' folder of `ONEDRIVE_DATA_DIR` must exist before running the docker container. The script below will create 'ONEDRIVE_DATA_DIR' so that it exists locally for the docker volume mapping to occur.
> [!IMPORTANT]
> The 'target' folder of `ONEDRIVE_DATA_DIR` must exist before running the docker container. The script below will create 'ONEDRIVE_DATA_DIR' so that it exists locally for the docker volume mapping to occur.

It is also a requirement that the container be run using a non-root uid and gid, you must insert a non-root UID and GID (e.g.` export ONEDRIVE_UID=1000` and export `ONEDRIVE_GID=1000`). The script below will use `id` to evaluate your system environment to use the correct values.
```bash
Expand Down Expand Up @@ -339,7 +343,8 @@ If you are running a Raspberry Pi, you will need to edit your system configurati

* Modify the file `/etc/dphys-swapfile` and edit the `CONF_SWAPSIZE`, for example: `CONF_SWAPSIZE=2048`.

A reboot of your Raspberry Pi is required to make this change effective.
> [!IMPORTANT]
> A reboot of your Raspberry Pi is required to make this change effective.

### Building and running a custom Docker image
You can also build your own image instead of pulling the one from [hub.docker.com](https://hub.docker.com/r/driveone/onedrive):
Expand Down
Loading