====== data directory ======

The location of the ''data'' directory is configurable (in [[util:SCFG]]->System->Advanced Options), but defaults to a sub-directory named **''data''** off of the installation directory (e.g. ''/sbbs/data/'').

===== Directory Contents =====

The Synchronet Data directory contains the run-time data created during the normal operation of the BBS.

Examples include:

  - ''mail.*'' - Private email and netmail message base
  - ''spam.hash'' - Database of known-SPAM message body hashes (used by the [[server:Mail]] Server)
  - ''logon.jsonl'' - List of user logons to the [[server:Terminal]] Server (''logon.*.jsonl'' files are previous days logons)
  - ''logon.lst'' - List of user logons to the [[server:Terminal]] Server - //legacy format//
  - ''areas.bbs'' - FidoNet-style message areas (used by [[util:SBBSecho]])
  - ''badareas.lst'' - Unconnected FidoNet-style message areas (used by [[util:SBBSecho]])
  - ''echostats.ini'' - FidoNet-style message area statistics (used by [[util:SBBSecho]])
  - ''sbbslist.json'' - BBS List (used by [[module:sbbslist]])
  - ''*.log'' - Log files created by Synchronet and some utilities (e.g. [[util:SBBSecho]])
  - ''*.now'' - [[config:semfiles|Semaphore files]] used by Synchronet

===== Sub-directories =====

Typical sub-directories of the Data directory include:

==== user ====
Where user data is stored.
   - ''user.tab'' - [[history:newuserbase|user database]]
   - ''name.dat'' - username index
   - ''<user-number>.sig'' - user signature
   - ''<user-number>.*'' - other user data (e.g. settings) file 
   - ''<user-number>.ini'' - user configuration settings (used by JS modules)
   - ''<user-number>.subs'' - user message-scan configuration and pointers
   - ''<user-number>.upload'' - user batch upload queue
   - ''<user-number>.dnload'' - user batch download queue
   - ''<user-number>/*/'' - sub-directories for further per-user data storage

==== subs ====
Synchronet message-base (SMB) files for configured sub-boards ([[util:SCFG]]->Message Areas) reside here.
   - ''<internal-code>.shd'' - message headers
   - ''<internal-code>.sha'' - message header allocation (optional)
   - ''<internal-code>.sid'' - message indexes
   - ''<internal-code>.sdt'' - message data
   - ''<internal-code>.sda'' - message data allocation (optional)
   - ''<internal-code>.sch'' - message CRC history (for duplicate message body text checking)
   - ''<internal-code>.ini'' - message base auxiliary configuration and state information
   - ''<internal-code>.hash'' - message hashes (for indexing and duplicate message ID and body text checking)
   - ''<internal-code>.sfp'' - SBBSecho FidoNet export pointer (old/deprecated style, replaced with ''*.ini'')
   - ''<internal-code>.list.sub'' - Synchronet ListServer subscribers
   - ''<internal-code>.list.ptr'' - Synchronet ListServer export pointer (old/deprecated style, replaced with ''*.ini'')
   - ''<internal-code>.smm'' - Synchronet Match Maker import pointer

==== dirs ====
File transfer directory database files reside here.
   - ''<internal-code>.shd'' - file headers (metadata about files)
   - ''<internal-code>.sha'' - file header allocation
   - ''<internal-code>.sid'' - file indexes (filenames and hash values)
   - ''<internal-code>.sdt'' - file extended descriptions and aux data
   - ''<internal-code>.sda'' - file extended descriptions and aux data allocation
   - ''<internal-code>.ini'' - filebase metadata

==== file ====
This directory contains various file transfer:

  - Pre-packed QWK packets (''<user-number>.qwk'')
  - Uploaded QWK reply packets (''<user-number>.rep'')
  - Files received via QWK reply packet (''<user-number>.in/*'')

==== logs ====
Various dated activity log files are stored in this directory.

==== qnet ====
QWK networking files are stored in this directory.
  - ''<qwk-id>.ptr'' - QWKnet hub export pointer
  - ''<qwk-id>.out/*'' - File to send to QWKnet node or hub
  - ''<qwk-id>.in/*'' - Files received from QWKnet node or hub
  - ''<qwk-id>.avatars.ini'' - Users avatars received from QWKnet node or hub
  - ''<qwk-id>.*.bin'' - Avatar collections received from QWKnet node or hub
  - ''route.dat'' - QWKnet route table
  - ''NODES.DAT'' - QWKnet node list
  - ''USERS.DAT'' - QWKnet user list

==== fido====
FidoNet-style networking files are stored in this directory (''<node>'' is in hexadecimal net/node format).
  - ''<node>.avatars.ini'' - Users avatars received from FidoNet-style node
  - ''<node>.*.bin'' - Avatar collections received from FidoNet-style

==== finger ====
Files placed here can be queried using "special finger requests" to the [[service:finger]] service.

==== msgs ====
Short text messages are stored here:
  - ''<user-number>.msg'' - user-to-user short message (a.k.a. telegram)
  - ''n<node-number>.msg'' - node-to-node short message
  - ''auto.msg'' - system auto-message

==== text ====
Hierarchy and index files utilized for the //text files// BBS subsection.
===== See Also =====

  * [[./index|Directory structure]]

