というわけで約束通り。
あとで記事にする予定< @mnicovideo: @dankogai Mobile Time Machineとはなんですか?ポータブルHDDを持ち運んでバックアップしているのかな?
What is it?
出先などで手元に Time Capsule や外付けHDDなど、Time Machine バックアップがない状態でも、Time Machine に入れるようにする Lion の新機能。モバイル限定。
右のメニューを見ての通り、今ハノイにいる私には東京にある Time Capsule はアクセスできないため、[Backup Delayed…]となっている。いや、Back to My Macを使えば不可能ではないんだけど、今回は Time Capsule も電源ごと落としてある。
それなのに、[Enter Time Machine]は無効になっていない。早速入ってみよう。
22日にはあったファイルが…
翌日には消えている。
で、22日に戻って該当ファイル選択し、[Restore]をクリックすれば、めでたく消してしまったファイル--ここではスクリーンショットが復活する。
How is it implemented?
バックアップなしでリストア?そんなばかなという感じもするが、種明かしをしてしまえばなるほどである。
まずは Terminal からdfしてみよう。
% df -l /dev/disk0s2 211309656 92416680 118636976 44% / /dev/disk0s4 32967676 16918280 16049396 52% /Volumes/BOOTCAMP localhost:/xN-6AlU3JKJAXF2y9Ua3X3 211309656 211309656 0 100% /Volumes/MobileBackups
% mount /dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) /dev/disk0s4 on /Volumes/BOOTCAMP (ntfs, local, noexec, nosuid, read-only, noowners, noatime) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse) localhost:/xN-6AlU3JKJAXF2y9Ua3X3 on /Volumes/MobileBackups (mtmfs, nosuid, read-only, nobrowse)
なんなんだ?この/Volumes/MobileBackupsというのは!サイズが/と同じではないか。中身を見てみよう。
total 15221 -rw-rw-r-- 1 root admin 6148 Jul 21 14:58 .DS_Store d-wx-wx-wt@ 2 root wheel 68 Jul 20 22:50 .Trashes srwxrwxrwx 1 root wheel 0 Jul 24 21:00 .dbfseventsd ---------- 1 root admin 0 Jun 19 04:45 .file drwxr-xr-x@ 2 root wheel 68 Jun 21 15:31 .vol drwxrwxr-x@ 4 root admin 136 Jul 24 20:57 Applications drwxrwxr-x@ 16 root admin 544 Jul 21 02:19 Developer drwxrwxr-x 6 root admin 204 Jul 20 22:51 Incompatible Software drwxrwxr-t@ 7 root admin 238 Jul 23 18:54 Library drwxr-xr-x@ 2 root wheel 68 Jun 19 04:44 Network drwxr-xr-x@ 3 root wheel 102 Jul 22 22:11 System lrwxr-xr-x 1 root admin 60 Nov 2 2010 User Guides And Information -> /Library/Documentation/User Guides and Information.localized drwxr-xr-x@ 3 root admin 102 Jul 21 17:57 Users drwxrwxrwt@ 7 root admin 238 Jul 24 23:14 Volumes drwxr-xr-x@ 39 root wheel 1326 Jul 20 22:40 bin drwxrwxr-t@ 2 root admin 68 Jun 19 04:44 cores lrwxr-xr-x@ 1 root wheel 11 Jul 20 22:40 etc -> private/etc -rw-r--r--@ 1 root wheel 15565140 Jun 19 04:59 mach_kernel drwxr-xr-x@ 3 root admin 102 Jul 22 23:00 opt drwxr-xr-x@ 4 root wheel 136 Jul 22 22:11 private drwxr-xr-x@ 62 root wheel 2108 Jul 20 22:41 sbin lrwxr-xr-x@ 1 root wheel 11 Jul 20 22:40 tmp -> private/tmp drwxr-xr-x@ 5 root wheel 170 Jul 24 03:33 usr lrwxr-xr-x@ 1 root wheel 11 Jul 20 22:40 var -> private/var
なんだかふつうに Time Machine の中を覗き込んだときみたいだ。この中にアクセスすることで、フルリストアも出来る様子。
しかし、本当の本当に実体があるのは、実はここ。
/.MobileBackups/Computer/2011-07-21-175744/Volume/total 0 drwxrwxr-t@ 7 root admin 238 Jul 23 18:54 Library drwxr-xr-x@ 3 root wheel 102 Jul 22 22:11 System drwxr-xr-x@ 3 root admin 102 Jul 21 17:57 Users drwxr-xr-x@ 3 root admin 102 Jul 22 23:00 opt drwxr-xr-x@ 4 root wheel 136 Jul 22 22:11 private
まとめると、こうなる。
- (削除|変更)前のファイルは、
/.MobileBackupsに保管され - それをも含めた「バックアップされた時点でのファイルシステムの全体」は
/Volumes/MobileBackupsを通して常にアクセス可能 - Time Machineはそこへの(単なる)GUIフロントエンド
おおざっぱにまとめると、Mobile Time Machine は、「捨てずにとっておくことで後で掘り出せるようにする」という点で、バックアップというよりは「多世代ゴミ箱」に近い存在だと言える。
このことは Developer Preview の段階で、Arts Technica が記事にしていたようだ。
Mac OS X 10.7 Lion: the Ars Technica reviewThe implementation is strange. Themtmfs(Mobile Time Machine file system) daemon runs an NFS server on localhost which is then mounted at/Volumes/MobileBackups. In it, you'll find the usualBackups.backupdbdirectory structure that Time Machine creates for its backups. The actual copies of new and changed files—and only those files—are stored in/.MobileBackupsby themtmddaemon. When the Time Machine volume is mounted again, local backups are consolidated and copied onto it.
How to REALLY delete your files
ということは、モバイルMacにおいては、ファイルを消しただけではディスクの使用領域は減らないことになる。どうしても消したい場合は、
- あらかじめ消すことを見越して、Time Machine から(ファイル|フォルダ)を除外しておく
/.MobileBackups/Computer/以下の該当バックアップを消去- Time Machineが自動で消すのを待つ
ことになるが、以下の記事は、2.を知らずに実行したのだと推測される。
Mac OSをLionにしてからハードディスクの容量が減らないって時は強引に… - APPPS!!by神アプリ解説:(´・ω・`)(ヽ'ω`):MacのOSをLionにしてから動画ファイルを消しても、音楽ファイルを消してもハードディスクの使用領域がさっぱり減らないって方、僕が2時間半かかって見つけた解決方法を聞いてくださいませ〜。
異国で同じことをする勇気はとてもないので、同じことをしてみた人は、/.MoblieBackupsの中身を確認してみて欲しい。
ハノイはMac以前にパソコンを見かける機会も少ないのであるが、それでもホテルから二件隣に見つけたお店がこちら。彼らも今 Lion と格闘の最中なのだろうか…
Dan the Man with Too Many Backups

このブログにコメントするにはログインが必要です。
さんログアウト
この記事には許可ユーザしかコメントができません。