Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old cache directories #1436

Merged
merged 5 commits into from
Nov 27, 2017
Merged

Remove old cache directories #1436

merged 5 commits into from
Nov 27, 2017

Conversation

fd0
Copy link
Member

@fd0 fd0 commented Nov 20, 2017

This PR adds code which warns the user when old cache directories are present. A cache directory is old if the modification timestamp is older than 30 days. Users can then use the new cache command with --cleanup, which will remove all old directories.

When a cache directory is used, the modification timestamp is set to the current time and date so that it isn't in the list of old directories.

Closes #1318

@codecov-io
Copy link

codecov-io commented Nov 20, 2017

Codecov Report

Merging #1436 into master will decrease coverage by 0.2%.
The diff coverage is 18.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1436      +/-   ##
==========================================
- Coverage   51.12%   50.92%   -0.21%     
==========================================
  Files         136      136              
  Lines       13612    13735     +123     
==========================================
+ Hits         6959     6994      +35     
- Misses       5800     5884      +84     
- Partials      853      857       +4
Impacted Files Coverage Δ
internal/fs/file.go 0% <0%> (ø) ⬆️
internal/cache/cache.go 25.22% <13.51%> (-4.65%) ⬇️
cmd/restic/global.go 21.09% <26.08%> (-0.64%) ⬇️
internal/cache/dir.go 6.66% <28.57%> (+6.66%) ⬆️
cmd/restic/lock.go 52.5% <0%> (-5%) ⬇️
cmd/restic/exclude.go 27.71% <0%> (-3.02%) ⬇️
internal/backend/s3/config.go 74.41% <0%> (-2.86%) ⬇️
cmd/restic/cleanup.go 34.78% <0%> (-2.72%) ⬇️
internal/backend/b2/b2.go 77.36% <0%> (-2.04%) ⬇️
cmd/restic/cmd_backup.go 26.72% <0%> (-0.87%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06bd606...fe557b0. Read the comment docs.

@fd0 fd0 merged commit fe557b0 into master Nov 27, 2017
fd0 added a commit that referenced this pull request Nov 27, 2017
@fd0 fd0 deleted the remove-old-cache branch November 27, 2017 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants