This project aims to develop a Rust application for PCs that allows users to perform backups even when the screen is not operable. The application facilitates backups to an external drive (i.e., USB flash drive) using specific mouse commands. It is designed to run in the background with minimal CPU usage.
- Command 1: Draw a rectangle along the screen edges.
- Command 2: Trace a "-" on the screen.
Detects mouse movements, identifies Command and sends signals for Command 1 or Command 2.
Logs CPU usage every 2 minutes.
Processes the command received and if the sequence is correct starts the backup procedure.
Checks the files-to-save size and the available space in the USB devices detected. If possible, does the backup.
In the main() function of our application happens the channel and threads initialization.
To deploy the application the user will have an installer.
Automatic Startup: The installer will configure the program to run at system startup.
Emergency Backup Initializer: The user will have the possibility to configure the backup by:
- Choosing root folder for the backup[Browse].
- Selecting "Entire folder content" or a "Specific file type".
- LoggerTest: Ensures CPU usage is logged correctly.
- ProcessorTest: Validates proper handling of commands and initiation of the backup process.
- DetectorTest: Confirms accurate detection and differentiation of mouse movements for commands.
- BackupTest: Ensures the backup process executes correctly, handling different scenarios.
- ApplicationTest: Ensures all components work together, with correct backup execution and logging, as well as proper CPU usage recording during background execution.
- Initiating Backup:
- Draw a rectangle along the screen edges (Command 1).
- Confirm with a "-" sign on the screen (Command 2).
- Backup Activation: Wait for the confirmation window and sound alert.
- Backup Completion: Check the content of the USB.
- CPU Usage Log: Recorded every 2 minutes in a log file.
- Backup Log: Created on the USB drive post-backup, detailing data size and CPU time.