source: box/boxbackup-web/serverfix.html @ 1901

Revision 1901, 4.8 KB checked in by ben, 5 years ago (diff)

Make box backup web site available.

Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
6<title>Fixing problems with corruption on the server</title>
7<link rel="stylesheet" href="bbstyles.css" type="text/css" />
8</head>
9<body>
10<div align="center">
11<div id="header">
12<div id="logo">
13<img src="images/bblogo.png" alt="logo" height="65" width="331" border="0" vspace="5" align="middle" /> <img src="images/stepahead.png" alt="a step ahead in data security" width="182" height="11" hspace="10" vspace="20" border="0" align="middle" /></div>
14</div>
15<div id="page">
16
17<h1>Fixing problems with corruption on the server</h1>
18
19<p>This page gives help on what to do if your server has suffered corruption, for example,
20after an unclean shutdown or other OS or hardware problem.</p>
21
22<p>In general, as updates to the store are made in an atomic manner, the most
23likely result is wasted disc space. However, if really bad things happen, or you believe that
24there is a lot of wasted space, then these instructions will help to restore your data.</p>
25
26<p>You know you will need to do something if you get strange errors, and <tt>bbackupd</tt> attempts
27to contact the server every 100 seconds or so. Or if one of the discs in your RAID disc set has failed.</p>
28
29<p>After following these instructions, the end result will be that <tt>bbackupquery</tt> will be able to see all the files which
30were stored on your server, and retrieve them. Some of them may be in <tt>lost+found</tt>
31directories in the root of the store (or in their original position if they have been moved) but they will all
32be able to be retrieved.</p>
33
34<p>After you have retrieved the files you want, <tt>bbackupd</tt> will upload new versions
35where necessary, and after about two days, mark any <tt>lost+found</tt> directories as deleted.
36Finally, those directories will be removed by the housekeeping process on the server.</p>
37
38<p>These instructions assume you're working on account 1234, subsitute this for whatever account
39you're actually working on. These will need to be repeated for all affected accounts.</p>
40
41<h2>1. Stop bbackupd</h2>
42
43<p>First, make sure that <tt>bbackupd</tt> is not running on the client machine for the account
44you are going to recover. Use <tt>kill</tt> to terminate it.</p>
45
46<p>(This step is not strictly necessary, but is recommended. During any checks on the account,
47<tt>bbackupd</tt> will be unable to log in, and after they are complete, the account is marked
48as changed on the server so <tt>bbackupd</tt> will perform a complete scan.)</p>
49
50<h2>2. Are you using RAID on the server?</h2>
51
52<p>At the moment, the raidfile recovery tools have not been written. However, when two out of
53three files are available, the server will run succesfully, even if it complains a lot in the logs.
54So, your best bet here is to fix the accounts, if necessary, and retrieve any files you need. Then move
55the old store directories aside (in case you need them) and start afresh with new accounts, and
56let the clients upload all their data again.</p>
57
58<p>These utilities will be written shortly!</p>
59
60<h2>3. Check and fix the account</h2>
61
62<p>First, run the check utility, and see what errors it reports.</p>
63
64<pre>
65  /usr/local/bin/bbstoreaccounts check 1234
66</pre>
67
68<p>This will take some time, and use a fair bit of memory (about 16 bytes per file and directory).
69If the output looks plausible and reports errors which need fixing, run it again but with the
70<tt>fix</tt> flag:</p>
71
72<pre>
73  /usr/local/bin/bbstoreaccounts check 1234 fix
74</pre>
75
76<p>This will fix any errors, and remove unrecoverable files. Directories will be recreated if necessary.</p>
77
78<p><b>NOTE</b>: The utility may adjust the soft and hard limits on the account to make sure that
79housekeeping will not remove anything -- check these afterwards.</p>
80
81<h2>4. Grab any files you need with bbackupquery</h2>
82
83<p>At this point, you will have a working store. Every file which was on the server, and wasn't corrupt,
84will be available.<p>
85
86<p>On the client, use <tt>bbackupquery</tt> to log in and examine the store. (type <tt>help</tt> at the
87prompt for instructions). Retrieve any files you need, paying attention to any <tt>lost+found</tt>
88directories in the root directory of the store.</p>
89
90<p>You can skip this step if you are sure that the client machine is fine -- in this case, <tt>bbackupd</tt>
91will bring the store up to date.</p>
92
93<h2>5. Restart bbackupd</h2>
94
95<p>Restart <tt>bbackupd</tt> on the client machine. The store account will be brought up to date, and
96files in the wrong place will be marked for eventual deletion.</p>
97
98
99<p>&nbsp;</p>
100<p>&copy; Ben Summers, 2003, 2004</p>
101<p>&nbsp;</p>
102</div>
103</div>
104</body>
105</html>
Note: See TracBrowser for help on using the repository browser.