10 Commits
Author SHA1 Message Date
wt f854cbace5 added more tests
Go Build and Test / build-and-test (push) Successful in 25s
2025-08-12 16:55:55 +07:00
wt bca550374f added serve_test.go
Go Build and Test / build-and-test (push) Successful in 26s
2025-08-12 16:25:07 +07:00
wt a1681ab58a Улучшение обработки путей и добавление списка файлов
Go Build and Test / build-and-test (push) Successful in 29s
- Заменена filepath.Ext() на strings.HasSuffix() для корректной проверки
расширений - Оптимизирована логика проверки исключаемых путей: - Упрощён
pattern matching - Добавлена явная проверка префиксов путей - Улучшена
обработка базовых имён файлов - Добавлен новый endpoint GET /backup: -
Возвращает JSON-список файлов в директории бэкапов - Реализована
фильтрация директорий
2025-08-12 16:17:43 +07:00
wt 4639779116 feat: add exclude pattern support for directory backups
- Added --exclude flag to allow excluding files/directories from backups
- Implemented pattern-based exclusion logic for directory backups -
Modified size calculation to account for excluded items - Updated
progress tracking to reflect excluded content - Added helper function
for path exclusion checks - Ensured consistent exclusion handling across
size calculation and backup

Key changes: 1. Added excludePatterns variable and flag binding 2.
Updated getPathSize to skip excluded paths 3. Implemented
shouldExcludePath with multiple matching strategies: - Full path
matching - Prefix matching for directories - Glob pattern matching -
Base name matching 4. Integrated exclusion checks in backupDirectory 5.
Propagated excludePatterns through initialModel 6. Maintained progress
accuracy by adjusting total size calculation

The new functionality allows users to specify exclusion patterns:
backup-tool create -s /data -t backup.tar.gz -e "*.tmp" -e "cache/"
2025-08-12 14:07:05 +07:00
wt 6b1a302c18 feat: Implement full network functionality with HTTP and P2P modes
Go Build and Test / build-and-test (pull_request) Successful in 37s
This major update introduces a robust, multi-faceted networking
capability, allowing backups to be managed through a central server or
via direct peer-to-peer connections.

- **Add `serve` command**: Implemented a new `serve` command that runs a
persistent HTTP server. This allows for a centralized backup management
workflow where multiple clients can upload and download archives. -
**HTTP Client Mode**: The `create` and `restore` commands can now
function as HTTP clients, targeting a `serve` instance using the
`ip:port/filename` address format.

- **Restore P2P Mode**: The original peer-to-peer streaming
functionality (where `restore` acts as a TCP server and `create` as a
client) has been fully restored and integrated into the new, more robust
command architecture. - **Accurate Network Progress**: Fixed a critical
bug where network progress bars would not display correctly. The `serve`
command now sends a `Content-Length` header, and `restore` is refactored
to handle asynchronous state updates correctly. - **Smart Address
Parsing**: The application now automatically distinguishes between HTTP
mode (`ip:port/filename`) and P2P mode (`ip:port`), providing a seamless
user experience.

- **Update `README.md`**: The project's README has been completely
rewritten to document all three operating modes (Local, HTTP Server,
P2P) with clear usage examples. - **Add Gitea Actions Workflow**: A new
CI pipeline (`.gitea/workflows/build-and-test.yml`) has been added to
automatically build and test the application on every push and pull
request.
2025-08-03 10:46:14 +07:00
wt 668721ab58 added README.md and LICENSE files 2025-08-02 17:43:11 +07:00
wt 1e3cc446e0 added live time network backup and restore 2025-08-02 17:34:26 +07:00
wt 3bef3f76e9 updated create,restore commands for backup directory and added utils.go
file
2025-08-02 16:58:12 +07:00
wt 7df9eeb8eb added backup directory to command create 2025-08-02 12:58:48 +07:00
wt 91d4989531 initial commit 2025-08-02 12:51:53 +07:00