Here are the instructions for migrating AMP users between two servers
1. On the old AMP, run this command to create a csv file with all the users and passwords:
# echo "select username, password, password_format, full_name, email, phone from users where username <> 'admin'" | psql -Uairwave airwave --no-align --field-separator , --tuples-only > /tmp/users.csv
2. Copy /tmp/users.csv to the same location on the new AMP (if you're not sure about the syntax in Linux, WinSCP would be a good tool to use here).
3. Update the $role_id in the script. All users will be assigned to this role.
4. On the new AMP, delete all the users that were imported earlier:
# echo "delete from users where username <> 'admin';
5. On the new AMP save the attached file in /var/airwave/custom and run it like this:
# /var/airwave/custom/import_amp_users.pl /tmp/users.csv