IgnorantGuru / spacefm

SpaceFM File Manager
http://ignorantguru.github.com/spacefm/
GNU General Public License v3.0
490 stars 72 forks source link

How can I back up and restore my SpaceFM configuration(s) #756

Open Yekutiel opened 4 years ago

Yekutiel commented 4 years ago

I have one minor problem with SpaceFM which I'm hoping to resolve: I don't know how to back up and restore my SpaceFM configuration(s).

Here's what I did...

  1. I created a backup of ~/.config/spacefm/session
  2. I deleted the contents of ~/.config/spacefm. That is I deleted the three files: session, session-prior, and session-last.
  3. I restored my backup to ~/.config/spacefm/session.
  4. I restarted my machine.

One of my custom key shortcuts that was in my backup failed to update. That is the custom key short, which had been in the ~/.config/spacefm/session which I had deleted, persisted.

I read this... Configuration Question #706 (I do not think @antonio-malcolm was trolling, rather I think he had a legitimate problem albeit perhaps one of his own doing). Be that as it may, to me the most important point @antonio-malcolm made was the following...

Also, it will not load my config backup.

I was thinking something like, "I hear you my man! I failed to load my config backup too!!"

And I read this... session-last & session-prior

These are the session files from your last and prior-to-last runs of SpaceFM. If you encounter a configuration problem or loss of settings when starting or using SpaceFM, be sure to make a backup copy of these files before running SpaceFM again. To revert to an older session, stop all instances of SpaceFM and rename the older session file 'session'.

I spent about an hour combing through the SpaceFM documentation but failed to figure out how to make a back up of my SpaceFM configuration(s). It only takes me about 20 minutes to manually configure SpaceFM when I install a new Linux distro (I just switched to Manjaro in the hopes of avoiding the need to reinstall Linux distros every couple of years) but I've manually configured SpaceFM at least a couple of dozen or so times over the last 5 or 6 years (as I've distro hopped and experimented). Frankly I would like to avoid manually configuring SpaceFM in the future.

By the way, I've been studying Ansible and plan to make an Ansible playbook because I want to be able to decrease the time I spend manually setting up of new Linux distros in the future. I'm not complaining; I'm explaining. Ansible might be useful in the event that I would need to copy multiple SpaceFM configuration files

Finally, for me SpaceFM is an excellent tool. If it were not for SpaceFM I'd probably need to learn to use Ranger. However, I'm not an engineer. Therefore, unsurprisingly "VIM text-based user interface" stuff is difficult for me to deal with. I have memorized many commands but I also like to use the GUI for commands I use infrequently.

ncmprhnsbl commented 4 years ago

the key is: not to use spacefm to delete/replace the session files, because the the last running instance of spacefm determines the contents of 'session'.
so via terminal or any other file manager .. (if you're already doing this feel free to ignore) btw mc is an easy to use ncurses based terminal fm

Yekutiel commented 4 years ago

@ncmprhnsbl Thank you very much! Your suggestion worked!

@IgnorantGuru I suggest you update...

session-last & session-prior

as follows...

These are the session files from your last and prior-to-last runs of SpaceFM. If you encounter a configuration problem or loss of settings when starting or using SpaceFM, be sure to make a backup copy of these files before running SpaceFM again. To revert to an older session, stop all instances of SpaceFM and then using another file manager such as Thunar, Nemo, PCManFM, etcetera but not using SpaceFM rename the older session file 'session'.