1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
---|
2 | |
---|
3 | <html> |
---|
4 | |
---|
5 | <head> |
---|
6 | <title>J User's Guide - Autosave, Crash Recovery and Backups</title> |
---|
7 | <LINK REL="stylesheet" HREF="j.css" TYPE="text/css"> |
---|
8 | </head> |
---|
9 | |
---|
10 | <body> |
---|
11 | |
---|
12 | <a href="contents.html">Top</a> |
---|
13 | |
---|
14 | <hr> |
---|
15 | |
---|
16 | <h1>Autosave, Crash Recovery and Backups</h1> |
---|
17 | |
---|
18 | <hr> |
---|
19 | |
---|
20 | <p> |
---|
21 | |
---|
22 | To minimize loss of work in the event of a crash, j autosaves each modified |
---|
23 | buffer whenever there is no user activity for a minimum of two seconds. This |
---|
24 | has no effect on the file you're editing; modified buffers are written out to |
---|
25 | temporary files in j's autosave directory (which is normally |
---|
26 | <code>~/.j/autosave</code> on Unix or <code>C:\.j\autosave</code> on Windows, |
---|
27 | but see below). |
---|
28 | |
---|
29 | <p> |
---|
30 | |
---|
31 | Whenever you explicitly save a file, the corresponding autosave file is |
---|
32 | deleted. When j exits normally, all the autosave files are deleted. If a crash |
---|
33 | occurs, the autosave files will still be around when you restart j, and j will |
---|
34 | ask you, one by one, if you want to recover the files in question. If you say |
---|
35 | yes, the file will be restored from the corresponding autosave file. If you say |
---|
36 | no, j will offer to delete the autosave file. If you choose not to delete the |
---|
37 | autosave file, it will remain in the autosave directory for perusal and |
---|
38 | disposition at your leisure. |
---|
39 | |
---|
40 | <p> |
---|
41 | |
---|
42 | Whenever you explicitly save a file, a backup of the file is written to the |
---|
43 | backup directory, which by default is a directory called <code>backup</code> |
---|
44 | located in the home directory of the current user (i.e. <code>~/backup</code> |
---|
45 | on Unix). |
---|
46 | |
---|
47 | <p> |
---|
48 | |
---|
49 | On Windows, the home directory of the current user normally defaults to |
---|
50 | <code>C:\</code> (the default is actually the root directory of the first |
---|
51 | writable drive, excluding <code>A:</code> and <code>B:</code>), so the default |
---|
52 | backup directory on Windows is normally <code>C:\backup</code>. |
---|
53 | |
---|
54 | <p> |
---|
55 | |
---|
56 | You can specify a different home directory by starting j with the |
---|
57 | <code>--home</code> command line option: |
---|
58 | <pre> |
---|
59 | j --home=C:\ArmedBear |
---|
60 | </pre> |
---|
61 | In this case your home directory, as far as j is concerned, will be |
---|
62 | <code>C:\ArmedBear</code>, the <code>.j</code> directory will be |
---|
63 | <code>C:\ArmedBear\.j</code>, autosave files will be stored in |
---|
64 | <code>C:\ArmedBear\.j\autosave</code>, and the default backup directory will be |
---|
65 | <code>C:\ArmedBear\backup</code>. |
---|
66 | |
---|
67 | <p> |
---|
68 | |
---|
69 | You can specify the location of the backup directory separately by setting the |
---|
70 | <code>backupDirectory</code> property in your |
---|
71 | <a href="preferences.html">preferences</a> file: |
---|
72 | <pre> |
---|
73 | backupDirectory=/home/peter/work/backup |
---|
74 | </pre> |
---|
75 | |
---|
76 | The backup file (in the backup directory) always has the same name as the original file. |
---|
77 | |
---|
78 | <p> |
---|
79 | |
---|
80 | It's a good idea to visit your backup directory occasionally and clean it out; |
---|
81 | there is no mechanism in j to do this automatically. |
---|
82 | |
---|
83 | </body> |
---|
84 | |
---|
85 | </html> |
---|