It is only for my personal use. I wanted to check how good Cursor Tab would be in helping me to learn Scala ZIO library.
Also, I have a lot of databases and I need to rotate backups for each of them. So it is kind of useful.
The pattern must match the whole name of the backup file.
Date fragment of the pattern must represent a valid date so it can be parsed using java.time.format.DateTimeFormatter#ISO_LOCAL_DATE.
The configuration requires endpoint url to be set. Regions are not supported yet.
I have tested it only with my local Minio service and not with AWS S3.
run --dry-run --profile default --bucket service-backup --prefix backup.daily --days 3 --pattern service_db(?<date>\\d{4}-\\d{2}-\\d{2})\\.zipsbt "Universal / packageBin"Unpack the package target/universal/s3_backup_rotation-0.1.0-SNAPSHOT.zip and run the app:
./s3_backup_rotation-0.1.0-SNAPSHOT/bin/s3_backup_rotation --dry-run --profile default --bucket service-backup --prefix backup.daily --days 3 --months 1 --pattern service_db(?<date>\\d{4}-\\d{2}-\\d{2})\\.zip