source: tags/0.12.0/j/doc/autosave.html

Last change on this file was 2, checked in by piso, 22 years ago

Initial checkin.

File size: 2.7 KB
Line 
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
22To minimize loss of work in the event of a crash, j autosaves each modified
23buffer whenever there is no user activity for a minimum of two seconds. This
24has no effect on the file you're editing; modified buffers are written out to
25temporary files in j's autosave directory (which is normally
26<code>~/.j/autosave</code> on Unix or <code>C:\.j\autosave</code> on Windows,
27but see below).
28
29<p>
30
31Whenever you explicitly save a file, the corresponding autosave file is
32deleted. When j exits normally, all the autosave files are deleted. If a crash
33occurs, the autosave files will still be around when you restart j, and j will
34ask you, one by one, if you want to recover the files in question. If you say
35yes, the file will be restored from the corresponding autosave file. If you say
36no, j will offer to delete the autosave file. If you choose not to delete the
37autosave file, it will remain in the autosave directory for perusal and
38disposition at your leisure.
39
40<p>
41
42Whenever you explicitly save a file, a backup of the file is written to the
43backup directory, which by default is a directory called <code>backup</code>
44located in the home directory of the current user (i.e. <code>~/backup</code>
45on Unix).
46
47<p>
48
49On 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
51writable drive, excluding <code>A:</code> and <code>B:</code>), so the default
52backup directory on Windows is normally <code>C:\backup</code>.
53
54<p>
55
56You 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>
61In 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
69You 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
76The backup file (in the backup directory) always has the same name as the original file.
77
78<p>
79
80It's a good idea to visit your backup directory occasionally and clean it out;
81there is no mechanism in j to do this automatically.
82
83</body>
84
85</html>
Note: See TracBrowser for help on using the repository browser.