AutoBackups/.docs/README.md

72 lines
2.8 KiB
Markdown

# AutoBackups Project
## Overview
AutoBackups is a Python application designed to automate the backup of Simatic S7 projects and other user-defined directories. The application leverages the Everything API to efficiently locate files and manage backups based on user-defined configurations.
## Features
- Monitors specified directories for Simatic S7 files (*.s7p) and other user-defined directories.
- Automatically compresses and backs up projects on a configurable schedule (daily, hourly, 3-hour, 7-hour intervals, startup, or manual).
- Supports manual backup triggers.
- Skips projects with files in use and retries after one hour.
- Maintains a two-stage hash system: first checking *.s7p files, then all files to avoid unnecessary backups.
- User-friendly web interface built with Flask for configuration and status monitoring.
- Comprehensive logging system with timestamped log files.
## Project Structure
```
autobackups
├── .logs/ # Application logs with startup timestamps
├── src
│ ├── app.py # Main entry point of the Flask application
│ ├── models
│ │ └── __init__.py # Data models for configuration and directories
│ ├── routes
│ │ └── __init__.py # API routes for backup operations
│ ├── services
│ │ └── __init__.py # Business logic for backups
│ └── utils
│ └── __init__.py # Utility functions for hashing and file access
├── static
│ ├── css # CSS files for styling
│ └── js # JavaScript files for client-side functionality
├── templates
│ └── index.html # Main HTML template for the web interface
├── config.json # Global configuration settings for the application
├── projects.json # Per-project configuration, schedules, and hash storage
├── requirements.txt # Python dependencies
└── README.md # Project documentation
```
## Installation
1. Clone the repository:
```
git clone <repository-url>
cd autobackups
```
2. Create a Miniconda environment:
```
conda create --name autobackups python=3.12
conda activate autobackups
```
3. Install the required packages:
```
pip install -r requirements.txt
```
4. Configure the application by editing `config.json` to specify directories to monitor and backup settings.
## Usage
- Start the Flask application:
```
python src/app.py
```
- Access the web interface at `http://localhost:5000` to configure settings and monitor backup statuses.
## Contributing
Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bug fixes.
## License
This project is licensed under the MIT License. See the LICENSE file for details.