此内容没有您所选择的语言版本。
Appendix B. Restoring Manual Changes Overwritten by a Puppet Run
If your manual configuration has been overwritten by a Puppet run, you can restore the files to the previous state. The following example shows you how to restore a DHCP configuration file overwritten by a Puppet run.
Procedure
- Copy the file you intend to restore. This allows you to compare the files to check for any mandatory changes required by the upgrade. This is not common for DNS or DHCP services. - cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.backup - # cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.backup- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Check the log files to note down the md5sum of the overwritten file. For example: - journalctl -xe - # journalctl -xe ... /Stage[main]/Dhcp/File[/etc/dhcp/dhcpd.conf]: Filebucketed /etc/dhcp/dhcpd.conf to puppet with sum 622d9820b8e764ab124367c68f5fa3a1 ...- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Restore the overwritten file: - puppet filebucket restore --local --bucket \ /var/lib/puppet/clientbucket /etc/dhcp/dhcpd.conf \ 622d9820b8e764ab124367c68f5fa3a1 - # puppet filebucket restore --local --bucket \ /var/lib/puppet/clientbucket /etc/dhcp/dhcpd.conf \ 622d9820b8e764ab124367c68f5fa3a1- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Compare the backup file and the restored file, and edit the restored file to include any mandatory changes required by the upgrade.