69 lines
2.5 KiB
Markdown
69 lines
2.5 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 defined schedule (daily by default).
|
|
- Supports manual backup triggers.
|
|
- Skips projects with files in use and retries after one hour.
|
|
- Maintains a hash of file timestamps to avoid unnecessary backups.
|
|
- User-friendly web interface built with Flask and React for configuration and status monitoring.
|
|
|
|
## Project Structure
|
|
```
|
|
autobackups
|
|
├── 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 # Configuration settings for the application
|
|
├── 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. |