1. A method for migrating memory data in a computer, wherein the computer comprise a processor and a main memory having one or more memory cards each controlled by a memory controller, wherein the method comprises: executing, by the processor, instructions of an operating system of the computer; receiving, by the processor, a trigger instruction while executing the instructions of the operating system; exiting the operating system and executing, by the processor, a memory data migration instruction of a basic input/output system of the computer according to the trigger instruction; wherein by executing the memory data migration instruction, the computer performs the following operations: determining, by the processor, a source memory card; determining, by the processor, a backup memory card for the source memory card; and instructing, by the processor, a memory controller of the source memory card to migrate memory data of the source memory card to the backup memory card; detecting, by the memory controller of the source memory card, non-erroneous memory data in the source memory card; and migrating, by the memory controller of the source memory card, only the non-erroneous memory data of the source memory card to the backup memory card.