To back up the chats on your old phones, you are to go to WhatsApp Settings > Chats > Chat Backup. There, you will find the green 'Backup' button. Tap on the button to backup your chats locally on your phone. You will find the backup file in the local storage WhatsApp > Databases.