Check Backup data integrity for backup directories
The program checks the backup data integrity, and sends the check results to the Administrator and Boss Mailbox 7 o'clock in the morning daily;
Integrity checking is one of the important components of hids, and there are 3 ways to do integrity checking in Linux. 1. Hash comparison 2. Signature Verification 3, INotify There are 2 ways of doing this: A, periodic detection, such as through cron or program built-in timer B, real-time detection, inotify 1, 21 like and a,3 General and B. With INotify do integrity check program now seems not ready to use more useful, who recommend one. Http://www.2cto.com/os/201101/82861.html (Reference)
|
MD5 algorithm verifies the integrity of network File transfer
[Email protected] ~]# vim/server/scripts/md5sum.sh
#!/bin/sh #print for md5sum *.tar.gz files in/backup to check files and send mail by Yvonne 2015-7-8 14:07:29. Md5sum $ (find/backup/-type f-name "*.tar.gz") >md5sumtar.md5 && md5sum-c md5sumtar.md5 "/server/scripts/md5 Sum.sh "6L, 206C written
[email protected] ~]#/bin/sh/server/scripts/md5sum.sh
/backup/data/var_spool_cron/192.168.10.104_var_spool_cron_2015-07-06.tar.gz:ok
/backup/data/etc_sysconfig_iptables/192.168.10.104_etc_sysconfig_iptables_2015-07-06.tar.gz:ok
/backup/data/server_scripts/192.168.10.104_server_scripts_2015-07-06.tar.gz:ok
/backup/data/www/bbs/192.168.10.104_app_logs_bbs_logs_2015-07-06.tar.gz:ok
/backup/data/www/blog/192.168.10.104_app_logs_blog_logs_2015-07-06.tar.gz:ok
/backup/data/www/html/192.168.10.104_application_nginx_html_2015-07-06.tar.gz:ok
/backup/data/www/www/192.168.10.104_app_logs_www_logs_2015-07-06.tar.gz:ok
/backup/data/etc_rc.local/192.168.10.104_etc_rc.local_2015-07-06.tar.gz:ok
[[email protected]  ~]# CRONTAB -E
# print for md5sum *.tar.gz files in /backup to check files and send mail by yvonne 2015-7-8 14:07:29.
This article is from the "Lanzhi" blog, make sure to keep this source http://7826443.blog.51cto.com/7816443/1704911
Check backup data integrity for backup directories