2
require_once("docutil.php");
3
page_head("Server-side file deletion [deprecated - Wiki]");
5
Files are deleted from the data server's upload and download directories
6
by the <b>file_deleter</b> daemon.
7
Typically you don't need to customize this.
8
The default file deletion policy is:
10
<li> A workunit's input files are deleted when
11
all results are 'over' (reported or timed out)
12
and the workunit is assimilated.
13
<li> A result's output files are deleted
14
after the workunit is assimilated.
15
The canonical result is handled differently,
16
since its output files may be needed to validate
17
results that are reported after assimilation;
18
hence its files are deleted only when all results are over,
19
and all successful results have been validated.
22
Command-line options are:
27
"Don't delete input files"
30
"-preserve_result_files",
31
"Don't delete output files"
35
"Retry file deletions that failed previously."
39
"periodically (once per hour) removes any files in the
40
upload/ directory that are older than the oldest WU in the
41
database. These files are created when BOINC clients
42
return work really late after the deadline -- so late that
43
the corresponding WU has been deleted from the database."
46
"-dont_delete_batches",
47
"If this boolean is set, the file deleter won't delete any files for which the corresponding workunit or result record has a positive value of the the 'batch' field. This lets you keep files on disk until you're done with them. Create workunits with a positive batch number, and zero out (or negate) the batch number when you're done looking at the files (you can do this with a SQL query). If you use this option, replace the indices on file_delete_state with indices on (file_delete_state, batch)."
53
In some cases you may not want files to be deleted.
54
There are three ways to accomplish this:
56
<li> Run the file_deleter daemon with
57
the -preserve_wu_files
58
and/or the -preserve_result_files command-line options.
59
<li> Include <no_delete/>
60
in the <a href=files.php><file_info></a> element for a file in a
61
<a href=tools_work.php>workunit or result template</a>.
62
This lets you suppress deletion on a file-by-file basis.
64
<li> Include <code>nodelete</code> in the workunit name.
67
You may need to implement your own scheme for deleting files,
68
to avoid overflowing data server storage.