{"id":1049,"date":"2013-11-08T12:23:06","date_gmt":"2013-11-08T04:23:06","guid":{"rendered":"http:\/\/sashakrasnoyarsk.ru\/?p=1049"},"modified":"2013-11-08T12:23:28","modified_gmt":"2013-11-08T04:23:28","slug":"%d1%80%d0%b5%d0%b7%d0%b5%d1%80%d0%b2%d0%bd%d0%be%d0%b5-%d0%ba%d0%be%d0%bf%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%ba%d0%be%d1%80%d0%bf%d0%be%d1%80%d0%b0%d1%82%d0%b8%d0%b2%d0%bd%d0%be%d0%b3","status":"publish","type":"post","link":"https:\/\/sashakrasnoyarsk.ru\/?p=1049","title":{"rendered":"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430"},"content":{"rendered":"<p>\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0441\u0436\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0438 .7z \u0430\u0440\u0445\u0438\u0432\u044b \u0441 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u043c \u0441\u0436\u0430\u0442\u0438\u0435\u043c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u044d\u043a\u0430\u043f\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0434\u0430\u0436\u0435 \u0438\u043c\u0435\u044f \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0430\u0440\u0445\u0438\u0432 \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0430 \u0435\u0441\u043b\u0438 \u0431\u041e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u0430, \u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 \u0438\u043c\u0435\u0435\u0442 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440. \u0412\u043d\u0443\u0442\u0440\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0434\u0430\u0442\u044b, \u0432\u0440\u0435\u043c\u044f \u0431\u044d\u043a\u0430\u043f\u043e\u0432 \u0438 \u0438\u043c\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u043e\u0442\u0434\u0435\u043b\u043e\u0432.<br \/>\n<!--more--><br \/>\n\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>$base &#8212; \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u043e\u0442\u0434\u0435\u043b\u043e\u0432;<br \/>\n$bk_to &#8212; \u043f\u0443\u0442\u044c \u043a \u043c\u0435\u0441\u0442\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u044d\u043a\u0430\u043f\u043e\u0432;<br \/>\n$path &#8212; \u043f\u0443\u0442\u044c \u043a \u043c\u0435\u0441\u0442\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0431\u044d\u043a\u0430\u043f\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u043e\u0442\u0434\u0435\u043b\u043e\u0432);<br \/>\n$excl_file &#8212; \u0444\u0430\u0439\u043b \u0441 \u043c\u0430\u0441\u043a\u0430\u043c\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0432\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 ;<br \/>\n$excl_path &#8212; \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 bash-\u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0435 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043e\u0442\u0434\u0435\u043b\u043e\u0432 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u0444\u0430\u0439\u043b\u043e\u043f\u043e\u043c\u043e\u0439\u043a\u0430 common, \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441 \u0431\u044d\u043a\u0430\u043f\u0430\u043c\u0438 \u0438 tmp-\u0434\u0438\u0441\u043a;<br \/>\n$tmp_path &#8212; \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 (\u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0451).<br \/>\n\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u044d\u043a\u0430\u043f \u0432\u0441\u0435\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u043e\u0442\u0434\u0435\u043b\u043e\u0432, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432 \/shares\/user \u043a\u0440\u043e\u043c\u0435 common, bk \u0438 disk_t \u0432 \u0444\u0430\u0439\u043b\u044b {\u0418\u041c\u042f_\u0414\u0418\u0420\u0415\u041a\u0422\u041e\u0420\u0418\u0418_\u041e\u0422\u0414\u0415\u041b\u0410}.7z. \u0412\u043d\u0443\u0442\u0440\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u0431\u0443\u0434\u0443\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0413\u0413\u0413\u0413-\u041c\u041c-\u0414\u0414-\u0427\u0427-\u041c\u041c-\u0421\u0421-\u0418\u041c\u042f_\u0414\u0418\u0420\u0415\u041a\u0422\u041e\u0420\u0418\u0418_\u041e\u0422\u0414\u0415\u041b\u0410, \u0433\u0434\u0435 \u0413\u0413\u0413\u0413-\u041c\u041c-\u0414\u0414-\u0427\u0427-\u041c\u041c-\u0421\u0421 &#8212; \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430.<br \/>\n\u0421\u043a\u0440\u0438\u043f\u0442 \u0438\u043c\u0435\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0443 \u043e\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 (\u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e), \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u0435\u0449\u0451 \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430.<br \/>\n\u0427\u0442\u043e\u0431\u044b \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u0436\u0438\u0440\u0430\u043b\u043e 100% \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440\u0430 \u0441\u043d\u0438\u0436\u0435\u043d \u0434\u043e +17.<\/p>\n<p>\/shares\/user\/backup\/backup.pl:<\/p>\n<pre>#!\/usr\/bin\/perl\r\nif (`ps ax|grep 7z|grep -v grep` eq \"\"){\r\n$base=\"\/shares\/user\";\r\n$bk_to=\"$base\/bk\";\r\n$path=\"\/shares\/user\/backup\";\r\n$excl_file=\"$path\/exclude.ext\";\r\n$excl_path=\"|grep -v common|grep -v bk|grep -v disk_t\";\r\n$tmp_path=\"$path\/bk\";\r\n# \u041e\u0442\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0435\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0438\/\u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0439\r\n$a=`ls $tmp_path\/`;\r\n@b=split \/\\n\/,$a;\r\nforeach $name(@b){\r\n`umount -f $tmp_path\/$name`;\r\n`rmdir $tmp_path\/$name`;\r\n}\r\n# \u0427\u0438\u0442\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439\r\n$a=`ls $base\/$excl_path`;\r\n@b=split \/\\n\/,$a;\r\nforeach $name(@b){\r\n# \u0427\u0438\u0442\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0434\u0430\u0442\u0443\r\n($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);\r\n$year+=1900;\r\n$min=\"0\".$min if $min&lt;10;\r\n$hour=\"0\".$hour if $hour&lt;10;\r\n$mday=\"0\".$mday if $mday&lt;10;\r\n$mon=\"0\".$mon if $mon&lt;10;\r\n$current=\"$year-$mon-$mday-$hour-$min\";\r\nprint \"\\n\u0421\u0435\u0433\u043e\u0434\u043d\u044f $current\\n\";\r\n$newname=\"$current-$name\";\r\n`mkdir $tmp_path\/$newname`;\r\n`mount -o bind $base\/$name $tmp_path\/$newname`;\r\n`rm -f $bk_to\/*.tmp`;\r\nprint \"\u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0430\u0440\u0445\u0438\u0432: $name\\n\";\r\n`nice --adjustment=17 7z a $bk_to\/$name.7z -ms=on -ssc -mx=5 -w$bk_to\/ -y -x\\@$excl_file $tmp_path\/*&gt;$bk_to\/$name.log`;\r\n`umount -f $tmp_path\/$newname`;\r\n`rmdir $tmp_path\/$newname`;\r\n}\r\n}<\/pre>\n<p>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0441\u0436\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0438 .7z \u0430\u0440\u0445\u0438\u0432\u044b \u0441 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u043c \u0441\u0436\u0430\u0442\u0438\u0435\u043c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u044d\u043a\u0430\u043f\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0434\u0430\u0436\u0435 \u0438\u043c\u0435\u044f \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0430\u0440\u0445\u0438\u0432 \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0430 \u0435\u0441\u043b\u0438 \u0431\u041e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c &hellip; <a href=\"https:\/\/sashakrasnoyarsk.ru\/?p=1049\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[337,19,6,7],"tags":[1420,1383,27,273,1426,1550,1427,1428,362,1423,1544,287,307,348,461,343,74,1425,1424,314,662,466,1429,463],"class_list":["post-1049","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","category-pc","category-software","tag-7z","tag-add","tag-backup","tag-bash","tag-corp","tag-debian","tag-file-sharing","tag-file-sharing-backup","tag-grep","tag-incremental","tag-linux","tag-ls","tag-mount","tag-nice","tag-perl","tag-ps","tag-recovery","tag-rm","tag-rmdir","tag-umount","tag-662","tag-466","tag-1429","tag-463"],"_links":{"self":[{"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/posts\/1049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1049"}],"version-history":[{"count":1,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/posts\/1049\/revisions"}],"predecessor-version":[{"id":1050,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/posts\/1049\/revisions\/1050"}],"wp:attachment":[{"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}