Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
バックアップと静止状態
Search
Satoru Takeuchi
PRO
July 01, 2021
Technology
0
100
バックアップと静止状態
以下動画のテキストです
https://youtu.be/SIlS8pQWfnc
Satoru Takeuchi
PRO
July 01, 2021
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
Rook: Intro and Deep Dive With Ceph
sat
PRO
1
98
会社員しながら本を書いてきた知見の共有
sat
PRO
3
770
デバイスにアクセスするデバイスファイル
sat
PRO
1
33
ファイルシステムのデータを ブロックデバイスへの操作で変更
sat
PRO
1
29
デバイスドライバ
sat
PRO
0
45
マルチスレッドの実現方法 ~カーネルスレッドとユーザスレッド~
sat
PRO
2
120
共有メモリ
sat
PRO
3
67
マルチスレッドプログラム
sat
PRO
3
56
Linuxのブートプロセス initramfs編
sat
PRO
2
79
Other Decks in Technology
See All in Technology
Clineを含めたAIエージェントを 大規模組織に導入し、投資対効果を考える / Introducing AI agents into your organization
i35_267
4
1.6k
強化されたAmazon Location Serviceによる新機能と開発者体験
dayjournal
2
210
M3 Expressiveの思想に迫る
chnotchy
0
110
Snowflake Summit 2025全体振り返り / Snowflake Summit 2025 Overall Review
mtpooh
2
400
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
26k
Amazon ECS & AWS Fargate 運用アーキテクチャ2025 / Amazon ECS and AWS Fargate Ops Architecture 2025
iselegant
16
5.6k
Javaで作る RAGを活用した Q&Aアプリケーション
recruitengineers
PRO
1
110
mrubyと micro-ROSが繋ぐロボットの世界
kishima
2
310
監視のこれまでとこれから/sakura monitoring seminar 2025
fujiwara3
11
3.9k
Кто отправит outbox? Валентин Удальцов, автор канала Пых
lamodatech
0
340
Oracle Audit Vault and Database Firewall 20 概要
oracle4engineer
PRO
3
1.7k
フィンテック養成勉強会#54
finengine
0
180
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
4 Signs Your Business is Dying
shpigford
184
22k
We Have a Design System, Now What?
morganepeng
53
7.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
930
Code Reviewing Like a Champion
maltzj
524
40k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building Applications with DynamoDB
mza
95
6.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Faster Mobile Websites
deanohume
307
31k
Transcript
バックアップと静止点 Jul. 1st, 2021 Satoru Takeuchi twitter: satoru_takeuchi, EnSatoru 1
バックアップの課題 • バックアップはいつでも取っていいというわけではない ◦ バックアップ中のデータは変化しうる • 例: 以下ディレクトリdir0のバックアップをとる 2 foo
bar dir0 file0 file1
理想的なケース 3 foo bar dir0 file0 file1 foo bar dir0
file0 file1 foo bar dir0 file0 file1 foo dir0.bak file0 foo bar dir0.bak file0 file1 コピー開始 file0をコピー file1をコピー
まずいケース 4 foo bar dir0 file0 file1 foo bar dir0
file0 file1 foo baz dir0 file0 file1 dir0.bak foo baz dir0.bak file0 file1 バックアップ開始 file0をコピー file1をコピー foo baz dir0 file0 file1 foo dir0.bak file0 別のプロセスが file1を更新 foo file0
まずいケース 5 foo bar dir0 file0 file1 foo bar dir0
file0 file1 foo baz dir0 file0 file1 dir0.bak foo baz dir0.bak file0 file1 バックアップ開始 file0をコピー file1をコピー foo baz dir0 file0 file1 foo dir0.bak file0 別のプロセスが file1を更新 foo file0 • 正しいデータをバックアップでき ていない
もっとまずいケース 6 foo bar dir0 file0 file1 コピー開始 file0を途中(“fo”)ま でコピー
file0の残りとfile1をコピー foo bar dir0 file0 file1 fo dir0.bak file0 別のプロセスがfile0 を”baz”に書き換え baz bar dir0 file0 file1 fo dir0.bak file0 baz bar dir0 file0 file1 foz dir0.bak file0 bar file1
もっとまずいケース 7 foo bar dir0 file0 file1 コピー開始 file0を途中(“fo”)ま でコピー
file0の残りとfile1をコピー foo bar dir0 file0 file1 fo dir0.bak file0 別のプロセスがfile0 を”baz”に書き換え baz bar dir0 file0 file1 fo dir0.bak file0 baz bar dir0 file0 file1 foz dir0.bak file0 • 正しいデータをバックアップでき ていない • file0の中身に不整合発生 bar file1
解決策 • バックアップ時にはデータを誰も更新しない状態にする ◦ 静止点(quiescent point)、静止状態(quiescent state)などと呼ぶ • バックアップが終われば更新再開 •
静止点を作るための機能もある ◦ 例: Linuxのファイルシステムにおける fsfreezeコマンド 1. fsfreeze -f <mount point> # 静止点を作る(freeze)。以後のwriteはブロックされる 2. cp -a <mount point> backup # バックアップをとる 3. fsfreeze -u <mount point> # データ更新再開 8 時間 データ更新可 不可 可 バックアップ開始! 終了!
さらなる課題 • データ量が増えるほど静止点を保持しなければならない時間が長くなる ◦ その間データの更新ができない 9 時間 データ更新可 小さなデータの場合 不可
可 大きなデータの場合 データ更新可 不可 可 バックアップ開始! 終了!ちょっと辛かった! バックアップ開始! 終了!すげえ辛かった!
まとめ • バックアップはいつ取ってもいいというわけではない • データを更新しない静止点を作った上で採取する必要がある • データ量が多いほど静止点を保持する時間が長くなるので辛い ◦ 📝 解決策は今後の動画で
! 10