OneDrive offers 5 GB of free storage space for personal accounts, making it a great option for storing and sharing files.
With OneDrive, you can access your files from anywhere, at any time, as long as you have an internet connection.
You can share files with others by sending them a link, and they can access the file without needing to create a OneDrive account.
OneDrive also integrates seamlessly with Microsoft Office, allowing you to edit and collaborate on documents, spreadsheets, and presentations in real-time.
Getting Started
To give OneDrive access to storage, start by signing in to your Microsoft account on the OneDrive website. You can also use the OneDrive app on your device.
OneDrive offers a free storage option of 5 GB, which is a good starting point for most users. This storage capacity allows you to store files, photos, and videos online.
You can also upgrade your storage plan to 1 TB or more, depending on your needs. This is especially useful if you have a lot of large files or if you need to store files for a long period of time.
To upgrade your storage plan, go to the OneDrive website and click on the "Upgrade storage" button. From there, you can choose the plan that best suits your needs.
Additional reading: Google Play Store Storage
OneDrive Configuration
To give OneDrive access to storage, you'll first need to configure it. This involves getting a token from Microsoft, which you can do in your browser.
The initial setup process is interactive and guided by rclone config, which will walk you through the necessary steps. You can see the remote setup docs for more information on setting it up on a machine with no Internet browser available.
You'll need to unblock rclone's webserver on http://127.0.0.1:53682/ if you're running a host firewall. This is only temporary and required to collect the token from Microsoft.
Configuration
To configure OneDrive with rclone, you'll need to get a token from Microsoft, which you can do in your browser. This involves an interactive setup process that rclone config will guide you through.
You can set up OneDrive on a machine with no Internet browser available, but you'll need to see the remote setup docs for instructions. Note that rclone runs a webserver on your local machine to collect the token as returned from Microsoft.
This webserver only runs from the moment it opens your browser to the moment you get back the verification code, and it's accessible at http://127.0.0.1:53682/. You may need to unblock it temporarily if you're running a host firewall.
Once configured, you can use rclone like this: to copy a local directory to an OneDrive directory called backup, for example.
Metadata
Metadata is a crucial aspect of OneDrive configuration. It helps you organize and find files easily.
By default, OneDrive automatically adds metadata to files, including the file name, date created, and date modified. This information is displayed in the file's properties.
You can also add custom metadata to files, such as tags and categories, to make them easier to find. This is especially useful for large collections of files.
OneDrive allows you to add up to 255 characters of custom metadata to each file. This can be a combination of tags, categories, and other custom fields.
To add custom metadata, simply right-click on a file and select "File properties" from the context menu. Then, click on the "Details" tab and add your desired metadata.
Here's an interesting read: Add Storage Google
Client ID and Authentication
To give OneDrive access to your storage, you'll need to create a Client ID. This can be done by following the steps outlined in the OneDrive Personal or OneDrive Business registration process.
For OneDrive Personal, you'll need to register an app in the Azure portal, select the correct account type, and configure the necessary permissions, including Files.Read, Files.ReadWrite, and offline_access.
The Client ID and Secret can be used in the rclone config to create or edit a OneDrive remote. The access_scopes option allows you to configure the permissions requested by rclone, and you can find more information about the different scopes on Microsoft Docs.
To configure the rclone remote, you'll need to supply the Client ID and Secret, as well as the auth_url and token_url for OneDrive Business. The tenant ID of your organization is required for this configuration.
Here are the required settings for the rclone config:
Client ID and Authentication
To authenticate with OneDrive, you'll need to set the correct scopes in rclone. The default scopes include Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All, Sites.Read.All, and offline_access.
These scopes can be set using the --onedrive-access-scopes flag, or by configuring the access_scopes variable in rclone.
Here are the default scopes:
You can also set the link scope using the --onedrive-link-scope flag, or by configuring the link_scope variable in rclone. The default link scope is set to "anonymous".
Client ID
Creating a Client ID is a crucial step in authenticating with OneDrive. You can create a Client ID for OneDrive Personal by following these steps: open the Azure portal, click New registration, and enter a name for your app.
The Client ID is used to identify your app, and you'll need it to configure your OneDrive remote in rclone. To create a Client ID for OneDrive Business, make sure to create the App with your business account and choose the account type Accounts in this organizational directory only (Single tenant).
You can find the Client ID under the app name in the Azure portal. It's a long string of characters, so make sure to copy and keep it for later use. The Client ID is also known as the Application (client) ID.
For more insights, see: Create a Storage Account in Azure
To configure the Client ID in rclone, you'll need to set the client_id option. This can be done in the rclone config or by setting the RCLONE_ONEDRIVE_CLIENT_ID environment variable.
Here are the Client ID options in rclone:
The access_scopes option in rclone allows you to configure the permissions requested by rclone. You can find more information about the different scopes on the Microsoft Docs website.
Token URL
Token URL is an important part of the authentication process. It's used to obtain an access token for your OneDrive account.
You can configure the token URL in the settings of your rclone application. The configuration option is called token_url. Alternatively, you can set the RCLONE_ONEDRIVE_TOKEN_URL environment variable to specify the token URL.
The token URL is a string value. It's not a required field, so you can leave it blank if you don't have one.
Here are the configuration options for the token URL:
- Config: token_url
- Env Var: RCLONE_ONEDRIVE_TOKEN_URL
- Type: string
- Required: false
Storage Settings
To give OneDrive access to storage, you need to set up your storage settings correctly.
You can access storage settings by going to the OneDrive settings page and clicking on "Storage."
OneDrive allows you to store files up to 15 GB, with the option to upgrade to 1 TB or more with a subscription.
Root Folder
In many cases, you won't need to specify the root folder ID, but there are special circumstances where it might come in handy.
You can access the root folder ID through the config, an environment variable, or by specifying it directly.
If you need to access a specific folder but can't get there through a path traversal, you can use the root folder ID to bypass this limitation.
You can set the root folder ID in the config or through an environment variable.
Here are the ways to specify the root folder ID:
- Config: root_folder_id
- Env Var: RCLONE_ONEDRIVE_ROOT_FOLDER_ID
Chunk Size
Chunk size is a crucial setting when uploading files to OneDrive. It must be a multiple of 320k (327,680 bytes).
Files above this size will be chunked, which means they'll be broken down into smaller pieces. These chunks should also be a multiple of 320k (327,680 bytes) and not exceed 250M (262,144,000 bytes).
If you set the chunk size too high, you might encounter an error saying the request message is too big.
You can configure the chunk size using the `chunk_size` config option or the `RCLONE_ONEDRIVE_CHUNK_SIZE` environment variable.
The default chunk size is 10Mi, which is a good starting point.
File Sizes
File Sizes are limited, but you can store quite a bit. The largest allowed file size is 250 GiB for both OneDrive Personal and OneDrive for Business.
This means you can upload large files like videos and images without issue. Keep in mind that this limit applies to both personal and business accounts.
If you're planning to store a lot of large files, it's worth noting that this limit has been in place since 13 Jan 2021.
Explore further: Business Standard Onedrive Storage
Path Length
When working with cloud storage, it's essential to consider the path length to avoid any issues. The entire path, including the file name, must contain fewer than 400 characters for OneDrive, OneDrive for Business, and SharePoint Online.
Encrypting file and folder names with rclone can sometimes lead to longer names, so it's worth paying attention to this limitation to avoid any potential problems.
See what others are reading: Azure File Storage vs Blob Storage
Number of Files
When dealing with a large number of files, OneDrive seems to handle at least 50,000 files in a folder without any issues.
Rclone, on the other hand, may struggle to list the directory if you exceed 100,000 files, resulting in an error like "couldn't list files: UnknownError:".
OneDrive's ability to handle a large number of files is a plus, but it's essential to be aware of Rclone's limitations to avoid any issues.
Modification History
OneDrive allows modification times to be set on objects accurate to 1 second, which helps detect if objects need syncing or not.
You can use the --checksum flag for all types of OneDrive to ensure accurate syncing.
Starting from July 2023, SHA1 support is being phased out in Onedrive Personal in favor of QuickXorHash.
During the transition period, you can use the --onedrive-hash-type flag (or hash_type config option) to select SHA1 if necessary.
Before rclone 1.62, the default hash for Onedrive Personal was SHA1, but now it's QuickXorHash for all Onedrive backends.
Naming
OneDrive is case insensitive, which means you can't have a file called "Hello.doc" and another called "hello.doc".
You'll also notice that there are certain characters that can't be in OneDrive file names. This includes characters that are common on non-Windows platforms but not on Windows.
For example, if you try to name a file with a ? in it, Rclone will automatically map it to its unicode equivalent, ?. This ensures that your file names are consistent across different platforms.
Curious to learn more? Check out: What Is Azure Storage
Frequently Asked Questions
How do I give OneDrive permission to device storage?
To give OneDrive permission to access device storage, go to Settings > Apps > OneDrive > Permissions > Files and Media. Here, you can adjust OneDrive's access to your device's files and media.
Sources
- https://rclone.org/onedrive/
- https://www.techtarget.com/searchmobilecomputing/definition/Microsoft-OneDrive
- https://www.knowledgewave.com/blog/office-365-onedrive-for-business-everything-you-need-to-know
- https://support.microsoft.com/en-us/office/share-onedrive-files-and-folders-9fcc2f7d-de0c-4cec-93b0-a82024800c07
- https://staff.uq.edu.au/information-and-services/information-technology/folders-and-file-storage/cloud-storage/onedrive
Featured Images: pexels.com