FarManager 3: export settings AND history

To export and to import configs in FarManager 3.x i can use command "far /export settings.xml" and "far /import settings.xml". It also saves and restores my plugins settings.

But what if i want, for any reason, export and import histories of actions (command, folder, search text, file viewing etc.)? How to do this?


You could copy C:\Users\<user>\Local Settings\Far Manager\Profile\history.db to your new FAR installation (or another location to back it up).

history.db is a SQLite database (in FAR 3.0 build 4949 x64) and contains:

  • editorbookmarks_history
pid │ num │ line │ linepos │ screenline │ leftpos
────┼─────┼──────┼─────────┼────────────┼────────
  • editorposition_history
   id  │ name                                                   │ time               │ line  │ linepos │ screenline │ leftpos │ codepage
   ────┼────────────────────────────────────────────────────────┼────────────────────┼───────┼─────────┼────────────┼─────────┼─────────
   1   │ C:\dev\lots\far\Plugins\FTP\lib\Progress_FarCopy.reg   │ 131409365609906748 │ 32    │ 7       │ 32         │ 0       │ 437
   2   │ C:\dev\lots\far\Plugins\FTP\lib\Progress_JM.reg        │ 131409365636305598 │ 0     │ 0       │ 0          │ 0       │ 1252
  • history
id   │ kind │ key                   │ type │ lock │ name                                                   │ time               │ guid │ file  │ data       
─────┼──────┼───────────────────────┼──────┼──────┼────────────────────────────────────────────────────────┼────────────────────┼──────┼───────┼────────────
75   │ 3    │ Copy                  │ 0    │ 0    │ C:\Users\A\AppData\Local\Google\Chrome\User Data\      │ 131406535121264788 │      │       │            
359  │ 3    │ SearchText            │ 0    │ 0    │ \s{2,}(.+)                                             │ 131409454921877807 │      │       │            
360  │ 3    │ ReplaceText           │ 0    │ 0    │  > "$1txt"                                             │ 131409454921892816 │      │       │            
407  │ 3    │ Copy                  │ 0    │ 0    │ orig                                                   │ 131409467955745308 │      │       │            
412  │ 3    │ NewFolder             │ 0    │ 0    │ Temp                                                   │ 131409478016477759 │      │       │            
4383 │ 0    │                       │ 0    │ 0    │ git clone https://github.com/FarGroup/FarManager.git   │ 131549537486842679 │      │       │ C:\dev\c++ 
  • sqlite_master
type  │ name                                       │ tbl_name                │ rootpage │ sql                                         ...
──────┼────────────────────────────────────────────┼─────────────────────────┼──────────┼─────────────────────────────────────────────...
table │ history                                    │ history                 │ 2        │ CREATE TABLE history(id INTEGER PRIMARY KEY,...
index │ history_idx1                               │ history                 │ 3        │ CREATE INDEX history_idx1 ON history (kind, ...
index │ history_idx2                               │ history                 │ 4        │ CREATE INDEX history_idx2 ON history (kind, ...
index │ history_idx3                               │ history                 │ 5        │ CREATE INDEX history_idx3 ON history (kind, ...
index │ history_idx4                               │ history                 │ 6        │ CREATE INDEX history_idx4 ON history (kind, ...
table │ editorposition_history                     │ editorposition_history  │ 7        │ CREATE TABLE editorposition_history(id INTEG...
index │ sqlite_autoindex_editorposition_history_1  │ editorposition_history  │ 8        │                                             ...
table │ editorbookmarks_history                    │ editorbookmarks_history │ 9        │ CREATE TABLE editorbookmarks_history(pid INT...
index │ sqlite_autoindex_editorbookmarks_history_1 │ editorbookmarks_history │ 10       │                                             ...
index │ editorposition_history_idx1                │ editorposition_history  │ 11       │ CREATE INDEX editorposition_history_idx1 ON ...
table │ viewerposition_history                     │ viewerposition_history  │ 12       │ CREATE TABLE viewerposition_history(id INTEG...
index │ sqlite_autoindex_viewerposition_history_1  │ viewerposition_history  │ 13       │                                             ...
table │ viewerbookmarks_history                    │ viewerbookmarks_history │ 14       │ CREATE TABLE viewerbookmarks_history(pid INT...
index │ sqlite_autoindex_viewerbookmarks_history_1 │ viewerbookmarks_history │ 15       │                                             ...
index │ viewerposition_history_idx1                │ viewerposition_history  │ 18       │ CREATE INDEX viewerposition_history_idx1 ON ...
  • viewerbookmarks_history
pid │ num │ filepos │ leftpos
────┼─────┼─────────┼────────
  • viewerposition_history
id  │ name                                                ... │ time               │ filepos   │ leftpos │ hex │ codepage
────┼─────────────────────────────────────────────────────...─┼────────────────────┼───────────┼─────────┼─────┼─────────
1   │ C:\Users\A\AppData\Local\Google\Chrome\User Data\Def... │ 131406529236576470 │ 0         │ 0       │ 0   │ 1252    
2   │ E:\Users\a\AppData\Local\Google\Chrome\User Data\Cer... │ 131406533100894047 │ 0         │ 0       │ 0   │ 1252    
3   │ C:\Users\A\AppData\Local\Google\Chrome\User Data\A12... │ 131406535532290385 │ 23389     │ 0       │ 0   │ 65001   
4   │ C:\Users\A\AppData\Local\Google\Chrome\User Data\Loc... │ 131406535566058527 │ 0         │ 6713    │ 0   │ 65001   

history.db-shm and history.db-wal are SQLite temporary files and I wouldn't copy them.

To inspect the contents of the SQLite files directly in FAR Manager install the SQLiteDB plugin.