tmux-plugins / tmux-resurrect

Persists tmux environment across system restarts.
MIT License
11.4k stars 424 forks source link

Per-server (per-socket) sessions #481

Open strogonoff opened 1 year ago

strogonoff commented 1 year ago

BREAKING: may break existing sessions or integrations, since session save location is changed. See how to migrate below.

Tested with macOS Ventura, tmux 3.3a, TPM.

Migration path:

  1. Check and back up the current contents of your resurrect directory (it’s either in ~/.tmux/resurrect or in "${XDG_DATA_HOME:-$HOME/.local/share}"/tmux/resurrect, wherever that is).
  2. While your Tmux session is running, uninstall previous version of resurrect (remove plugin entry from Tmux conf & run TPM uninstall).
  3. Install this version (add in Tmux conf & run TPM install, can use my fork repository while it’s not merged).
  4. Save your session.
  5. Check contents of the resurrect directory you located in step 1. Now they should contain a subdirectory <tmux socket filename>, which is default by default. Save and resurrect commands you run now act on current server (socket path) only.

Migrating back: generally, you can just revert to the old version, and whatever snapshot was in your resurrect directory should work again.

Thanks to @samm81.