A secure backup solution for files and directories with optional encryption.
- Simple Backup: Easy-to-use backup functionality for files and directories
- Encryption: Optional AES encryption for secure backups
- CLI Interface: Command-line tool for quick backups and restores
- Python API: Programmatic access to backup functionality
Requirements:
- Python 3.13 or higher
- Poetry
-
Clone the repository:
git clone <repository-url> cd ssbng
-
Install dependencies and the package:
poetry install
-
Activate the virtual environment:
poetry shell
pip install .The ssb command provides a simple interface for backup operations:
# Basic backup
ssb backup /path/to/source /path/to/backup/dir
# Encrypted backup
ssb backup /path/to/source /path/to/backup/dir --encrypt
# Named backup
ssb backup /path/to/source /path/to/backup/dir --name my_backup
# With password
ssb backup /path/to/source /path/to/backup/dir --encrypt --password mypasswordssb list-backups /path/to/backup/dirssb restore backup_name /path/to/backup/dir /path/to/restore/dirssb --help
ssb backup --help
ssb restore --help
ssb list-backups --helpfrom ssb import BackupManager, EncryptionManager
# Create a backup manager
backup_manager = BackupManager("/path/to/backup/dir")
# Create a simple backup
backup_path = backup_manager.create_backup("/path/to/source")
# Create an encrypted backup
encryption_manager = EncryptionManager.from_password("my_password")
backup_manager = BackupManager("/path/to/backup/dir", encryption_manager)
backup_path = backup_manager.create_backup("/path/to/source")
# List backups
backups = backup_manager.list_backups()
# Restore a backup
restored_path = backup_manager.restore_backup("backup_name", "/path/to/restore")Requirements:
- Python 3.13 or higher
-
Install Poetry if you haven't already:
curl -sSL https://install.python-poetry.org | python3 - -
Install dependencies:
poetry install
-
Activate the virtual environment:
poetry shell
pytestblack .mypy ssbng/This project is licensed under the MIT License - see the LICENSE file for details.