ノート:

Rcloneを使用したOracle Cloud Infrastructure Object Storageへの移行

イントロダクション

Oracle Cloud Infrastructure (OCI)オブジェクト・ストレージ・サービスは、信頼性とコスト効率の高いデータ耐久性を実現するインターネット規模の高パフォーマンス・ストレージ・プラットフォームです。Object Storageサービスでは、分析データおよびイメージやビデオなどのリッチ・コンテンツを含むすべてのコンテンツ・タイプの非構造化データを無制限に格納できます。

Rcloneは、様々なクラウド・ストレージ・プロバイダとの間で、またはオンプレミスからクラウドとの間で、ファイルおよびディレクトリを同期する汎用的なコマンドライン・プログラムです。Rcloneは、OCI Object Storageにデータを移行するための効果的なツールです。OCI Object Storageを含む多数のクラウド・サービスのシンプルさ、効率性、幅広いサポートで知られています。Rcloneは、次の機能およびユースケースをサポートしています。

Rcloneアーキテクチャの概要

Rcloneアーキテクチャは、2つの異なるユースケースで動作します。

対象読者

OCI Object Storageにデータを移行するシステム管理者、アプリケーション管理者、システムおよびアプリケーション所有者、データベース所有者および開発者。

目標

前提条件

タスク1: WindowsでのRcloneのインストール

ノート: Linuxを使用している場合は、タスク2にスキップします。

  1. Windows用のRclone最新バージョンをダウンロードしてインストールします。詳細は、「クローン」を参照してください。

  2. Extract the file and add the extracted file to Windows system PATH environment variable for easy command line access.

タスク2: LinuxでのRcloneのインストール

  1. 最初の方法は、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に進みます。

  2. バイナリを圧縮解除し、バイナリ・ディレクトリに変更します。

    unzip rclone-current-linux-amd64.zip
    cd rclone-*-linux-amd64
    
  3. バイナリ・ファイルを/usr/bin/にコピーし、権限を設定します。

    cp rclone /usr/bin
    chown root:root /usr/bin/rclone
    chmod 755 /usr/bin/rclone
    
  4. Rcloneのマニュアルページをインストールします。

    mkdir -p /usr/local/share/man/man1
    cp rclone.1 /usr/local/share/man/man1/
    mandb
    

    イメージ 4

Task 3: Configure Rclone for OCI Object Storage

  1. Open Oracle Linux CLI and run rclone config command.このコマンドは、対話型設定プロセスを開始します。

    イメージ 5

  2. 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).

    イメージ 6

  3. ストレージ・タイプを選択し、Oracle Cloud Infrastructure Object Storage 34に対応する番号を選択します。

    イメージ 7

  4. Rcloneで使用する認証プロバイダを選択します。たとえば、オプション2を使用します。

    イメージ 8

  5. Enter the object storage namespace, object storage compartment ID, object storage region and the endpoint for object storage API.

    イメージ 9

    Note: Endpoint for object storage API is optional.リージョンのデフォルト・エンドポイントを使用する場合は、空白のままにします。

  6. Enter the full path for the OCI config file and the config_profile information.

    イメージ 10

  7. 拡張構成オプションは必須ではありません。デフォルト・パラメータを受け入れるには、nを選択します。

    イメージ 11

  8. Rclone構成のサマリーが表示されます。すべてが正しい場合は、yを選択して構成を保存します。

    イメージ 12

  9. 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.

  1. We start with the empty OCI Object Storage bucket named test-bucket.

    イメージ 13

    Note: Buckets can be created with the OCI Console or OCI CLI.

  2. /sourceディレクトリに5つのテキスト・ファイルがあります。

    イメージ 14

    ノート:テキスト・ファイルは、touchコマンドまたはvimなどのプリファレンスのエディタを使用して作成できます。Windowsプラットフォームを使用している場合は、ノートパッドを使用してsourceという名前のフォルダにファイルを作成し、rcloneコマンドを引き続き使用できます。

  3. Use the rclone copy command to transfer data from the /source folder on the Oracle Linux server to the OCI Object Storage bucket test-bucket.

    rclone copy /path/to/local/data OCIStorage:your-bucket-name
    

    たとえば次のようにします。

    rclone copy /source/ oci:test-bucket
    
  4. From the OCI Console, go to the OCI Object Storage details page for the bucket named test-bucket.バケットには、Oracle Linuxサーバーの/sourceディレクトリから移行されたテキスト・ファイルが含まれます。

    イメージ 15

  5. Delete all files in the OCI Object Storage test-bucket with the rclone delete command.

    rclone delete oci:test-bucket
    
  6. 次のコマンド例には、マルチスレッド・ストリーム、データ転送の進行状況、バッファ・サイズなどの拡張オプションが含まれています。拡張オプションのクローニングを調査して、ユース・ケースに最適なオプションを決定します。

    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を定期的に更新します。

確認

その他の学習リソース

docs.oracle.com/learnの他のラボをご覧いただくか、Oracle Learning YouTubeチャネルで無料のラーニング・コンテンツにアクセスしてください。また、education.oracle.com/learning-explorerにアクセスしてOracle Learning Explorerになります。

製品ドキュメントは、Oracle Help Centerを参照してください。