mirror of
https://github.com/restic/restic.git
synced 2025-12-15 18:12:25 +00:00
cache: Print message when new cache is created
Sometimes, users run restic without retaining the local cache directories. This was reported several times in the past. Restic will now print a message whenever a new cache directory is created from scratch (i.e. it did not exist before), so users have a chance to recognize when the cache is not kept between different runs of restic.
This commit is contained in:
@@ -376,6 +376,10 @@ func OpenRepository(opts GlobalOptions) (*repository.Repository, error) {
|
||||
return s, nil
|
||||
}
|
||||
|
||||
if c.Created && !opts.JSON {
|
||||
Verbosef("created new cache in %v\n", c.Base)
|
||||
}
|
||||
|
||||
// start using the cache
|
||||
s.UseCache(c)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user