macOS Ventura で NAS の古いバックアップを削除
macOS Ventura で NAS の古いバックアップを削除するのに苦労したのでそのメモ。
様々なサイトを見て試したけどうまくいかず。
結論としては、
1)Time Machine をオフにする(これ結構重要)
2)再起動する(これも結構重要)
3)ターミナルから
sudo tmutil delete -d '/Volumes/Time Machineバックアップ' -t 2022-04-19-142518
といきなり入力しても、
(null): No such file or directory (error 2)
とエラーになるので、
tmutil machinedirectory
とマウントする。
すると、
/Volumes/Time Machineバックアップ
とバックアップマウントポイントが返されるので、次に
tmutil listbackups
とバックアップの一覧を表示。
あとは、
sudo tmutil delete -d '/Volumes/Time Machineバックアップ' -t 2022-04-19-142518
と入力すると、
1 backups deleted
とバックアップが削除される。
その後、スパースバンドルを圧縮するといいという記事もあるが、
hdiutil compact /Volumes/Time\ Machine/MacBookPro15.sparsebundle
2023-02-21 12:25:07.773 hdiutil[2009:45837] -[DIHelperProxy(Thread) waitForHelperDone] timed out waiting for helper registration
圧縮を開始中…
空き領域を再び利用可能にしています…
.............................................................................................................................................
圧縮の仕上げ中…
空き領域1.5 GBのうち191.2 MBを再び利用可能にしました。
191.2MB しか圧縮されず。
私の場合は tmutil delete だけで自動的にスパースバンドルも圧縮されていた模様。