ノート:
- このチュートリアルでは、Oracle Cloudへのアクセスが必要です。無料アカウントにサインアップするには、Oracle Cloud Infrastructure Free Tierの開始を参照してください。
- Oracle Cloud Infrastructureの資格証明、テナンシおよびコンパートメントに例の値を使用します。演習を完了するときは、これらの値をクラウド環境に固有の値に置き換えます。
Rcloneを使用したOracle Cloud Infrastructure Object Storageへの移行
イントロダクション
Oracle Cloud Infrastructure (OCI)オブジェクト・ストレージ・サービスは、信頼性とコスト効率の高いデータ耐久性を実現するインターネット規模の高パフォーマンス・ストレージ・プラットフォームです。Object Storageサービスでは、分析データおよびイメージやビデオなどのリッチ・コンテンツを含むすべてのコンテンツ・タイプの非構造化データを無制限に格納できます。
Rcloneは、様々なクラウド・ストレージ・プロバイダとの間で、またはオンプレミスからクラウドとの間で、ファイルおよびディレクトリを同期する汎用的なコマンドライン・プログラムです。Rcloneは、OCI Object Storageにデータを移行するための効果的なツールです。OCI Object Storageを含む多数のクラウド・サービスのシンプルさ、効率性、幅広いサポートで知られています。Rcloneは、次の機能およびユースケースをサポートしています。
- クラウド・ストレージへのバックアップ(および暗号化)とクラウド・ストレージからのファイルのリストア(および復号化)
- ローカル・ディスク機能へのマルチスレッド・ダウンロードを使用できます。
- クラウド・データを他のクラウド・サービスまたはローカルにミラー化します。
- Migrate data to OCI, or between cloud storage vendors and OCI or from on-premises to OCI.
- 複数の暗号化、キャッシュまたは多様なクラウド・ストレージをディスクとしてマウントします。
- 転送操作はいつでも再起動できます。
- Copy operation of new or changed files to OCI Object Storage.
- ディレクトリを同一にする同期オプション(1つの方法)。
- ローカル帯域幅の使用を最小限に抑えるために、サーバー側の転送を意味します。
- Check for missing files between source and OCI Object Storage.
- Support move operation of files to OCI Object Storage deleting the source/local files after validation/verification.
- タイムスタンプを保持し、チェックサムを検証します。
- ローカル・ディスクやデータのローカル・コピーは必要ありません。
- Windows、MacOS、LinuxおよびFreeBSDプラットフォームで、ローカル、クラウドまたは仮想ファイルシステムをディスクとしてマウントします。
- Support SFTP, HTTP, WebDAV, FTO, and DLNA protocols.
- 限られた帯域幅、断続的な接続を超えて転送します。
Rcloneアーキテクチャの概要
Rcloneアーキテクチャは、2つの異なるユースケースで動作します。
-
Rclone as a centralized or gateway solution: You can deploy Rclone in an Oracle Linux 9 centralized location or gateway, mount Network File System (NFS) or Server Message Block (SMB) shares from different operating systems, sources, or Network attached storage (NAS) appliances, then utilize Rclone to copy the data from the local source to OCI Object Storage.
-
Rclone deployed in the NFS or SMB Servers: You can deploy Rclone directly on the NFS or SMB servers to copy data from the local source directly to OCI Object Storage.このモデルでは、集中管理された場所にあるサーバーでRcloneを実行する必要はありません。
対象読者
OCI Object Storageにデータを移行するシステム管理者、アプリケーション管理者、システムおよびアプリケーション所有者、データベース所有者および開発者。
目標
- Effectively transfer data to OCI Object Storage using Rclone.
前提条件
-
Oracle Linux 8または9サーバーまたは Windowsプラットフォームサーバー。
ノート: Rcloneは複数のオペレーティング・システムをサポートしています。現在サポートされているオペレーティングシステムの詳細は、Rcloneインストールのドキュメントを参照してください。
-
Access to an Oracle Cloud Infrastructure account and OCI Console.
-
An OCI configuration file. For more information, see SDK and Configuration File.
-
Permissions to manage OCI Object Storage resources.詳細は、共通ポリシーおよびポリシー・リファレンスを参照してください。
-
An OCI Object Storage bucket: A bucket in OCI Object Storage where data will be transferred. For more information, see Creating an OCI Object Storage Bucket.
-
Local Data: From a local server, NFS or SMB shares.
-
クローンソフトウェア。
-
libsmbclient.x86_64
: On Linux, the latest version of the SMB client library is required, check the version and install it with the following commands.
タスク1: WindowsでのRcloneのインストール
ノート: Linuxを使用している場合は、タスク2にスキップします。
-
Windows用のRclone最新バージョンをダウンロードしてインストールします。詳細は、「クローン」を参照してください。
-
Extract the file and add the extracted file to Windows system PATH environment variable for easy command line access.
タスク2: LinuxでのRcloneのインストール
-
最初の方法は、curlインストール・スクリプトを実行することです。次の
curl
コマンドを実行して、Rcloneをダウンロードおよびインストールします。curl https://rclone.org/install.sh | sudo bash
または
プリコンパイルされたバイナリを介してインストールをクローニングします。プリコンパイル済みバイナリをダウンロードします。
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip or wget https://downloads.rclone.org/rclone-current-linux-amd64.zip
ノート:
curl
コマンドを使用してRcloneをインストールした場合は、タスク3に進みます。 -
バイナリを圧縮解除し、バイナリ・ディレクトリに変更します。
unzip rclone-current-linux-amd64.zip cd rclone-*-linux-amd64
-
バイナリ・ファイルを
/usr/bin/
にコピーし、権限を設定します。cp rclone /usr/bin chown root:root /usr/bin/rclone chmod 755 /usr/bin/rclone
-
Rcloneのマニュアルページをインストールします。
mkdir -p /usr/local/share/man/man1 cp rclone.1 /usr/local/share/man/man1/ mandb
Task 3: Configure Rclone for OCI Object Storage
-
Open Oracle Linux CLI and run
rclone config
command.このコマンドは、対話型設定プロセスを開始します。 -
Create a new remote name for OCI Object Storage, type
n
in the menu, and then enter a new name for your OCI remote configuration (for example:oci-object-01
). -
ストレージ・タイプを選択し、Oracle Cloud Infrastructure Object Storage
34
に対応する番号を選択します。 -
Rcloneで使用する認証プロバイダを選択します。たとえば、オプション
2
を使用します。 -
Enter the object storage namespace, object storage compartment ID, object storage region and the endpoint for object storage API.
Note: Endpoint for object storage API is optional.リージョンのデフォルト・エンドポイントを使用する場合は、空白のままにします。
-
Enter the full path for the OCI config file and the
config_profile
information. -
拡張構成オプションは必須ではありません。デフォルト・パラメータを受け入れるには、
n
を選択します。 -
Rclone構成のサマリーが表示されます。すべてが正しい場合は、
y
を選択して構成を保存します。 -
Perform a connection test to OCI Object Storage bucket before proceeding to migration and bulk data transfer activities with an
rclone ls
command.rclone ls OCIStorage:your-bucket-name
ローカルLinuxディレクトリからの移行の例
For this example, we are utilizing the /source
directory as the local storage source in our Oracle Linux server, and an OCI Object Storage bucket named test-bucket
as the target. Users on a Windows platform can follow along by creating a folder named source
and creating files in the folder to copy to the OCI Object Storage bucket.
-
We start with the empty OCI Object Storage bucket named
test-bucket
.Note: Buckets can be created with the OCI Console or OCI CLI.
-
/source
ディレクトリに5つのテキスト・ファイルがあります。ノート:テキスト・ファイルは、
touch
コマンドまたはvim
などのプリファレンスのエディタを使用して作成できます。Windowsプラットフォームを使用している場合は、ノートパッドを使用してsource
という名前のフォルダにファイルを作成し、rclone
コマンドを引き続き使用できます。 -
Use the
rclone copy
command to transfer data from the/source
folder on the Oracle Linux server to the OCI Object Storage buckettest-bucket
.rclone copy /path/to/local/data OCIStorage:your-bucket-name
たとえば次のようにします。
rclone copy /source/ oci:test-bucket
-
From the OCI Console, go to the OCI Object Storage details page for the bucket named
test-bucket
.バケットには、Oracle Linuxサーバーの/source
ディレクトリから移行されたテキスト・ファイルが含まれます。 -
Delete all files in the OCI Object Storage
test-bucket
with therclone delete
command.rclone delete oci:test-bucket
-
次のコマンド例には、マルチスレッド・ストリーム、データ転送の進行状況、バッファ・サイズなどの拡張オプションが含まれています。拡張オプションのクローニングを調査して、ユース・ケースに最適なオプションを決定します。
rclone -vvv --progress --stats-one-line --max-stats-groups 10 --log-format date,time,UTC,longfile --fast-list --buffer-size 256Mi --oos-no-check-bucket --oos-upload-cutoff 10Mi --multi-thread-cutoff 16Mi --multi-thread-streams 3000 --transfers 3000 --checkers 64 --retries 2 --oos-chunk-size 10Mi --oos-upload-concurrency 10000 --oos-attempt-resume-upload --oos-leave-parts-on-error sync /root/source/ oci:test-bucket
ノート: 最新の機能および改善を利用するためにRcloneを定期的に更新します。
関連リンク
確認
- 著者 - Anderson Souza氏(製品管理担当シニア・ディレクター)
その他の学習リソース
docs.oracle.com/learnの他のラボをご覧いただくか、Oracle Learning YouTubeチャネルで無料のラーニング・コンテンツにアクセスしてください。また、education.oracle.com/learning-explorerにアクセスしてOracle Learning Explorerになります。
製品ドキュメントは、Oracle Help Centerを参照してください。
Migrate Data to Oracle Cloud Infrastructure Object Storage Using Rclone
F91151-01
January 2024
Copyright © 2024, Oracle and/or its affiliates.