LoginSignup
0
0

More than 5 years have passed since last update.

tmuxでセッションが復元しない時の対応

Last updated at Posted at 2019-02-12

tmuxでtmux-ressrrectで自動保存してくれるtpmがあるのに
再起動しても復元されない場合、以下のコマンドを実行します。

cd ~/.tmux/resurrect
ln -sf tmux_resurrect_<最新日時> last

これでtmuxを開いてPrefix + C-rで復元できる。

なんで復元できないかはまた調べます。

軽く解説

tmux-ressrrectが設定されている場合はデフォルトで60分ごとに~/.tmux/ressurect配下にtxt形式でログが残ります。

さらに最新のログはlastファイルにシンボリックリンクされている状況になります。
本来であれば再起動後、tmuxはこのlastを読みにいって復元するのですが、
それがうまいことリンクが貼れていないと復元できません。

そのため、上のコマンドを実行してリンクを張り直します。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0