The invention relates to a method and
system for setting
backup and
recovery based on a Linux
system. The method includes the steps that service is started, a
backup command is received, a configuration file needing to be backed-up is selected by a user and searched for, a
backup is marked, and service is executed and stored into a flash disk to complete backing-up; the service is started, a
recovery command is received, the user selects items needing to be recovered through the backup flash disk, the service is executed, and
recovery is completed. By the adoption of the service and the commands, backup and recovery are set, wherein the service includes guard service, recovery service and mounting service, and the commands include the backup command and the recovery command. The method for setting backup is simple, useless files are excluded autonomously from the backup file without manual adding, and during recovery, manual intervention on the recovery process is not needed in an operation
system; after the file is recovered, service in operation applies new configuration files, and manual operation is not needed.