Refactor CLI to use flags instead of positional arguments

- Change all commands to use flags (--bucket, --prefix, etc.)
- Add --config flag to backup command
- Support VAULTIK_CONFIG environment variable for config path
- Use /etc/vaultik/config.yml as default config location
- Add test/config.yaml for testing
- Update tests to use environment variable for config path
- Add .gitignore for build artifacts and local configs
- Update documentation to reflect new CLI syntax
This commit is contained in:
2025-07-20 09:45:24 +02:00
parent 3e8b98dec6
commit bcbc186286
11 changed files with 207 additions and 59 deletions

27
test/config.yaml Normal file
View File

@@ -0,0 +1,27 @@
age_recipient: age1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
source_dirs:
- /tmp/vaultik-test-source
- /var/test/data
exclude:
- '*.log'
- '*.tmp'
- '.git'
- 'node_modules'
s3:
endpoint: https://s3.example.com
bucket: vaultik-test-bucket
prefix: test-host/
access_key_id: test-access-key
secret_access_key: test-secret-key
region: us-east-1
use_ssl: true
part_size: 5242880 # 5MB
backup_interval: 1h
full_scan_interval: 24h
min_time_between_run: 15m
index_path: /tmp/vaultik-test.sqlite
chunk_size: 10485760 # 10MB
blob_size_limit: 10737418240 # 10GB
index_prefix: index/
compression_level: 3
hostname: test-host