Skip to main content

Simple Backup

Простой инструмент для создания и восстановления бэкапов проектов в YAML формате.

Установка

pip install simple-backup

Важно: После установки используйте команду simple-backup, а НЕ python -m simple-backup!

Использование

После установки пакета доступна команда simple-backup (НЕ python -m simple-backup).

Создание бэкапа

# Создать бэкап текущей директории
simple-backup create backup.yml

# Создать бэкап конкретной директории
simple-backup create backup.yml --path /path/to/project

# Подробный вывод
simple-backup create backup.yml --verbose

Восстановление из бэкапа

# Восстановить проект
simple-backup restore backup.yml /path/to/restore

# Предварительный просмотр
simple-backup restore backup.yml /path/to/restore --preview

# Принудительная перезапись
simple-backup restore backup.yml /path/to/restore --force

# Мягкая перезапись (без удаления директорий)
simple-backup restore backup.yml /path/to/restore --overwrite

Примеры использования

Создание бэкапа проекта

cd /path/to/your/project
simple-backup create project_backup.yml

Перенос на другой компьютер

  1. Скопируйте project_backup.yml на другой компьютер
  2. Установите simple-backup: pip install simple-backup
  3. Восстановите проект: simple-backup restore project_backup.yml /mnt/data/project_folder

Поддерживаемые файлы

  • .py - Python файлы
  • .md - Markdown файлы
  • .yml, .yaml - YAML файлы
  • .txt - Текстовые файлы
  • .json - JSON файлы
  • .toml - TOML файлы
  • .cfg, .ini - Конфигурационные файлы

Исключаемые директории

  • .venv, __pycache__, .git
  • node_modules, .pytest_cache, .mypy_cache
  • build, dist
  • Все директории, начинающиеся с .

Особенности

  • ✅ Поддержка различных кодировок (UTF-8, CP1251, Latin-1)
  • ✅ Сохранение метаданных (размер файлов, дата изменения)
  • ✅ Прогресс-бары для длительных операций
  • ✅ Цветной вывод и эмодзи для лучшего UX
  • ✅ Предварительный просмотр перед восстановлением
  • ✅ Безопасная обработка ошибок
  • ✅ Мягкая перезапись файлов без удаления директорий

Требования

  • Python 3.9+
  • PyYAML
  • Click

Разработка

Установка для разработки

git clone https://github.com/yourusername/simple-backup.git
cd simple-backup
pip install -e .

Тестирование

# Локальное тестирование
simple-backup create test_backup.yml
simple-backup restore test_backup.yml test_restore

# Запуск тестов
pytest

CI/CD

Проект использует GitHub Actions для автоматической сборки и публикации:

  • CI: Автоматическое тестирование на Python 3.9-3.12
  • Release: Автоматическая публикация на PyPI при создании релиза
  • Auto Release: Публикация при создании тега v*

Создание релиза

  1. Обновите версию в pyproject.toml
  2. Создайте тег: git tag v0.1.0 && git push origin v0.1.0
  3. GitHub Actions автоматически опубликует пакет на PyPI

Новый способ (без API токенов): Настройте PyPI Trusted Publishers в настройках PyPI → Trusted Publishers

Подробные инструкции в .github/RELEASE_SETUP.md

Лицензия

MIT License

Metadata

Release files for simple-backup 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-backup 0.1.8
File Size Uploaded Provenance Actions
simple_backup-0.1.8.tar.gz 8.7 kB With provenance Details for simple_backup-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simple-backup 0.1.8
File Interpreter ABI Platform Actions
simple_backup-0.1.8-py3-none-any.whl Python 3 none any Details for simple_backup-0.1.8-py3-none-any.whl

Total release size: 15.6 kB

Release files / simple_backup-0.1.8.tar.gz

Download URL simple_backup-0.1.8.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f6ac07b65f5a4057c73ffa7a65d29d86dfa43d0e397de7f6e8c20e3e8b3baef8
BLAKE2b-256 checksum
How to use checksums
c3a348340ab965760d54a9152e9f23b659ee6dc3aa06d8a8148847cc5a213273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2025.

Transparency log

Release files / simple_backup-0.1.8-py3-none-any.whl

Download URL simple_backup-0.1.8-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59bc8a393f81ba7830ed08fa76e7a41cfea51df27732d78aed3bc2a1f48c9f88
BLAKE2b-256 checksum
How to use checksums
ae7f86509e05584211e834dd57a3b9e2f8630781c6189f1ade1933ad35403cd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2025.

Transparency log

Security for simple-backup 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for simple_backup-0.1.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page