Результат MediaWiki API

Это HTML-представление формата JSON. HTML хорош для отладки, но неудобен для практического применения.

Укажите параметр format для изменения формата вывода. Для отображения не-HTML-представления формата JSON, присвойте format=json.

См. полную документацию или справку API для получения дополнительной информации.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "RuTorrent_\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430_\u0438_\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430_\u043f\u043e\u0434_Gentoo",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "328": {
                "pageid": 328,
                "ns": 0,
                "title": "Rsync \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u0435\u043c\u043e\u043d\u0430 \u043f\u043e\u0434 Gentoo",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "\n\u0421\u043f\u0435\u0440\u0432\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 \u0435\u0449\u0451 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442:\n{{root|emerge -pv rsync}\n\n\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 '''USE''' \u0444\u043b\u0430\u0433\u0438 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e (\u044f \u0438\u0445 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b. \u042d\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e):\n\n{{USEFlag|extended=yes|\n{{EnableFlag|acl}} \n{{EnableFlag|iconv}}\n{{EnableFlag|ssl}} \n{{EnableFlag|xattr}}}}\n\n\n\u0417\u0430\u0442\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\n\n{{root|nano /etc/rsyncd.conf}}\n\n{{file|/etc/rsyncd.conf|\n<syntaxhighlight lang=\"apache\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\n\n# /etc/rsyncd.conf\n\n# Minimal configuration file for rsync daemon\n# See rsync(1) and rsyncd.conf(5) man pages for help\n\n# This line is required by the /etc/init.d/rsyncd script\npid file = /run/rsyncd.pid\n\n\n#Sync OKBM backups\n[okbmbackup]\n\n\t# Log file\n\tlog file = /var/log/rsyncd.log\n\n\t# Write to log about all downloading files\n\ttransfer logging = true\n\n\t#path to files to backup\n\tpath = /home/alex/backup/\n\n\t#comment =)\n\tcomment = backups from OKBM DEV, STEP, GUR docker containers\n\n\t#working in cage\n\tuse chroot = yes\n\n\t#Disallow writing to out folder. only reading files\n\tread only = yes\n\n\t#allow files listing\n\tlist = yes\n\n\t#user and group from whitch we will work on rsync server after connecting\n\tuid = alex\n\tgid = users\n\n\t#white list of hosts\n\thosts allow = 10.8.0.1\n\n\t#black liat of hosts (deny the rest)\n\thosts deny  = *\n\n\tignore errors = no\n\tignore nonreadable = yes\n\ttimeout = 3600\n\n\n\tdont compress = *.jpg *.avi *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz\n\n\t#user for login to rsync (make init auth)\n\tauth users = LOGIN\n\n\t#path to password file for init auth\n\tsecrets file = /home/alex/.rsync/rsyncd.scrt\n\n</syntaxhighlight>\n}}\n\n\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b\u0438\u043a \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c:\n{{root|touch /home/alex/.rsync/rsyncd.scrt}}\n\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0430\n{{root|chmod 600 /home/alex/.rsync/rsyncd.scrt}}\n\n{{file|/home/alex/.rsync/rsyncd.scrt|\n<syntaxhighlight lang=\"apache\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\nLOGIN:PAROL\n</syntaxhighlight>\n}}\n\n\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a:\n\n{{root|rc-update add rsyncd default}}\n\n\u0418 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c rsync:\n\n{{root|/etc/init.d/rsyncd start}}\n\n\n\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u043e\u0434 Gentoo \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u043e\u0442 \u0442\u0443\u0442: [[Rsync_\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430_\u0438_\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430_\u043f\u043e\u0434_Zyxel_Keenetic_Giga]]\n\n\n[[Category:Index]]\n[[Category:Linux]]"
                    }
                ]
            },
            "249": {
                "pageid": 249,
                "ns": 0,
                "title": "Rsync \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434 Zyxel Keenetic Giga",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u043e\u0434 \u043a\u0438\u043d\u0435\u0442\u0438\u043a '''Rsync''' \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442 \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0430\u043f\u043a\u043e\u0439 \u043d\u0430 '''keenetic'''.\n\n\u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c Keenetic \u0441 \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u043b\u0438\u043d\u0443\u043a\u0441\u043e\u043c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a \u043d\u0435\u043c\u0443 \u043f\u043e ssh.\n\n==\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 RSync \u043d\u0430 Keenetic giga \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430==\n\u0421\u043f\u0435\u0440\u0432\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u044f\n{{root|opkg install rsync}}\n\n\u0418\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 opkg \u044f \u0442\u0430\u043a \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0438 \u0438\u043d\u0438\u0442\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u0442\u0430\u0432\u044f\u0442\u0441\u044f \u0432\u043e\u0442 \u044d\u0442\u0438\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u043c - rsynd, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u0430\u0432\u0438\u043c \u0438 \u0435\u0433\u043e\n{{root|opkg install rsyncd}}\n\n\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c '''rsync''' \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\n\n{{root|cd /media/DISK_A1/system/etc/init.d}}\n{{root|mv K10rsyncd S15rsyncd}}\n\n\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u043e\u0440\u0442\u0430 873 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a Rsync \u0438\u0437 \u0432\u043d\u0435:\n\n{{codeline|iptables -A INPUT -p tcp --dport 873 -j ACCEPT}}\n\n{{root|vi /media/DISK_A1/system/etc/firewall.d/fw.sh}}\n\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430\n{{File|/media/DISK_A1/system/etc/firewall.d/fw.sh|\n<syntaxhighlight lang=\"bash\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\n#!/bin/sh\niptables -A INPUT -p tcp --dport 873 -j ACCEPT\n</syntaxhighlight>\n}}\n\n===\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0434\u0435\u043c\u043e\u043d\u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438===\n\u0423 \u043c\u0435\u043d\u044f \u0442\u0443\u0442 \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u0431\u043e\u0439 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0434\u0435\u043c\u043e\u043d\u0430, \u0447\u0442\u043e-\u0442\u043e \u0437\u0430\u0433\u043b\u044e\u0447\u0438\u043b\u043e \u0438 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 pid \u0432 {{path|/media/DISK_A1/system/var/run/rsyncd.pid}}. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0432\u044b\u043b\u0435\u0442\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438 \u0434\u0435\u043c\u043e\u043d \u043d\u0435 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u0430\u0436\u0435\u043d, \u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0447\u0435\u0433\u043e \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c.\n{{File|/media/DISK_A1/system/bin/rsyncstatuscheck.sh|\n<syntaxhighlight lang=\"bash\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\n#!/bin/sh\npathtopid=/media/DISK_A1/system/var/run/rsyncd.pid\nrsyncpath=/media/DISK_A1/system/etc/init.d/S15rsyncd\n\n(pidof rsync) || (/bin/sh $rsyncpath stop; sleep 10; rm $pathtopid; /bin/sh $rsyncpath start)\n</syntaxhighlight>\n}}\n\n\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\n{{root|chmod a+x /media/DISK_A1/system/bin/rsyncstatuscheck.sh}}\n\u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u043a\u0440\u043e\u043d\u0435 \u043f\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043a\u0430\u0436\u0434\u044b\u0435 15 \u043c\u0438\u043d\u0443\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f '''rsync'''.\n\n{{File|/media/DISK_A1/system/etc/crontabs/root|\n<syntaxhighlight lang=\"bash\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\n#-----------------------Rsync-status-Check--------------------\n*/15 * * * *    /media/DISK_A1/system/bin/rsyncstatuscheck.sh > /dev/null 2>&1\n</syntaxhighlight>\n}}\n\n==\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 RSync \u043d\u0430 keenetic==\n\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0430 \u044d\u0442\u0430 [http://itfound.ru/65-rsync-backup.html#comment-14531 \u0441\u0442\u0430\u0442\u044c\u044f].\n\n\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 {{path|/media/DISK_A1/system/etc/rsyncd.conf}}\n{{root|vi /media/DISK_A1/system/etc/rsyncd.conf}}\n\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0445\u0440\u043e\u043c\u0430\u0435\u0442, \u043d\u043e \u043c\u043d\u0435 \u0442\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f).\n{{note|\u041f\u0440\u0438\u043c\u0435\u0440 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 \u043c\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u043d\u043e \u043f\u043e \u0441\u0443\u0442\u0438 \u0442\u0430\u043c \u0432\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438}}\n{{File|/media/DISK_A1/system/etc/rsyncd.conf|\n<syntaxhighlight lang=\"bash\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\n# /etc/rsyncd.conf\n# Minimal configuration for rsync daemon\n\n# Next line required for init script\npid file = /media/DISK_A1/system/var/run/rsyncd.pid\n\n# Log file\nlog file = /media/DISK_A1/system/var/log/rsyncd.log\n\n# lock file\nlock file = /media/DISK_A1/system/var/lock/rsync.lock\n\n# Write to log about all downloading files\ntransfer logging = true\n\n#Disallow writing to out folder\nread only = yes\n\n#Sync photos from IP camera\n[dachacamera]\n#path to files from IP camera\npath = /media/DISK_A1/dachacamera\n#comment =)\ncomment = photos from dacha IP camera\n#working in cage\nuse chroot = yes\n#only reading files\nread only = yes\n#allow files listing\nlist = yes\n#user and group from whitch we will work on rsync server after connecting\nuid = root\ngid = root\n#white list of hosts\nhosts allow = 10.8.0.1\nignore errors = no\nignore nonreadable = yes\ntimeout = 6000\ndont compress = *.jpg *.avi *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz\n#user for login to rsync (make init auth)\nauth users = LOGIN\n#path to password file for init auth\nsecrets file = /media/DISK_A1/system/etc/config/rsyncd.scrt\n</syntaxhighlight>\n}}\n\n{{note|<nowiki>\u041f\u043e\u0434 \u0441\u0435\u0431\u044f \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443: auth users = LOGIN</nowiki>}}\n\n\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Rsync \u043d\u0430 \u043a\u0438\u043d\u0435\u0442\u0438\u043a\u0435\n{{root|touch /media/DISK_A1/system/etc/config/rsyncd.scrt}}\n\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0430\n{{root|chmod 600 /media/DISK_A1/system/etc/config/rsyncd.scrt}}\n\n\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c\n{{root|vi /media/DISK_A1/system/etc/config/rsyncd.scrt}}\n{{File|/media/DISK_A1/system/etc/config/rsyncd.scrt|\n<syntaxhighlight lang=\"bash\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\nLOGIN:PAROL\n</syntaxhighlight>\n}}\n\n\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0430\u043f\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u043e\u0442\u043a\u0443\u0434\u0430 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b. \u0412 \u043c\u043e\u0451\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u0430\u043f\u043a\u0430, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0441 IP \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043e\u0442\u043a\u0443\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0445 \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c\n{{root|mkdir /media/DISK_A1/dachacamera}}\n\n==\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Rsync \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 Gentoo box==\n\u0421\u043f\u0435\u0440\u0432\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0430\u043c '''Rsync'''\n{{root|emerge rsync}}\n\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0441 \u043a\u0438\u043d\u0435\u0442\u0438\u043a\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:\n\n\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 '''Rsync''' \u043a\u0438\u043d\u0435\u0442\u0438\u043a\u0430\n{{root|mkdir /root/.rsync}}\n{{root|nano -w /root/.rsync/keenetic.scrt}}\n{{Note|\u0438\u043b\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a {{root|echo \"PAROL\" > /root/.rsync/keenetic.scrt}} }}\n\u041a\u0443\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c {{Codeline|PAROL}} =)\n\n\u0421\u0442\u0430\u0432\u0438\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430\n{{root|chmod 600 /root/.rsync/keenetic.scrt}}\n\n\n\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \"\u0437\u0430\u0431\u043e\u0440 \u0444\u043e\u0442\u043e\u043a\" \u0441 \u043a\u0438\u043d\u0435\u0442\u0438\u043a\u0430 \u043d\u0430 \u0434\u0430\u0447\u0435 \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043b\u0438 \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u044d\u043a\u0430\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\n{{root|mkdir /bin/rsync}}\n{{root|nano -w /bin/rsync/keenetic.sh}}\n\u043a\u0443\u0434\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u043a\u043e\u0434 \u043a\u043e\u043d\u0435\u043a\u0442\u0430 \u043a Rsync \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043a\u0438\u043d\u0435\u0442\u0438\u043a\u0430 \u0438 \u0437\u0430\u0431\u043e\u0440\u0443 \u0444\u0430\u0439\u043b\u043e\u0432\n{{File|/bin/rsync/keenetic.sh|\n<syntaxhighlight lang=\"bash\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\n#!/bin/bash\n\n#####\n# VARS\n#####\nlogfile=/var/log/rsync.log\ntimestamp=`date +%y_%m_%d\\ %H-%M-%S`\npathtoimages=/mnt/web/dacha/htdocs/dachaipcamera\n##################\n\n\n#we need this because RSYNC hangs some times (the reason may be a slow and weak internet connection)\ncurminutes=`date +%M`\n\necho -e \"\\n${timestamp}\\n\" >> $logfile\n\nif [[ \"$curminutes\" -eq 00 || \"$curminutes\" -eq 15 ||  \"$curminutes\" -eq 30 ||   \"$curminutes\" -eq 45 ]] ; then\n        echo -e \"Now it's time to KillAll rsync\" >> $logfile\n        killall rsync\nfi\n\n\n#make shure that all tasks on router_d are done. just wait for it's cron duties\nsleep 25\n\n\nif [[ -z \"$(pgrep rsync)\" ]]\n        then\n                echo -e \"Rsync does'n running. So fire it up!\" >> $logfile\n                rsync -urt --password-file=/root/.rsync/keenetic.scrt donik@10.8.0.10::dachacamera $pathtoimages\n                chown -R apache:apache $pathtoimages\n        else\n                echo -e \"Rsync is running right now. So we don't need to do anything\" >> $logfile\n                sleep 1;\nfi\n\n</syntaxhighlight>\n}}\n\n\u0421\u0430\u043c \u043a\u043e\u0434 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043d\u0435\u0441\u0451\u043d \u0432 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0431\u043b\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043b\u0438 \u0443\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f, \u0438 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0435\u0451. \u041f\u0440\u043e\u0441\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u043e \u043a\u0440\u043e\u043d\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0435\u0451 \u0447\u0430\u0441\u0442\u043e (\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c), \u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u0442\u0430\u043a \u0432\u0435\u043b\u0438\u043a\u0430 \u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043b\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 rsync, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0448\u0430\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043a\u0430\u043d\u0430\u043b \u0438 \u0441\u0430\u043c\u0438 \u043c\u0435\u0448\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0432\u0438\u0441\u0430\u0435\u0442. \u0412 top'\u0435 \u0432\u0438\u0441\u044f\u0442 \u0442\u044b\u0441\u044f\u0447\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 rsync, \u043d\u043e \u0442\u043e\u043b\u043a\u0443 \u043e\u0442 \u043d\u0438\u0445 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e. \u042d\u0442\u043e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 \u044f \u0441\u043c\u043e\u0433 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043d\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0435\u043a\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 3G \u0441\u0435\u0442\u0438. (''\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435'': if [ -z STRING ]\tTrue if the length of \"STRING\" is zero.)\n\n\n\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 {{codeline|chown -R apache:apache $pathtoimages}} \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u0430\u043a \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 '''rsync''' \u043d\u0430 '''keenetic''' \u043c\u043d\u0435 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043b\u0438\u0435\u043d\u0442 \u043a\u0438\u0434\u0430\u0435\u0442 \u0444\u043e\u0442\u043a\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0432\u0435\u0431\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0441 '''root''' \u043d\u0430 \u0442\u043e\u0433\u043e, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440.\n\n'''\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b rsync'''\n* '''u''' \u0420\u0435\u0436\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u041d\u0415 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c\n* '''r''' \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0435\u0440\u0435\u0432\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432\n* '''t''' \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c.\n\n\u0414\u0430\u0451\u043c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\n{{root|chmod a+x /bin/rsync/keenetic.sh}}\n\n\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u043a\u0440\u043e\u043d \u043f\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437 \u0432 5 \u043c\u0438\u043d\u0443\u0442:\n{{root|nano /etc/crontab}}\n{{File|/etc/crontab|\n<syntaxhighlight lang=\"bash\" line start=\"1\" line=\"GESHI_FANCY_LINE_NUMBERS\" enclose=\"div\">\n#-------------------Dacha-IP-CAMERA-FROM-KEENETIC--------------------------------------\n*/5 * * * *       /bin/rsync/keenetic.sh > /dev/null 2>&1\n</syntaxhighlight>\n}}\n\n\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u0440\u043e\u043d\n{{root|crontab /etc/crontab}}\n\n==\u0421\u0441\u044b\u043b\u043a\u0438==\n* [http://itfound.ru/65-rsync-backup.html#comment-14531 \u0421\u0442\u0430\u0442\u044c\u044f], \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043b\u0435\u0433\u043b\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0445\u0435\u043b\u043f\u0430\n\n\n[[Category:Index]]\n[[Category:Linux]]"
                    }
                ]
            }
        }
    }
}