Because when backing up, in order to prevent changes to the files after backup, all files after backup have been set to "system + read-only" attributes. If the original attributes of these files are not restored when restoring the files, some unexpected problems will occur: for example, operations such as renaming and updating the content of the restored files can no longer be performed. This is also a problem I discovered when restoring the files, so the operation of attributes is added.
Of course, when backing up, the /k parameter can be used to maintain the original attributes, but after doing this, changes to the files after backup cannot be prevented. For the safety of backing up files, it is better to make it more complicated :)
Of course, when backing up, the /k parameter can be used to maintain the original attributes, but after doing this, changes to the files after backup cannot be prevented. For the safety of backing up files, it is better to make it more complicated :)

DigestI