Skip to content

Commit

Permalink
📝 Update README with comprehensive feature list and usage details
Browse files Browse the repository at this point in the history
Enhance README documentation for clarity and completeness

- Restructure features section with detailed explanations
- Add sync, restore, list-backups, and config command details
- Expand configuration section with example and options
- Include linting instructions in development section
- Refine contributing guidelines
- Improve overall formatting and readability
  • Loading branch information
hyperb1iss committed Sep 14, 2024
1 parent 4e24cb4 commit 9882970
Showing 1 changed file with 104 additions and 35 deletions.
139 changes: 104 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,32 @@
[![License](https://img.shields.io/badge/license-GPL--3.0-green.svg)](https://opensource.org/licenses/GPL-3.0)
[![Python Version](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/)

*A powerful and flexible remote backup tool for developers and system administrators*
_A powerful and flexible remote backup tool for developers and system administrators_

[Features](#-features)[Installation](#-installation)[Usage](#-usage)[Configuration](#%EF%B8%8F-configuration)[Development](#%EF%B8%8F-development)[Contributing](#-contributing)[License](#-license)

</div>

## ✨ Features

- 🔄 Incremental backups using rsync's `--link-dest` for efficient storage
- 🔐 Secure remote syncing via SSH
- ⏱️ Customizable retention policies for automatic cleanup
- 🧪 Dry-run mode for testing backups without making changes
- 📊 Detailed metadata tracking for each backup
- 🖥️ User-friendly command-line interface powered by Typer
- 🎨 Rich console output for improved readability
- 🔍 Verbose mode for detailed transfer logs
- 🗂️ Multiple source directory support
- 🔁 Automatic latest backup symlink creation
- 🕰️ Version selection for file restores
- 👀 File preview before restoration
- 📊 Diff display to compare file versions
- 🔄 Interactive restore mode for user-friendly file recovery
- 📜 Comprehensive backup listing with detailed information
AeonSync offers a comprehensive set of features for efficient and secure remote backups:

- 🔄 **Incremental Backups**: Utilizes rsync's `--link-dest` for efficient storage management
- 🔐 **Secure Remote Syncing**: Implements SSH for secure data transfer
- ⏱️ **Customizable Retention Policies**: Automatically cleans up old backups based on user-defined policies
- 🧪 **Dry-run Mode**: Test backups without making changes to ensure configuration accuracy
- 📊 **Detailed Metadata Tracking**: Maintains comprehensive metadata for each backup operation
- 🖥️ **User-friendly CLI**: Powered by Typer for an intuitive command-line interface
- 🎨 **Rich Console Output**: Enhances readability with colorized and formatted output
- 🔍 **Verbose Mode**: Provides detailed transfer logs for in-depth analysis
- 🗂️ **Multiple Source Support**: Backup multiple directories in a single operation
- 🔁 **Latest Backup Symlink**: Automatically creates a symlink to the most recent backup
- 🕰️ **Version Selection**: Choose specific versions of files for restoration
- 👀 **File Preview**: View file contents before restoration
- 📊 **Diff Display**: Compare different versions of files
- 🔄 **Interactive Restore**: User-friendly guided process for file recovery
- 📜 **Comprehensive Backup Listing**: Detailed information about all available backups
- ⚙️ **Flexible Configuration**: Easily customizable through command-line options or configuration file

## 💻 Installation

Expand Down Expand Up @@ -74,39 +77,99 @@ aeon list-backups [OPTIONS]
aeon --help
```

### Restore Functionality
### Sync Command

AeonSync offers powerful restore capabilities:
The sync command is used to create backups:

- 🕰️ **Version Selection**: Choose from multiple backup versions of a file.
- 👀 **File Preview**: View file contents before restoring.
- 📊 **Diff Display**: Compare changes between versions.
- 🔄 **Interactive Mode**: User-friendly guided restore process.
```bash
aeon sync [OPTIONS]
```

Options:

To use the interactive restore mode:
- `--remote TEXT`: Remote destination in the format [user@]host:path
- `--source PATH`: Source directories to backup (can be specified multiple times)
- `--retention INTEGER`: Number of days to retain backups
- `--dry-run`: Perform a dry run without making changes
- `--verbose`: Enable verbose output

### Restore Command

The restore command provides powerful functionality for file recovery:

```bash
aeon restore --interactive
aeon restore [OPTIONS] [FILE] [DATE]
```

This will guide you through selecting a backup date, choosing a file, and specifying the restore location.
Options:

- `--output PATH`: Output directory for restored file or directory
- `--interactive`: Use fully interactive mode for restore
- `--diff`: Show diff between local and backup versions
- `--preview`: Show a preview of the file before restoring

### List Backups Command

To view available backups:

```bash
aeon list-backups [OPTIONS]
```

This command displays a detailed list of all backups, including dates, file counts, and total sizes.

### Configuration Command

Manage AeonSync configuration:

```bash
aeon config [OPTIONS]
```

Options:

- `--hostname TEXT`: Set the hostname
- `--remote-address TEXT`: Set the remote address
- `--remote-path TEXT`: Set the remote path
- `--remote-port INTEGER`: Set the remote port
- `--retention-period INTEGER`: Set the retention period in days
- `--add-source-dir TEXT`: Add a source directory
- `--remove-source-dir TEXT`: Remove a source directory
- `--add-exclusion TEXT`: Add an exclusion pattern
- `--remove-exclusion TEXT`: Remove an exclusion pattern
- `--ssh-key TEXT`: Set the SSH key path
- `--verbose`: Set verbose mode
- `--log-file TEXT`: Set the log file path
- `--show`: Show current configuration

## ⚙️ Configuration

AeonSync can be configured using command-line options or by modifying the `config.py` file:
AeonSync can be configured using command-line options or by modifying the configuration file:

- `DEFAULT_REMOTE`: Default remote server for backups
- `DEFAULT_RETENTION_PERIOD`: Default number of days to keep backups
- `DEFAULT_SOURCE_DIRS`: Default directories to back up
- `EXCLUSIONS`: Patterns to exclude from backups
- `hostname`: Hostname for the backup
- `remote_address`: Remote server address
- `remote_path`: Path on the remote server for backups
- `remote_port`: SSH port for the remote server
- `retention_period`: Number of days to keep backups
- `source_dirs`: List of directories to back up
- `exclusions`: Patterns to exclude from backups
- `ssh_key`: Path to SSH key file
- `verbose`: Enable verbose logging
- `log_file`: Path to log file

Example configuration in `config.py`:
Example configuration:

```python
DEFAULT_REMOTE = "[email protected]:/backups"
DEFAULT_RETENTION_PERIOD = 30
DEFAULT_SOURCE_DIRS = ["/home/user", "/var/www"]
EXCLUSIONS = [".cache", "*/node_modules", "*.tmp"]
hostname = "myhost"
remote_address = "[email protected]"
remote_path = "/backups"
remote_port = 22
retention_period = 30
source_dirs = ["/home/user", "/var/www"]
exclusions = [".cache", "*/node_modules", "*.tmp"]
ssh_key = "/home/user/.ssh/id_rsa"
verbose = False
log_file = "/home/user/.local/share/aeonsync/aeonsync.log"
```

## 🛠️ Development
Expand All @@ -128,6 +191,12 @@ To run tests:
pytest
```
To run linting checks:
```bash
poetry run lint
```
## 👥 Contributing
Contributions to AeonSync are welcome! Here's how you can contribute:
Expand Down

0 comments on commit 9882970

Please sign in to comment.