idun/Readme.md

63 lines
2.3 KiB
Markdown
Raw Normal View History

2023-10-12 08:20:53 +00:00
# Idun
![Image of Idum](Idun.jpg)
A small CLI Tool to clean Backups from different Sources. Based on Rules Idun delete Backup files that are older but keep 1 per hour, per day, per weak or month.
## Buckets
Based on the age of a Backup the Backups will be sorted in one Bucket and based on the Rules of that Bucket will be deleted or keep the Backup.
### Unlimit Bucket (config per Hour)
Keep every Backup
You can configure that for the first X Hour of a Backup livetime. The number of hours is the **minimum** Hours Idun keep the Backups
### Hourly Bucket (config per Hour)
Will keep one Backup per Hour. One Hour is from Min 0 to Min 59, it will keep the olders Backup. If you make Backups at XX:00, XX:15, XX:30 and XX:45 it will keep the Backup at XX:45.
### Daily Backup (config per Day)
2023-10-12 09:29:49 +00:00
Will keep one Backup per Day. One Day is from 00:00:00 UTC to 23:59:59, it also will keep the olders Backup, tha backup closed to 23:59:59 will stay, all newer Backup at that day will be removed.
2023-10-12 08:20:53 +00:00
### Weekly Backup (config per Month)buc
### Monthly Backups (config per Month)
### Delete All
Delete all Backups in this Bucket, used at the end to remove all really old (based on the rules) backups
## Config
## Usage
### Show Plan
You can see the Plan to check if the config is what you are expected.
```
idun plan -job abc2
```
The job argument is optional and can be used to show just the plan of on job based on the "name" in the config.
### Dry-Run
Show all fieles
```
idun dry-run -job abc2
```
2023-10-12 09:29:49 +00:00
The job argument is optional and can be used to show just the plan of on job based on the "name" in the config.
2023-10-12 08:20:53 +00:00
### Execute
2023-10-12 09:29:49 +00:00
Execute the deletion, will ask before deleting the files
```
idun execute -job abc2
```
The job argument is optional and can be used to show just the plan of on job based on the "name" in the config.
2023-10-12 08:20:53 +00:00
2023-10-12 09:29:49 +00:00
### Cron run
2023-10-12 08:20:53 +00:00
## FAQ
### Why minimum Hour/Day/Month
If you configure to keep one backup per hour for 12 hours Idun will make sure there will be hourly backups for at least 12 hours. But based on the rules of the next Buckets, which is per Day from 00:00:00 UTC to 23:59:59 UTC there may be a gap between the end hour of the "Hourly Bucket" and the beginn of the "Daily Bucket", in this case Iduna will not delete the Backup files. So ther will be up to 35 Hours Hourly Backups.