<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>【ストレージ】タグの記事一覧｜AZ START | Azure入門ブログ</title>
	<atom:link href="https://az-start.com/tag/%E3%82%B9%E3%83%88%E3%83%AC%E3%83%BC%E3%82%B8/feed/" rel="self" type="application/rss+xml" />
	<link>https://az-start.com</link>
	<description>認定資格試験に合格する方法を公開！</description>
	<lastBuildDate>Mon, 29 Jul 2024 08:01:28 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://az-start.com/wp-content/uploads/2023/02/Favicon.jpg</url>
	<title>【ストレージ】タグの記事一覧｜AZ START | Azure入門ブログ</title>
	<link>https://az-start.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/><atom:link rel="hub" href="https://websubhub.com/hub"/>	<item>
		<title>【作りながら覚える】Azure File Syncを試してみた</title>
		<link>https://az-start.com/create-azure-file-sync-hands-on/</link>
					<comments>https://az-start.com/create-azure-file-sync-hands-on/#respond</comments>
		
		<dc:creator><![CDATA[Makoto Okada]]></dc:creator>
		<pubDate>Thu, 17 Nov 2022 12:05:10 +0000</pubDate>
				<category><![CDATA[作りながら覚える]]></category>
		<category><![CDATA[ストレージ]]></category>
		<guid isPermaLink="false">https://az-start.com/?p=1264</guid>

					<description><![CDATA[どうも、フリーランスエンジニアのMakotoです。 今回は、Azure File Syncを利用してAzureにファイルを同期する手順をハンズオン形式でご紹介します。Azure File Syncの概要はこちらの記事で紹]]></description>
										<content:encoded><![CDATA[<p>どうも、フリーランスエンジニアのMakotoです。</p>
<p>今回は、Azure File Syncを利用してAzureにファイルを同期する手順をハンズオン形式でご紹介します。Azure File Syncの概要は<a href="https://az-start.com/options-for-moving-files/">こちら</a>の記事で紹介しています。</p>
<h2>全体像と用語を確認</h2>
<p>今回作成する構成はこんな感じ。</p>
<img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-1265" src="https://az-start.com/wp-content/uploads/2022/11/dfafbe466e7df3743623d99114319f6d.png" alt="Azure File Syncハンズオン" width="1280" height="720" srcset="https://az-start.com/wp-content/uploads/2022/11/dfafbe466e7df3743623d99114319f6d.png 1280w, https://az-start.com/wp-content/uploads/2022/11/dfafbe466e7df3743623d99114319f6d-300x169.png 300w, https://az-start.com/wp-content/uploads/2022/11/dfafbe466e7df3743623d99114319f6d-1024x576.png 1024w, https://az-start.com/wp-content/uploads/2022/11/dfafbe466e7df3743623d99114319f6d-768x432.png 768w, https://az-start.com/wp-content/uploads/2022/11/dfafbe466e7df3743623d99114319f6d-320x180.png 320w, https://az-start.com/wp-content/uploads/2022/11/dfafbe466e7df3743623d99114319f6d-640x360.png 640w, https://az-start.com/wp-content/uploads/2022/11/dfafbe466e7df3743623d99114319f6d.png 856w" sizes="(max-width: 1280px) 100vw, 1280px" />
<p>Windows ServerはAzureの仮想マシンでも代用できますが、今回はローカルPCのHyper-V上の仮想マシン（Windows Server 2022）を使います。</p>
<p>Azure File Syncで登場する用語（コンポーネント）の意味は次の通りです。</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<th style="width: 22.4637%;">用語</th>
<th style="width: 44.2029%;">意味</th>
</tr>
<tr>
<td style="width: 22.4637%;"><span style="font-size: 14px;">ストレージ同期サービス</span></td>
<td style="width: 44.2029%;"><span style="font-size: 14px;">Azure File Syncを利用するために最初に作成するリソース</span></td>
</tr>
<tr>
<td style="width: 22.4637%;"><span style="font-size: 14px;">同期グループ</span></td>
<td style="width: 44.2029%;"><span style="font-size: 14px;">どことどこを同期させるのかを定義するもの</span></td>
</tr>
<tr>
<td style="width: 22.4637%;"><span style="font-size: 14px;">クラウドエンドポイント</span></td>
<td style="width: 44.2029%;"><span style="font-size: 14px;">Fileストレージのファイル共有を指定する</span></td>
</tr>
<tr>
<td style="width: 22.4637%;"><span style="font-size: 14px;">サーバーエンドポイント</span></td>
<td style="width: 44.2029%;"><span style="font-size: 14px;">オンプレミスのサーバのパスを指定する</span></td>
</tr>
<tr>
<td style="width: 22.4637%;"><span style="font-size: 14px;">Azure File Syncエージェント</span></td>
<td style="width: 44.2029%;"><span style="font-size: 14px;">オンプレミスのサーバにインストールが必要</span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>今回実践する内容は公式の<a href="https://learn.microsoft.com/ja-jp/azure/storage/file-sync/file-sync-extend-servers">チュートリアル</a>をベースにしています。それでは、実際に作成していきましょう！</p>
<h2>ファイル共有の作成</h2>
<p>ストレージアカウントは作成済みの前提で進めます。まず、Azure側の同期先となるファイル共有を作成します。</p>
<img decoding="async" class="alignnone" src="https://i.gyazo.com/69786a86c448e2f0fe24d5ad7a1eb182.png" alt="ファイル共有の作成" width="1158" height="595" />
<p>&nbsp;</p>
<p>shareという名前のファイル共有を作成しました。そこに「<strong>CloudFile.txt</strong>」という名前でファイルをアップロードしておきます。</p>
<img decoding="async" class="alignnone" src="https://i.gyazo.com/47291f1e86b188384e02d6d09eec1650.png" alt="ファイル共有にファイルをアップロード" width="1025" height="439" />
<h2>仮想マシンに同期フォルダを作成</h2>
<p>SV01には <strong>D:\FilesToSync</strong> というフォルダを作成して「<strong>LocalFile.txt</strong>」を作成しておきます。</p>
<p><img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/33f1765e82f01c2363d2f32489c77237.png" alt="SV01の同期フォルダ" width="808" height="451" />SV02は <strong>C:\FilesToSync</strong> というフォルダのみ作成して空っぽにしておきます。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/acea40084e9eba8be5ce429a0c579a1b.png" alt="SV02の同期フォルダを作成" width="755" height="422" />
<h2>ストレージ同期サービスの作成</h2>
<p>続いて、ストレージ同期サービスを作成します。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/a168bdc4ef47efdee16adaa6ddf0bfc3.png" alt="ストレージ同期サービスの作成" width="754" height="533" />
<h2>Windows Serverの登録</h2>
<p>そして、登録済みサーバーのメニューを開いて「<a href="https://www.microsoft.com/en-us/download/details.aspx?id=57159">Azure File Syncエージェント</a>」のリンクからエージェントをダウンロードします。URLをコピーして仮想マシン上でダウンロードしたほうが早いです。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/07b0a10d8e4f1c1cd109225589c07bc2.png" alt="登録済みサーバー" width="1138" height="489" />
<p>エージェントのインストール自体は簡単で「次へ」で進めるだけです。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/0ae45464133528dd01f142f197db6cd2.jpg" alt="Azure File Syncエージェントのインストール" width="1020" height="631" />
<p>インストールが完了すると、自動的にサーバを登録するための画面が起動します。まずは、Azureにサインイン。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/89ba218e83d3f19b4fe3190c5c5b2bda.png" alt="Azure File Sync - Server Registration" width="800" height="499" />
<p>サインインできたら、サブスクリプション、リソースグループ、ストレージ同期サービスを選択して登録します。（プルダウンで選ぶだけ）</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/3c3c254417d8e0dfce19550dada29d88.png" alt="Azure File Sync - Server Registration2" width="799" height="497" />
<p>2台ともエージェントのインストール、サーバの登録が完了すると「登録済みサーバー」に登録されます。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/9f68e4cd5144e57505face32bf363cb1.png" alt="登録済みサーバー2" width="1141" height="486" />
<h2>同期グループの作成</h2>
<p>次に同期グループを作成します。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/ab9300836cfc1a9eb5dca4fa7043e646.jpg" alt="同期グループの作成" width="962" height="471" />
<p>この時、クラウドエンドポイントとなるファイル共有を指定します。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/81d874151c11e4870ca19ea988dedbba.png" alt="同期グループの作成2" width="648" height="490" />
<h2>サーバーエンドポイントの作成</h2>
<p>最後にサーバーエンドポイントを作成します。<br />
エージェントをインストールした登録済みサーバーと、同期対象とするフォルダのパスを指定します（デプロイに少し時間がかかります）</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/bda0df94e370fd96dfc7e05c97767b8c.png" alt="サーバーエンドポイントの追加" width="1131" height="619" />
<p>デプロイが完了すると「ヘルス」の箇所がグリーンのチェックに変わります。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/0e11bfe3ece2dc6c395fa858f905d02c.png" alt="サーバーエンドポイントの追加2" width="889" height="496" />
<h2>動作確認</h2>
<p>Azure側のファイル共有を見てみると、SV01のファイルが同期されていることがわかります。「.SystemShareInformation」はAzureによって自動的に作成されるフォルダで、重要な同期メタデータが含まれます（削除しないように注意）</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/06549d827f556c7a00d22ed6bda285db.png" alt="動作確認（クラウド）" width="875" height="455" />
<p>SV01、SV02を見てみると、こちらも同期されていることがわかります。</p>
<img loading="lazy" decoding="async" class="alignnone" src="https://i.gyazo.com/217f7390f24063ac49a3f41803d067a2.png" alt="動作確認（ローカル）" width="1162" height="609" />
<p>例えば、SV02でファイルを追加したり、既存ファイルをリネームすると、10～20秒くらいでファイル共有、SV01に反映されます。</p>
<p>注意点として、ファイル共有（Azure側）にファイルを追加するなどの変更を加えた場合は<strong>即時反映されません。</strong></p>
<p>即時で反映させたい場合は「Invoke-AzStorageSyncChangeDetection」コマンドを実行する必要があります。詳細は<a href="https://jpaztech.github.io/blog/storage/storageFileSyncFAQ/">こちらの記事</a>をご覧ください。</p>
<h2>まとめ</h2>
<p>今回は、Azure File Syncを試してみました。</p>
<p>登場する用語の意味がわかると、構成する手順はそれほど難しくなかったです。Windows Serverのみサポートされているサービスですが、簡単にオンプレミスのファイルをクラウドに同期できるのは便利ですね。</p>
<p>それでは、また。</p>
<p style="text-align: center;"><span class="color-button01"><a href="https://az-start.com/azure-learning-course/"><strong>Azure入門コースを見る</strong></a></span></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://az-start.com/create-azure-file-sync-hands-on/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
