-
Notifications
You must be signed in to change notification settings - Fork 0
/
documentation.html
181 lines (178 loc) · 9.45 KB
/
documentation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<html>
<head>
<link rel="STYLESHEET" type="text/css" href="./handbook.css" />
<title>Sisrestore Documentation</title>
</head>
<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="NAVHEADER">
<table summary="Header table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th colspan="3" align="center">Sisrestore Documentation<br />simple handbook</th>
</tr>
</table>
<hr align="LEFT" width="100%" />
</div>
<div class="SECT1">
<h1 class="SECT1"><a id="Top" name="SR">Sisrestore</a></h1>
<i class="AUTHORGROUP"><span class="CONTRIB">Writed by</span> Gian Giovani.</i>
<div class="SECT2">
<h2 class="SECT2"><a id="overview" name="SROVERVIEW">1. Oveview</a></h2>
<p>Sisrestore or SR is a pack of shell script to provide a deepfreeze like function in linux desktop.
It developed specially for Kompudini but it can run on any linux or unix system compatible with small
modification or not.</p>
<blockquote class="WARNING">Any impact to your system is your bussines</blockquote>
</div>
<div class="SECT2">
<h2><a id="install" name="SRINSTALL">2. Installing Sisrestore</a></h2>
<blockquote class="TIP">Recomended: Before install this script pack you must edit the configuration file. Or you can use gui installer without edit configuration file</blockquote>
<p>Installing this script is simple easy. Execute the setup.sh with "install" argument to install it and "uninstall" argument to uninstall it.
Remember to run it as root user.</p>
<pre class="EXAMPLE">example:
#sh ./setup.sh install</pre>
<p>If you use system which use BSD style init like freeBSD, slackware linux etc you have to use additional bsd option to install it and set bsdmod's value in sisrestore.conf from 0 to 1 .</p>
<pre class="EXAMPLE">example:
#sh ./setup.sh install bsd</pre>
<p>Or if you use graphical environment, you can use gui based installer instead. Use "gui" option to do it.</p>
<blockquote class="IMPORTANT">
<p>GUI mode need zenity installed.</p>
</blockquote>
<pre class="EXAMPLE">
example
#sh ./setup.sh gui</pre>
<blockquote class="NOTE">Sisrestore is automatically enabled when you install it.</blockquote>
</div>
<div class="SECT2">
<h2><a id="howw" name="SRHOWW">3. How it work</a></h2>
<p>SR provide auto restore to specified directory and the effect is just like if you use deepfreeze in windows environment.
SR will <i>"reset"</i> the specified directory to the same state like when you backup the directory. And you can choose when SR
reset your directory, there are 3 choices. First is when system shutdown, second is when system started and last is on demand
by clicking restore button at System Restore GUI Frontend.</p>
<p>Sistem restore mainly use tar to work but it utilize lzma to make compressed backup archive.
SR work firstly backup the target with tar. When restore the backup SR use rm -rf to <b>**totally**</b> remove the
target and restore the backup later. So dont forget to check your data target before you restore it.</p>
</div>
<div class="SECT2">
<h2><a id="howu" name="SRHOWU">4. How use it</a></h2>
<p>Usage of Sisrestore is very easy but until now i think not straigtforward ;).</p>
<div class="SECT3">
<h2><a id="howu1" name="SRHOWU1">4.1 Basic Usage</a></h2>
<p>After install it you can enable SR with this command:</p>
<pre class="EXAMPLE">#sisrestore enable</pre>
<p>With this command you enable Sisrestore to work. </p>
<p>If you want to disable SR it so easy too :</p>
<pre class="EXAMPLE">#sisrestore disable</pre>
<p>This command will deactive all Sisrestore init script and "delete" the backup file.</p>
<p>The SR will work based on wmode (work mode) value in configuration file. You can call the on demand restore function
with this command :</p>
<pre class="EXAMPLE">#sisrestore restore</pre>
<p>Or you can use SR GUI frontend.</p>
<div class="SECT3">
<h2><a id="howu2" name="SRHOWU2"></a>4.2 Advance Usage</h2>
<p>There are some ugly rule for SR :</p>
<ol>
<li><p>After change the configuration you must run this command to take effect :</p>
<pre class="EXAMPLE">#sisrestore reload</pre>
<p>But if you configure via GUI frontend you dont need to do that.</li></p>
<li><p>If you change the target directory or archive mode
You must disable and re-enable SR, so SR make new backup archive.</p></li>
</ol>
</div>
</div>
<div class="SECT2">
<h2><a id="conf" name="SRCONF">5. Configuration</a></h2>
<p>You can configure Sisrestore in /etc/sisrestore.conf.</p>
<blockquote class="IMPORTANT">
<ol>
<li>There are 3 point which determine SR to work.</li>
<li>Change the mode and target only. Dont touch the other line if you dont know what you do!</li>
</blockquote>
<ol>
<li><b>Work mode (wmode) </b>
<p>Work mode mean when the SR restore backup file.<br />
There are three work mode :</p>
<ol>
<li><i>"Work at end"</i> it means SR restore the backup file when you shutdown your computer.</li>
<li><i>"Work at begin"</li> it means SR restore the backup file when you start your computer.</li>
<li><i>"Work on demand"</li> it means SR restore the backup file when you ask SR to restore your archive.</li>
</ol>
<p>By default SR use wmode 3</p>
<p>Set the value of wmode at configuration file with the work mode number. Example for work at begin mode (mode 2) :<p>
<pre class="EXAMPLE">wmode=2</pre>
</li>
<li><b>Action mode (amode)</b>
<p>Archive Mode determine the backup file type.<br />
There are two archive mode :</p>
<ol>
<li>Raw TAR for speed but bloat in size.</li>
<li>LZMA for balance in speed and good in size but long compress time.</li>
</ol>
<p>By default SR use amode 1</p>
<p>Set the value of amode at configuration file with the work mode number. Example for Raw Tar archive backup type (mode 1) :<p>
<pre class="EXAMPLE">amode=1</pre>
</li>
<li><b>Target</b>
<p>Specify your target directory. Be carefull.<p>
</ol>
</div>
<div class="SECT2">
<h2><a id="file" name="SRFILE">6. Included file</a></h2>
<p>Files included</p>
<table>
<tr><td class="FILENAME">/usr/sbin/SistemRestore.sh</td><td>Main Script</td>
<tr><td class="FILENAME">/usr/sbin/sisrestore</td><td>Link to main script</td>
<tr><td class="FILENAME">/usr/sbin/xsr</td><td>GUI frontend</td>
<tr><td class="FILENAME">/usr/share/kompudini/sr</td><td>Place for misc thing</td>
<tr><td class="FILENAME">/usr/share/kompudini/sr/setinit.sh</td><td>Script to prepare initscript</td>
<tr><td class="FILENAME">-/usr/share/kompudini/sr/guided.sh</td><td>GUI configuration tool</td>
<tr><td class="FILENAME">/usr/share/kompudini/sr/documentation.html</td><td>HTML Documentation File</td>
<tr><td class="FILENAME">/usr/share/kompudini/sr/handbook.css</td><td>Style for HTML Documentation File</td>
<tr><td class="FILENAME">/usr/share/applications/sr.desktop</td><td>Shortcut for xsr</td>
<tr><td class="FILENAME">/usr/share/applications/setup.sh</td><td>Setup file</td>
<tr><td class="FILENAME">/usr/share/applications/sisrsetore.sh</td><td>Standard configuration</td>
<tr><td class="FILENAME">/etc/init.d/sisrestore</td><td>Main init script</td>
<tr><td class="FILENAME">/etc/rcS.d/S38sisrestore</td><td>WMode 2 init script</td>
<tr><td class="FILENAME">/etc/rc0.d/S01sisrestore</td><td>WMode 1 init script</td>
<tr><td class="FILENAME">/var/kompudini/sr/</td><td>SR directory</td>
<tr><td class="FILENAME">/var/kompudini/sr/checksum</td><td>md5sum file for backup</td>
<tr><td class="FILENAME">/var/kompudini/sr/sisrestore.log</td><td>Log File</td>
<tr><td class="FILENAME">/var/kompudini/sr/status</td><td>Status File</td>
<tr><td class="FILENAME">/usr/share/kompudini/sr/srhelp</td><td>Help File</td>
<tr><td class="FILENAME">/etc/sisrestore.conf</td><td>Configuration File</td>
</table>
</div>
<div class="SECT2">
<h2><a id="bug" name="SRBUG">7. Bug</a></h2>
<p>Some known bug</p>
<ol>
<li><p>It have messy workflow</p></li>
<li><p>The shortcut to xsr (sr.desktop) only work with gksudo (for gtk/gnome environment).
If you use another tool edit the sr.desktop manually or make new shortcut to /usr/sbin/xsr with kdesu or etc.</p></li>
<li><p>The BSD Mode can't diferentiat work mode 1 and 2. However it will do its job when booting and halt.</p></li>
</ol>
</div>
</div>
<div class="SECT2">
<h2><a id="about" name="SRAB">8. About</a></h2>
<p>Copyright @2010 Gian Giovani<br />
email wejick at gmail dot com<br />
website <a href="http://wejick.wordpress.com">wejick.wordpress.com</a><br />
affiliate <a href="http://wartalinux.net">wartalinux.net</a><br />
License GPL<br /></p>
</div>
</div>
</div>
<div class="NAVFOOTER">
<hr align="LEFT" width="100%" />
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td width="34%" align="center" valign="top"><a href="documentation.html" accesskey="H">Top</a></td>
<td></td>
</tr>
</table>
</div>
<p align="center"><small>For questions about Sisrestore, Go to
<a href="http://wartalinux.net">wartalinux.net</a> <<a href="mailto:wejick@gmail.com">wejick@gmail.com</a>>.<br />
</p>
</body>
</html>