DriveMaster is a PHP and MariaDB drive inventory, categorisation, move-planning, execution, logging, and undo application for managing large file collections spread across many hard drives.
The app is intended for situations where not all drives are connected at the same time. It scans each drive into a database, lets you categorise files and folders, maps categories to target drives, builds safe move plans, validates/dry-runs those plans, records execution activity, and provides an undo workflow based on logged operations.
- Keep a database inventory of many drives.
- Work through uncategorised files/folders one drive at a time.
- Assign categories manually or through rules.
- Map categories to target drives.
- Identify safe move candidates.
- Avoid moving conflicted, ignored, missing, or unsafe items.
- Support dry-run and simulation before actual file moves.
- Track execution activity with user IDs and operation logs.
- Support undo from logged move jobs.
- Support a practical workflow where different drives are connected at different times.
- Register and manage drives.
- Store friendly drive names.
- Track drive identity information.
- Review drive status and capacity information.
- Verify connected drives before/after move jobs.
- Recursive file/folder scanning.
- Scan run history through jobs.
- File and folder inventory stored in MariaDB.
- Browser-based file explorer.
- File search by text, drive, type, extension, path, size, modified date, and category.
- Category badges shown in file/folder views.
- Manage ignored folder names.
- Exclude ignored folders from normal file/category/planning views where supported.
- Useful for metadata/cache/system folders such as NAS-generated folders.
- Create and manage categories.
- Assign colours to categories.
- Manually assign files/folders to categories.
- Folder assignments cover folder contents.
- Create category rules based on extension, folder path, path contains, or name contains.
- Preview category matches before planning moves.
- Browse one drive at a time.
- Switch between uncategorised and categorised views.
- Assign categories by right-clicking files/folders.
- Review category progress with status and summary pages.
- Use category colours/badges consistently across inventory views.
- Detect items that match more than one category.
- Review active and accepted conflicts.
- Exclude active conflicts from automated move planning.
- Accept known/intentional conflicts when required.
- Map each category to one or more target drives.
- Use category/drive usage reports to see where data currently lives.
- Planner uses category + target-drive mapping to decide whether a file should move.
- Readiness checks before planning.
- Safe candidate list.
- Plan Builder for saved move-plan snapshots.
- Saved plans can be validated, dry-run, and prepared for execution.
- Planning is database-driven and does not move files by itself.
- Dry-run checks required files, paths, source drives, and target drives before execution.
- Supports workflows where only some drives are connected at a time.
- Execution records can be prepared before actual moves.
- Simulation mode runs the execution path without moving files.
- Actual moves require explicit enabling and confirmation.
- Drive verification should be run before swapping/disconnecting drives.
- Operation log records move/undo activity.
- Execution runs are tracked.
- Undo is based on logged operation runs.
- Undo supports dry-run before execution.
- If files/drives differ, undo should report what cannot be safely reversed and only continue with verified safe work.
- User accounts with admin/user roles.
- Login/logout flow.
- Admin user-management page.
- Edit user page for username/display-name/password updates.
- Default admin protections.
- Activity tracking uses stable user IDs rather than usernames.
- Configure ignored folders.
- Register and scan each drive.
- Review scanned inventory in the file explorer.
- Create categories and colours.
- Assign categories manually from Category Status.
- Add rules only where they are safe and predictable.
- Preview category matching.
- Resolve or accept category conflicts.
- Assign category target drives.
- Check planner readiness.
- Review move candidates.
- Build a saved move plan.
- Validate the plan.
- Run a dry-run.
- Connect/verify required drives.
- Prepare execution records.
- Run simulation.
- Enable actual moves only when ready.
- Execute available safe work.
- Verify changed drives before swapping/disconnecting.
- Use undo from logged runs if needed.
DriveMaster is designed to support multi-drive workflows where source and target drives may not all be online at once.
- Build and validate the move plan.
- Run the dry-run report.
- Note which source/target drives are required.
- Connect a required source/target drive pair or group.
- Verify the connected drives.
- Execute only the safe available work.
- Verify changes before disconnecting drives.
- Swap to the next required drive group.
- Continue until the execution run is complete.
DriveMaster should not blindly move files. The move process is designed around safety checks:
- Ignored folders are excluded from normal planning logic.
- Missing files are excluded.
- Items with multiple category matches are conflicts.
- Conflicted items are excluded unless accepted where appropriate.
- Categories must have target drives before they can produce move candidates.
- Files already on the correct target drive are not move candidates.
- Dry-run and simulation should happen before actual moves.
- Database inventory should be updated after successful move/undo operations.
- Drives should be verified before and after each execution batch.
- PHP 8.2 or newer
- MariaDB 10.x or newer
- PHP extensions:
- pdo_mysql
- json
- mbstring
- Create a MariaDB database.
- Import
database/schema.sql. - Apply any files in
database/migrations/that are not already included in the schema. - Copy
config/config.example.phptoconfig/config.php. - Edit database credentials in
config/config.php. - Point the web server document root at
public/. - Open the app in a browser.
- Create the first admin user from
users.phpif no users exist yet.
Run the scanner with a drive path, friendly name, and optional serial number.
php bin/scan-drive.php --path=/path/to/drive --name="Drive 01" --serial="SERIAL123"If no serial number is supplied, DriveMaster creates a fallback identity from the scan path and drive size. That is useful for development, but proper hardware serial detection should be used before relying on it for production inventory.
index.php- dashboard/homedrives.php- drive managementscan.php- queue scansjobs.php- background job history/statusfiles.php- file/folder explorer and searchignored-folders.php- ignored folder ruleserrors.php- error listhealth.php- health checkshelp.php- in-app usage guide
categories.php- category/rule managementcategory-status.php- categorised/uncategorised status browsercategory-status-summary.php- category progress summarycategory-targets.php- category target drivescategory-preview.php- category match previewcategory-coverage.php- category coverage reportcategory-conflicts.php- conflict reviewcategory-drive-usage.php- category usage by drive
planning-dashboard.php- planning overviewplanner-readiness.php- readiness checksmove-candidates.php- safe move candidatesplan-builder.php- build saved move plansmove-plans.php- saved plansmove-executions.php- execution runsoperation-log.php- operation/audit logundo.php- undo workflowdrive-verify.php- drive verificationmove-execution-settings.php- execution safety settingsplanning-maintenance.php- maintenance tools
users.php- user managementuser-edit.php- edit user details/access valuelogin.php- loginlogout.php- logout
bin/- command-line toolsconfig/- configuration filesdatabase/- schema and migrationspublic/- browser UI and web endpointssrc/- PHP application code
This project is actively evolving. Some older pages may overlap with newer workflows while the application is being consolidated. The Help page inside the app should be treated as the current operational guide for normal use.
Before using actual file moves on important data, test the full process on a small disposable folder/drive set:
- Scan.
- Categorise.
- Assign a target.
- Build a plan.
- Dry-run.
- Simulate.
- Execute.
- Verify.
- Undo.
- Verify again.