有关puppet agent端三种备份恢复方案探讨研究

├──contents

└──paths

8directories,2files

结果:保存成功,保存结果为以上目录结构

6、只恢复某一个节点到上一个版本

[root@agent1modules]#puppetfilebucketrestore/etc/my.cnffef73d96a75424c782191962f5aaf8ee#节点上操作

7、通过调试模式查看节点动态信息

[root@agent1ssh]#puppetagent–server=puppetserver.bsgchina.com–verbose–no-daemonize

info:Retrievingplugin

info:Loadingfactsin/var/lib/puppet/lib/facter/backup_date.rb

info:Cachingcatalogforagent1.bsgchina.com

info:Applyingconfigurationversion'1374659257'

info:/File[/etc/my.cnf]:Filebucketed/etc/my.cnftomainwithsumfef73d96a75424c782191962f5aaf8ee

notice:/File[/etc/my.cnf]/content:contentchanged'{md5}fef73d96a75424c782191962f5aaf8ee'to'{md5}09fb95f5505056b5a40c4905af3d636e'

info:/File[/etc/my.cnf]:SchedulingrefreshofClass[Mysql::Service]

info:Class[Mysql::Service]:SchedulingrefreshofService[mysqld]

notice:/Stage[main]/Mysql::Service/Service[mysqld]:Triggered'refresh'from1events

notice:Finishedcatalogrunin3.65seconds

结果:可正常恢复到上一个版本(由于我这里设置了5秒钟同步puppetserver端,服务器空间,可以看到以上my.cnf被修改过,美国空间,而且MD5值与上一版本吻合)

8、恢复所有节点到上一个版本

[root@puppetserveretc]#puppetfilebucketrestore–local/etc/puppet/modules/mysql/files/etc/my.cnffef73d96a75424c782191962f5aaf8ee

9、通过调试模式查看节点动态信息

[root@agent1ssh]#puppetagent–server=puppetserver.bsgchina.com–verbose–no-daemonize

notice:StartingPuppetclientversion2.7.21

info:Retrievingplugin

info:Loadingfactsin/var/lib/puppet/lib/facter/backup_date.rb

info:Cachingcatalogforagent1.bsgchina.com

info:Applyingconfigurationversion'1374659257'

info:/File[/etc/my.cnf]:Filebucketed/etc/my.cnftomainwithsum09fb95f5505056b5a40c4905af3d636e

notice:/File[/etc/my.cnf]/content:contentchanged'{md5}09fb95f5505056b5a40c4905af3d636e'to'{md5}fef73d96a75424c782191962f5aaf8ee'

info:/File[/etc/my.cnf]:SchedulingrefreshofClass[Mysql::Service]

info:Class[Mysql::Service]:SchedulingrefreshofService[mysqld]

结果:节点配置文件的MD5值更新为上一个版本的MD5值,恢复成功。

备份方案三、通过本地MD5文件进行备份恢复

[root@agent1modules]#ll/var/lib/puppet/clientbucket/

total40

drwxrwx—3rootroot4096Jul2410:513

drwxrwx—3rootroot4096Jul2214:557

drwxrwx—3rootroot4096Jul2415:318

drwxrwx—4rootroot4096Jul2410:52e

drwxrwx—3rootroot4096Jul2215:10f

备份方案三为备份方案二的一部分,实验过程略。

新开自动化运维管理群:296934942欢迎各界大牛加入探讨!

本文出自 “小诺的Linux开源技术博客” 博客,美国服务器,请务必保留此出处

不能接受失败,也意味太想去成功了,从心理学上解释,

有关puppet agent端三种备份恢复方案探讨研究

相关文章:

你感兴趣的文章:

标签云: