diff --git a/src/storage/repo-storage.cpp b/src/storage/repo-storage.cpp
index 334b4d3..6029a05 100644
--- a/src/storage/repo-storage.cpp
+++ b/src/storage/repo-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2019, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -22,6 +22,7 @@
 
 #include <istream>
 
+#include <ndn-cxx/util/exception.hpp>
 #include <ndn-cxx/util/logger.hpp>
 
 namespace repo {
@@ -33,6 +34,14 @@
 {
 }
 
+void
+RepoStorage::notifyAboutExistingData()
+{
+  m_storage.forEach([this] (const Name& name) {
+      afterDataInsertion(name);
+    });
+}
+
 bool
 RepoStorage::insertData(const Data& data)
 {
diff --git a/src/storage/repo-storage.hpp b/src/storage/repo-storage.hpp
index 5934b12..fe355ad 100644
--- a/src/storage/repo-storage.hpp
+++ b/src/storage/repo-storage.hpp
@@ -47,9 +47,18 @@
   };
 
 public:
+  explicit
   RepoStorage(Storage& store);
 
   /**
+   * @brief Notify about existing data
+   *
+   * Note, this cannot be in constructor, as have to be called after signal is connected
+   */
+  void
+  notifyAboutExistingData();
+
+  /**
    *  @brief  insert data into repo
    */
   bool
diff --git a/src/storage/sqlite-storage.cpp b/src/storage/sqlite-storage.cpp
index 91016ea..a9627ff 100644
--- a/src/storage/sqlite-storage.cpp
+++ b/src/storage/sqlite-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2019, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -44,7 +44,7 @@
     boost::filesystem::file_status fsPathStatus = boost::filesystem::status(fsPath);
     if (!boost::filesystem::is_directory(fsPathStatus)) {
       if (!boost::filesystem::create_directory(boost::filesystem::path(fsPath))) {
-        BOOST_THROW_EXCEPTION(Error("Folder '" + dbPath + "' does not exists and cannot be created"));
+        NDN_THROW(Error("Folder '" + dbPath + "' does not exists and cannot be created"));
       }
     }
 
@@ -75,7 +75,7 @@
   }
   else {
     NDN_LOG_DEBUG("Database file open failure rc:" << rc);
-    BOOST_THROW_EXCEPTION(Error("Database file open failure"));
+    NDN_THROW(Error("Database file open failure"));
   }
 
   // SQLite continues without syncing as soon as it has handed data off to the operating system
@@ -112,13 +112,13 @@
     rc = stmt.step();
     if (rc == SQLITE_CONSTRAINT) {
       NDN_LOG_DEBUG("Insert failed");
-      BOOST_THROW_EXCEPTION(Error("Insert failed"));
+      NDN_THROW(Error("Insert failed"));
     }
     sqlite3_reset(stmt);
     id = sqlite3_last_insert_rowid(m_db);
   }
   else {
-    BOOST_THROW_EXCEPTION(Error("Some error with insert"));
+    NDN_THROW(Error("Some error with insert"));
   }
   return id;
 }
@@ -136,7 +136,7 @@
     int rc = stmt.step();
     if (rc != SQLITE_DONE && rc != SQLITE_ROW) {
       NDN_LOG_DEBUG("Node delete error rc:" << rc);
-      BOOST_THROW_EXCEPTION(Error("Node delete error"));
+      NDN_THROW(Error("Node delete error"));
     }
     if (sqlite3_changes(m_db) != 1) {
       return false;
@@ -144,7 +144,7 @@
   }
   else {
     NDN_LOG_DEBUG("delete bind error");
-    BOOST_THROW_EXCEPTION(Error("delete bind error"));
+    NDN_THROW(Error("delete bind error"));
   }
   return true;
 }
@@ -218,16 +218,43 @@
     }
     else {
       NDN_LOG_DEBUG("Database query failure rc:" << rc);
-      BOOST_THROW_EXCEPTION(Error("Database query failure"));
+      NDN_THROW(Error("Database query failure"));
     }
   }
   else {
     NDN_LOG_DEBUG("select bind error");
-    BOOST_THROW_EXCEPTION(Error("select bind error"));
+    NDN_THROW(Error("select bind error"));
   }
   return nullptr;
 }
 
+void
+SqliteStorage::forEach(const std::function<void(const Name&)>& f)
+{
+  ndn::util::Sqlite3Statement stmt(m_db, "SELECT data FROM NDN_REPO_V2;");
+
+  while (true) {
+    int rc = stmt.step();
+    if (rc == SQLITE_ROW) {
+      Data data;
+      try {
+        data.wireDecode(stmt.getBlock(0));
+      }
+      catch (const ndn::Block::Error& error) {
+        NDN_LOG_DEBUG("Error while decoding data from the database: " << error.what());
+        continue;
+      }
+      f(data.getName());
+    }
+    else if (rc == SQLITE_DONE) {
+      break;
+    }
+    else {
+      NDN_THROW(Error("Database query failure (code: " + ndn::to_string(rc)));
+    }
+  }
+}
+
 uint64_t
 SqliteStorage::size()
 {
@@ -236,7 +263,7 @@
   int rc = stmt.step();
   if (rc != SQLITE_ROW) {
     NDN_LOG_DEBUG("Database query failure rc:" << rc);
-    BOOST_THROW_EXCEPTION(Error("Database query failure"));
+    NDN_THROW(Error("Database query failure"));
   }
 
   uint64_t nData = stmt.getInt(0);
diff --git a/src/storage/sqlite-storage.hpp b/src/storage/sqlite-storage.hpp
index 4d7142b..217f9d0 100644
--- a/src/storage/sqlite-storage.hpp
+++ b/src/storage/sqlite-storage.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2018,  Regents of the University of California.
+/*
+ * Copyright (c) 2014-2019, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -74,6 +74,9 @@
   std::shared_ptr<Data>
   find(const Name& name, bool exactMatch = false) override;
 
+  void
+  forEach(const std::function<void(const Name&)>& f) override;
+
   /**
    *  @brief  return the size of database
    */
diff --git a/src/storage/storage.hpp b/src/storage/storage.hpp
index 146368f..d724eb1 100644
--- a/src/storage/storage.hpp
+++ b/src/storage/storage.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2019, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -82,6 +82,12 @@
   virtual std::shared_ptr<Data>
   find(const Name& name, bool exactMatch = false) = 0;
 
+   /**
+   *  @brief Enumerate each entry in database and call @p f with name of stored data
+   */
+  virtual void
+  forEach(const std::function<void(const Name&)>& f) = 0;
+
   /**
    *  @brief  return the size of database
    */
