Ingest Files
File ingestion in surveilr
imports and processes files from a file system into a structured database for monitoring and analysis. This process is called walking the filesystem.
In essence, it involves scanning directories and files, then transferring their metadata and content into an RSSD.
Preparing for Ingestion
Before initiating the ingestion process, it’s crucial to understand what files and directories will be processed. surveilr
provides a powerful feature called --dry-run
to simulate this process without making any changes. This step is essential for ensuring that only the desired files and directories are ingested into the target RSSD.
Example
Setting Up The RSSD
surveilr
uses a default SQLite database named resource-surveillance.sqlite.db
for storing file system state data. However, in environments with multiple surveillance databases, it’s beneficial to distinguish each RSSD
by including unique identifiers in the filename, such as the hostname. This setup facilitates the merging of databases with the surveilr admin merge-sql
command.
Performing File Ingestions
With surveilr
, you can easily ingest files from the current working directory or any specified directories. This section covers the commands to perform these ingestions, including how to display statistics about the ingested data.
For a file tree represented below:
Examples