目次

Rclone

クラウドサービス上のストレージにデータをバックアップするため、Rcloneを導入します。

Windows

クラウドサービスの認証の許可をウェブブラウザで行うため、Windows PCで定義ファイルを作成します。

公式サイトのダウンロードページからrclone-current-windows-amd64.zipをダウンロードします。
※下線部分はお使いのOSにより変更してください。

ダウンロードしたzipファイルを、任意の場所(例 D:\Tools\Rclone)に展開します。

OneDrive

Microsoft OneDrive(Business)にバックアップする定義を作成します。

cd 'D:\Tools\Rclone'
.\rclone config --config .\rclone.conf
   :
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

Enter name for new remote.
name> OneDrive

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
   :
43 / Microsoft OneDrive - Tier 1
   \ (onedrive)
   :
Storage> 43

Option client_id.
   :
client_id>

Option client_secret.
   :
client_secret>

Option region.
   :
 1 / Microsoft Cloud Global
   \ (global)
   :
region> 1

Option tenant.
   :
tenant>

Edit advanced config?
y) Yes
n) No (default)
y/n> n

Use web browser to automatically authenticate rclone with remote?
   :
y) Yes (default)
n) No
y/n> y
   :
2026/11/18 14:44:27 NOTICE: Waiting for code...

ブラウザ操作

2026/11/18 14:45:22 NOTICE: Got code
Option config_type.
   :
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
   :
config_type> 1

Option config_driveid.
   :
 1 / ドキュメント (business)
   :
 2 / PersonalCacheLibrary (business)
   :
config_driveid> 1

Drive OK?

Found drive "root" of type "business"
   :
y) Yes (default)
n) No
y/n> y

Configuration complete.
   :
- type: onedrive
   :
- drive_type: business
Keep this "OneDrive" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

Current remotes:

Name                 Type
====                 ====
OneDrive             onedrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

1行目
Rcloneのディレクトリに移動します
2行目
Rcloneの定義ファイルを生成します
8行目
新しいリモート定義を作成します
11行目
リモート定義の識別名を入力します
20行目
Microsoft OneDriveを選択します
24行目
OAuthのclient_idを入力します
今回は空(なし)にします
24行目
OAuthのclient_secretを入力します
今回は空(なし)にします
35行目
使用するのregionを選択します
39行目
tenantを入力します
今回は空(なし)にします
41行目
その他に指定する定義はありません
50行目
ウェブブラウザを使用して認証の許可を行います

Google Drive

Google Driveにバックアップする定義を作成します。

cd 'D:\Tools\Rclone'
.\rclone config --config .\rclone.conf
   :
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n

Enter name for new remote.
name> GoogleDrive

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
   :
24 / Google Drive - Tier 1
   \ (drive)
   :
Storage> 24

Option client_id.
Google Application Client Id
   :
client_id> 

Option client_secret.
   :
client_secret> 

Option scope.
   :
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ (drive.file)
   / Allows read and write access to the Application Data folder.
   :
scope> 3

Option service_account_file.
   :
service_account_file>

Edit advanced config?
y) Yes
n) No (default)
y/n> n

Use web browser to automatically authenticate rclone with remote?

y) Yes (default)
n) No
y/n> y
   :
2026/11/18 15:05:43 NOTICE: Waiting for code...
2026/11/18 15:06:29 NOTICE: Got code
Configure this as a Shared Drive (Team Drive)?

y) Yes
n) No (default)
y/n> n

Configuration complete.
   :
Keep this "GoogleDrive" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
   :
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

3行目
Forms/を追記します