> ##### Last update 30-Jan-2001

> # mbfile - File database maintenance program.

> ### Synopsys.

> `mbfile [commands] <options>`

> ### Description.

> mbfile is the filedatabase maintenance program for mbsebbs. In order to run mbfile you must have started mbsed, this is the deamon which controls all bbs activities.

> The main purpose of mbfile to do automatic maintenance on the downloadable files on the bbs, such as removing or moving old files, checking the database and packing the database. The best way to do the maintenance is to run mbfile from the crontab. example:

>     30 05 * * * export MBSE_ROOT=/opt/mbse; /opt/mbse/bin/mbfile kill pack check index -quiet

> ### Environment.

> In order to run the bbs you need to set one global environment variable $MBSE_ROOT This variable must point to the root of the bbs directoy structure. The main configuration file config.data must exist in the subdirectory ~/etc.

> ### Commands.

> `mbfile check` Check the database integrity. All files in the filedatabase must exist on disk and all files on disk must exist in the filedatabase. There are some exceptions, files.bbs, files.bak, 00index, index*.html, header, readme and files that start with a dot. Of all files the date and time is checked, the size and the crc value of the file. If there is something wrong, the error is corrected or the file is removed. If the area is a CD-rom area, the check that files on disk must exist in the filedatabase is skipped.

> `mbfile index` Create fast filerequest index for the mbcico filerequest processor.

> `mbfile pack` This command will actualy remove the records of files that are marked for deletion. If the file is still on disk, it will be removed also. So when you delete files with mbsetup, they are still in your database and on disk until you run mbfile pack.

> `mbfile kill` Delete or move files in areas that have the download age set or the filedate age set. A setting of 0 is ignored. Areas on CD-rom are always skipped. If the Move to Area option is set the files are moved to the given area. The upload date and download date are reset to the current date and time. So if you set in the destination area aging of 14 days, files will stay there for 14 days after the move. This is good for automatic "last chance" areas.

> ### Options.

> `mbfile [command] -quiet` Quiet mode, no screen output. Use this switch if you run mbfile from the crontab.

> Back to index Back to Main index