table_infos = for t <- :mnesia.system_info(:tables) do {t, :mnesia.table_info(t, :where_to_commit)} end for {tb, [{node_to_connect, type}]} <- table_infos do {tb, :mnesia.add_table_copy(tb, node(), type)} end