The invention discloses a digital optical fiber repeater with a backup and a switching method. The repeater mainly comprises a local machine and at least one remote machine, the plurality of main optical modules of the local machine are connected with the main optical modules of the corresponding remote machines, and the multiple optical modules of the local machine are connected with the standbyoptical modules of the corresponding remote machines, and each remote machine is connected in sequence. The local machine is mainly composed of a local main control board, a local intermediate-frequency board, and a local power supply module, and the remote machine is composed of a remote main control board, a remote intermediate-frequency board, a remote power supply module, and a power amplifiermodule. According to the digital fiber repeater system with backup and switching method, the local intermediate-frequency board, the remote intermediate-frequency board and the power amplifier moduleare stripped from the main control board by adopting a modular design, various modules are added or removed according to the use requirement; The instantaneous switching is realized through the hardware and the software in the system, and the user experience is basically not affected; meanwhile, the equipment cost is reduced, the design scheme is simplified, and the system reliability is improved.