Rewrite the database after a pull action