Easy OneDrive Sync Setup and Configuration Guide

Author

Reads 835

Crop anonymous male looking through files and folder in box placed on desk with green bankers lamp in home office
Credit: pexels.com, Crop anonymous male looking through files and folder in box placed on desk with green bankers lamp in home office

Setting up OneDrive sync is a straightforward process that can be completed in just a few steps.

To begin, you'll need to download the OneDrive desktop app from the Microsoft website.

The app is available for both Windows and macOS, and can be downloaded in just a few clicks.

Once the app is installed, you'll need to sign in with your Microsoft account credentials.

This will sync your OneDrive files across all your devices, including your desktop, laptop, and mobile phone.

With OneDrive sync, you can access your files from anywhere, at any time, making it easy to stay productive on the go.

Setup and Configuration

To set up OneDrive on your Windows 10 or 11 computer, you're in luck - it's already installed. Simply start OneDrive Setup and follow the prompts.

The default location for OneDrive is set during setup, but you can change it if you want. On the "This is your OneDrive folder" screen, click "Change Location" and select a new location for your OneDrive files.

Credit: youtube.com, Microsoft OneDrive | OneDrive Sync Explained

You can choose which folders to sync to your computer during setup, which helps conserve space and reduce bandwidth. On the "Sync Files from Your OneDrive" screen, select the folders you want to sync and click "Next".

To sync libraries and folders, you have two options: add shortcuts to libraries and folders to your OneDrive, or use the sync button on the library. Adding OneDrive shortcuts allows content to be accessed on all devices, and they offer improved performance compared to using the sync button.

Here are the steps to sync a SharePoint site:

  1. Click the Microsoft 365 app launcher and then click SharePoint.
  2. Click the site that you want to sync.
  3. Click Documents or navigate to the subfolder that you want to sync.
  4. Click Sync.
  5. Confirm that it's okay to use "Microsoft OneDrive" in your browser.
  6. Choose the folders that you want to sync and click Start sync.

You can manage your syncing sites in the sync app settings by clicking the OneDrive icon in the menu bar, then Preferences, and finally the Account tab.

Basic Syntax

Rclone's basic syntax is straightforward. A subcommand is the operation you want to perform, such as sync or copy.

A subcommand is followed by options, which can be single letter flags like -v or a group of flags like -Pv. Long flags like --progress are also possible.

Side view of contemplating female assistant in casual style standing near shelves and choosing file with documents
Credit: pexels.com, Side view of contemplating female assistant in casual style standing near shelves and choosing file with documents

Options can come after the subcommand, in between parameters, or at the end. However, only global options can be used before the subcommand.

You can specify parameters, which are usually file paths or rclone remotes, like /path/to/file or remote:path/to/file. The subcommand help will tell you what specific parameters are required.

To specify a path, you can use a forward slash / or a backslash \ on Windows, but non-local paths must use /. The path can be relative to the current directory if it doesn't start with a leading slash.

Server Side Copy

Server side copies are a game changer for large file transfers, allowing rclone to instruct the server to copy files in place instead of downloading and re-uploading them.

This feature is supported by most remotes, but you should check the overview to see if your remote is one of them.

Server side copies are used with sync and copy commands, and will be identified in the log when using the -v flag.

Credit: youtube.com, How to enable Previous Versions and Showdow Copy on Windows Server

They can also be used with the move command if the remote doesn't support server-side move directly, which is done by issuing a server-side copy then a delete.

Server side copies will only be attempted if the remote names are the same, making it a convenient option for scripting aged backups efficiently.

For example, you can use server side copies to make aged backups quickly and easily.

-C, --Checksum

The -c, --checksum flag is a game-changer for accurate syncs, especially when transferring between remotes like Drive and Swift.

Rclone will normally check file modification time and size to determine if files are equal, but with --checksum, it checks the file hash and size for a more accurate comparison.

This flag is particularly useful when the remote doesn't support setting modified time, and you need a more precise sync than just checking file size.

Rclone will run much quicker with the --checksum flag, as seen in the example rclone --checksum sync s3:/bucket swift:/bucket.

Using this flag also prevents Rclone from updating remote file mtimes if they're incorrect, which would normally happen without the flag.

Cutoff Mode = Hard|Soft|Cautious

Close-up Photo of Document Files
Credit: pexels.com, Close-up Photo of Document Files

Cutoff mode determines how Rclone behaves when it reaches the transfer limit.

Specifying --cutoff-mode=hard will stop transferring immediately when Rclone reaches the limit.

You can also choose to stop starting new transfers when the limit is reached by specifying --cutoff-mode=soft.

For --max-transfer, a cautious approach can be taken by specifying --cutoff-mode=cautious, which tries to prevent Rclone from reaching the limit.

The default cutoff mode is hard, so if you don't specify anything, Rclone will stop transferring immediately when it reaches the limit.

Environment Variables

Environment variables are a powerful tool in rclone, allowing you to set defaults for options or config file entries. You can use them to set the default for every option in rclone.

To find the name of the environment variable, take the long option name, strip the leading --, change - to _, make upper case and prepend RCLONE_. For example, to always set --stats 5s, set the environment variable RCLONE_STATS=5s.

Credit: youtube.com, How to Set Environment Variables in Windows

The environment variable equivalent of --verbose or -v is RCLONE_VERBOSE=1, or for -vv, RCLONE_VERBOSE=2. This is slightly different from other options.

Options set by environment variables can be seen with the -vv flag, e.g. rclone version -vv. This is a useful way to check what options are being set.

Options that can appear multiple times, such as exclude patterns, are treated slightly differently. They are treated as a CSV encoded string, allowing you to set multiple values with a single environment variable.

Here's an example of how to set multiple exclude patterns with environment variables:

If stringArray options are defined as environment variables and options on the command line, all the values will be used.

Use Both?

If you're wondering whether to use both OneDrive and Google Drive, the answer is yes, you can definitely benefit from using both platforms. You can save money by taking advantage of the free storage space offered by both platforms, with 5GB for OneDrive and 15GB for Google Drive.

Gray Laptop Computer
Credit: pexels.com, Gray Laptop Computer

OneDrive and Google Drive serve different purposes, so it makes sense to use both if you're working with different types of files or if your company is already using one platform over the other. For example, if your company is using Google Workspace, it's a good idea to use Google Drive since it's an included service.

You can sync libraries and folders using the sync button in OneDrive, and you'll have a cloud icon for every account you've connected to OneDrive in your Menu bar.

Here are some reasons why you might want to use both OneDrive and Google Drive:

Setup

To get started with OneDrive, you'll need to install and set up the app. If you're using Windows 10 or 11, your computer already has the OneDrive app installed, so you can skip to the next step. If not, you'll need to install the Windows version of the new OneDrive sync app.

Person Holding Iphone Showing Social Networks Folder
Credit: pexels.com, Person Holding Iphone Showing Social Networks Folder

To begin the setup process, start OneDrive Setup. This will guide you through the process of setting up your OneDrive account.

You can change the default location of your OneDrive folder during setup. To do this, click Change Location on the This is your OneDrive folder screen and select a new location. This will save your OneDrive files in the new location instead of the default location.

You can choose which folders to sync to your computer during setup. This will conserve space on your computer and reduce bandwidth needed for the sync processes. To do this, go to the Sync Files from Your OneDrive screen and select the folders you want to sync.

To access your OneDrive folder, click Open my OneDrive folder. You'll see your files syncing to your folder.

Here are the steps to follow:

  • Install the OneDrive app if you're not using Windows 10 or 11
  • Start OneDrive Setup
  • Change the default location of your OneDrive folder if needed
  • Choose which folders to sync to your computer
  • Click Open my OneDrive folder to access your files

Sync Settings

To sync your OneDrive settings, you can access them in the Settings app. This is where you'll find the toggle switch to sync your files across all your devices.

OneDrive sync settings also allow you to choose which files and folders to sync, giving you more control over your cloud storage.

Path to Dir

Credit: youtube.com, The EASY Way to Sync Files To The Cloud - OneDrive Tips!

On Windows, you can use \ instead of / in local paths, but non-local paths must use /.

You can omit the leading / in a path, and it will be relative to the current directory.

Using relative paths can be super helpful, especially when working with files on your local machine.

Valid Remote Names

Remote names are case sensitive and must follow specific rules to ensure they work correctly with rclone.

Remote names can contain a wide range of characters, including numbers, letters, underscores, hyphens, periods, plus signs, at symbols, and spaces.

However, there are some restrictions to keep in mind. Remote names cannot start with a hyphen or a space.

They also cannot end with a space. It's worth noting that rclone versions 1.61 and later support Unicode characters, while older versions are limited to plain ASCII.

If you plan to use the same rclone configuration across different shells with different character encoding, be cautious of the characters you use. This is especially important on Windows, where the console traditionally uses a non-Unicode character set.

To avoid ambiguity, it's best to avoid using single character names on Windows, as they can be confused with Windows drive names. For example, a remote called "C" would be indistinguishable from the C drive.

Contimeout=Time

Man Sitting in Front of Three Computers
Credit: pexels.com, Man Sitting in Front of Three Computers

The connection timeout is a crucial setting when syncing files with rclone. It's the amount of time rclone will wait for a connection to go through to a remote object storage system.

By default, the connection timeout is set to 1m, which is 1 minute. This means that if rclone can't establish a connection to the remote storage within 1 minute, it will timeout and stop waiting.

You can adjust the connection timeout to a value that suits your needs by using the "--contimeout=TIME" flag. For example, you can set it to 5s for 5 seconds, 10m for 10 minutes, or 3h30m for 3 hours and 30 minutes.

Max Backlog=N

The max backlog setting is a crucial one to get right. It determines the maximum number of files that can be queued for checking or transferring at any given time.

Setting the max backlog to a large number, like N, allows rclone to accurately calculate the number of pending files and provide a more accurate estimated finish time. This is especially useful when using the --order-by option.

A Person Holding a Folder of a Top Secret Files Label
Credit: pexels.com, A Person Holding a Folder of a Top Secret Files Label

Using a large max backlog setting will also make rclone use more memory, specifically in the order of N KiB, when the queue is in use. This can be a consideration if you're working with limited resources.

On the other hand, setting the max backlog to a small number can make rclone more synchronous with the listings of the remote. This may be desirable if you need to keep your syncs closely tied to the remote's listings.

Setting the max backlog to a negative number will allow it to grow as large as possible, essentially disabling the limit.

Suffix = Suffix

The suffix option is a useful feature in sync settings, allowing you to add a suffix to files that would be overwritten or deleted.

You can use the suffix option with sync, copy, or move commands, and it's especially useful when using the same remote as the destination of the sync.

A woman reaches for folders in a light-filled modern office with a laptop.
Credit: pexels.com, A woman reaches for folders in a light-filled modern office with a laptop.

The suffix is added to files with the same path, and if there's a file with the same path already, it will be overwritten.

It's recommended to use a filter rule excluding the suffix if you're using rclone sync with --suffix and without --backup-dir, otherwise the sync will delete the backup files.

The suffix option is only for use with files in the current directory or with --backup-dir.

Use Server Modtime

Using the server's modified time can significantly speed up sync operations, especially when syncing a local directory to a remote storage backend like Swift or S3. This is because some backends don't preserve file modification times.

To take advantage of this, you can use the "--use-server-modtime" flag. This flag tells rclone to rely on the server's modified time instead of making an extra API call to retrieve the metadata.

By doing so, you can avoid unnecessary API calls and reduce the time it takes to complete the sync operation. This is particularly useful when using "--update" to sync local files with the remote storage.

Method 1: No Signed-in Accounts

Crop smart multiethnic female colleagues in formal clothes and badges leaning on columns of aged building and sharing tablet during project discussion
Credit: pexels.com, Crop smart multiethnic female colleagues in formal clothes and badges leaning on columns of aged building and sharing tablet during project discussion

If you're starting from scratch with OneDrive, you need to connect a work or school account first.

To start, launch OneDrive Setup by pressing cmd+Space to open a Spotlight query and typing OneDrive.

Enter your work or school account credentials to set up your account.

You'll be taken to a sign-in page where you can enter your email and password to complete the setup process.

Once you're signed in, you'll have access to your OneDrive account and can start syncing your files.

If you're unsure about your account credentials, check with your IT department or the person who set up your account for assistance.

Frequently Asked Questions

How do I get my OneDrive to synch?

To sync OneDrive, sign in with your account and follow the setup prompts. Your files will start syncing to your computer once you've completed the process.

Why is my OneDrive not syncing?

OneDrive syncing issues can be caused by unreliable connections, OS updates, or permission problems. Learn more about common causes and solutions to get your OneDrive syncing again

Jeannie Larson

Senior Assigning Editor

Jeannie Larson is a seasoned Assigning Editor with a keen eye for compelling content. With a passion for storytelling, she has curated articles on a wide range of topics, from technology to lifestyle. Jeannie's expertise lies in assigning and editing articles that resonate with diverse audiences.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.