Flag to avoid backing up long-stopped containers

Đang mở
#94 14 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, docker-compose, go
Lĩnh vực
backend, devops

Hướng nghiên cứu

Start by reading the backup scheduling and container inspection code, then trace how backup timestamps are recorded and used. The issue suggests comparing Docker's StartedAt and FinishedAt values with the latest backup date; done means a configuration or container-label flag can skip backups for stopped containers unchanged since that backup. The issue does not name specific files or tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement pr welcome

It would be nice to be able to add a flag (either in the config or in the container labels) to avoid making a backup if the container is stopped AND it was last stopped before the latest backup.

My use case is this: I have a game server container that I start on demand. There may be periods on which it'll be used almost every day and periods of months when it will be permanently stopped. I would like to run backups only when there are actual changes to the state of the container. When used in conjunction with backup pruning this also avoids having N backups of the same exact thing and allows to keep the last N states.

By running docker inspect I found that there are the StartedAt and FinishedAt properties, so it should be relatively easy to pull this info up and compare it with the last backup date.

Ngôn ngữ chính
Go
Star
4.1k
Fork
157
Merge trung bình
4 giờ 35 phút
Pull request đã merge (30 ngày)
15

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của offen/docker-volume-backup

Tất cả issue của offen/docker-volume-backup

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.