Sign inSign up

cookding/lysosome

By cookding

Updated over 3 years ago

Backup files cleaner.

Image
0

116

cookding/lysosome repository overview

Lysosome

Backup files cleaner.

Cleanup Strategy

User can add multiple cleanup rules

  • If there are backups outside (now + cleanup_range Begin) and (now + cleanup_range End), cleanup will stop.
  • For backups created between (now + duration X_n) and (now + duration Y_n), 1 backup will be kept for each (duration Z_n).
Default
  • For backups created in last 1 day, 1 backup will be kept for each hour.
  • For backups created between last 1 day and last 1 week, 1 backup will be kept for each day.
  • For backups created between last 1 week and last 1 month, 1 backup will be kept for each week.
  • For backups created between last 1 month and last 1 year, 1 backup will be kept for each month.
  • For backups created before last 1 year, every backup will be kept.

Configuration

NameDefaultDescription
DRY_RUNfalseDry run.
CLEANUP_DIR/dataBakcup files folder.
CLEANUP_FILE_PATTERN.+Filename pattern of backup files to manage.
CLEANUP_RANGE1hour,-500yearsMap cleanup range to Begin,End.
CLEANUP_STRATEGY-1hour,-1day,1hour;-1day,-1week,1day;-1week,-1month,1week;-1month,-1year,1monthMap each cleanup rule to string X_n,Y_n,Z_n, then join strings with ;.
GET_CREATED_AT(filename) => fs.statSync(path.join(CLEANUP_DIR, filename)).birthtimeFunction to get file creation time.

Supported time inverval units are year(s), month(s), week(s), day(s), hour(s), minute(s), second(s), and millisecond(s).

Tag summary

Content type

Image

Digest

sha256:110f5978c

Size

341.1 MB

Last updated

over 3 years ago

docker pull cookding/lysosome:2.0.0