Wafer maps include information about multiple defect patterns on the wafer surface. Intelligent categorization of the defective wafer is essential for investigating the underlying causes and improving the reliability and safety of the entire system. Recently, convolutional neural networks (CNNs) have been widely employed to construct successful defect detectors by learning from offline defect datasets. However, traditional CNN-based detectors are costly and incapable of unknown production defect detection despite the accurate performance. In this paper, we propose a novel IL-based method, called PIRB, for online unknown wafer defect detection. Specifically, we leverage the neural networks to remember old defect patterns by selectively restricting learning on the important weights. A tiny reference buffer is applied to preserve the experienced wafer defect patterns in the learning process to facilitate the detection accuracy. The experimental results show that the proposed method works well for classifying unknown defects, with a 60% reduction in training time compared to offline learning and a 10% increase in total accuracy compared to the state-of-the-art methods.