diff --git a/borg/archive.py b/borg/archive.py index 2829769f2..ba06850c5 100644 --- a/borg/archive.py +++ b/borg/archive.py @@ -503,7 +503,10 @@ Number of files: {0.stats.nfiles} else: self.hard_links[st.st_ino, st.st_dev] = safe_path path_hash = self.key.id_hash(os.path.join(self.cwd, path).encode('utf-8', 'surrogateescape')) + first_run = not cache.files ids = cache.file_known_and_unchanged(path_hash, st) + if first_run: + logger.info('processing files') chunks = None if ids is not None: # Make sure all ids are available diff --git a/borg/cache.py b/borg/cache.py index e793f0f5d..3fab7cef2 100644 --- a/borg/cache.py +++ b/borg/cache.py @@ -48,6 +48,7 @@ class Cache: self.manifest = manifest self.path = path or os.path.join(get_cache_dir(), hexlify(repository.id).decode('ascii')) self.do_files = do_files + logger.info('initializing cache') # Warn user before sending data to a never seen before unencrypted repository if not os.path.exists(self.path): if warn_if_unencrypted and isinstance(key, PlaintextKey): @@ -69,6 +70,7 @@ class Cache: # Make sure an encrypted repository has not been swapped for an unencrypted repository if self.key_type is not None and self.key_type != str(key.TYPE): raise self.EncryptionMethodMismatch() + logger.info('synchronizing cache') self.sync() self.commit() @@ -163,6 +165,7 @@ Chunk index: {0.total_unique_chunks:20d} {0.total_chunks:20d}""") def _read_files(self): self.files = {} self._newest_mtime = 0 + logger.info('reading files cache') with open(os.path.join(self.path, 'files'), 'rb') as fd: u = msgpack.Unpacker(use_list=True) while True: