备份

备份:

backup_path='/tmp/backup'

for file in $(rpm -ql openssh);do mkdir -p $backup_path/`dirname $file`; cp -arf $file $backup_path/$file; done

恢复:

cp  -arf  $backup_path/*   /

原文地址:https://www.cnblogs.com/caya-yuan/p/10674356.html