Ordinary database engine is deprecated but there is no simple mean to change database engine to Atomic for existing databases.

Possible options:
- ALTER DATABASE MODIFY ENGINE query.
- Flag that triggers migration at ClickHouse startup.

The latter should be easier to implement. 

old_num_rows[i] = num_marks ? data_files[i].marks[num_marks - 1].rows : 0;
            }
            auto backup_entry = backup->readFile(file_path_in_backup);
            auto marks_rb = backup_entry->getReadBuffer();
            for (size_t i = 0; i != num_extra_marks; ++i)
            {
                for (size_t j = 0; j != num_data_files; ++j)
                {
                    Mark mark;
                    mark.read(*marks_rb);
                    mark.rows += old_num_rows[j];     
                    mark.offset += old_data_sizes[j]; 
                    data_files[j].marks.push_back(mark);
                }
            }
        }
        
        saveMarks(lock);
        saveFileSizes(lock);
        updateTotalRows(lock);
    }
    catch (...)
    {
        
        file_checker.repair();
        removeUnsavedMarks(lock);
        throw;
    }
}
void registerStorageLog(StorageFactory & factory)