activerecord

[ruby] your_model = User column_names = your_model.column_names - ['created_at', 'updated_at'] # we can ignore some unimportant fields backup_array = [] your_model.find_each(batch_size: 500) do |your_record| p_hash = {} column_names.each do |col_name| p_hash.merge!("#{col_name}" => your_record.send(col_name)) end backup_array << p_hash end [/ruby] This will create an array of...