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
89
会社員しながら本を書いてきた知見の共有
sat
PRO
3
770
デバイスにアクセスするデバイスファイル
sat
PRO
1
32
ファイルシステムのデータを ブロックデバイスへの操作で変更
sat
PRO
1
28
デバイスドライバ
sat
PRO
0
45
マルチスレッドの実現方法 ~カーネルスレッドとユーザスレッド~
sat
PRO
2
110
共有メモリ
sat
PRO
3
67
マルチスレッドプログラム
sat
PRO
3
56
Linuxのブートプロセス initramfs編
sat
PRO
2
76
Other Decks in Technology
See All in Technology
地図も、未来も、オープンに。 〜OSGeo.JPとFOSS4Gのご紹介〜
wata909
0
100
PHP開発者のためのSOLID原則再入門 #phpcon / PHP Conference Japan 2025
shogogg
4
630
AIの最新技術&テーマをつまんで紹介&フリートークするシリーズ #1 量子機械学習の入門
tkhresk
0
130
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
210
プロダクトエンジニアリング組織への歩み、その現在地 / Our journey to becoming a product engineering organization
hiro_torii
0
120
Oracle Cloud Infrastructure:2025年6月度サービス・アップデート
oracle4engineer
PRO
2
200
CI/CD/IaC 久々に0から環境を作ったらこうなりました
kaz29
1
150
AIのAIによるAIのための出力評価と改善
chocoyama
2
530
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
160
Кто отправит outbox? Валентин Удальцов, автор канала Пых
lamodatech
0
320
VCpp Link and Library - C++ breaktime 2025 Summer
harukasao
0
240
_第3回__AIxIoTビジネス共創ラボ紹介資料_20250617.pdf
iotcomjpadmin
0
150
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
GraphQLとの向き合い方2022年版
quramy
47
14k
Become a Pro
speakerdeck
PRO
28
5.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Designing for Performance
lara
609
69k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Unsuck your backbone
ammeep
671
58k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Agile that works and the tools we love
rasmusluckow
329
21k
Side Projects
sachag
455
42k
Visualization
eitanlees
146
16k
Raft: Consensus for Rubyists
vanstee
140
7k
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