{"id":3523,"date":"2025-05-13T14:43:25","date_gmt":"2025-05-13T11:43:25","guid":{"rendered":"https:\/\/cloudvps.by\/community\/?p=3523"},"modified":"2025-05-21T12:50:24","modified_gmt":"2025-05-21T09:50:24","slug":"kak-nastroit-server-dlya-rezervnyh-kopij-rsync-borg-cron","status":"publish","type":"post","link":"https:\/\/cloudvps.by\/community\/kak-nastroit-server-dlya-rezervnyh-kopij-rsync-borg-cron\/","title":{"rendered":"\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u043a\u043e\u043f\u0438\u0439: rsync + borg + cron (\u0431\u0435\u0437 \u043c\u0430\u0433\u0438\u0438)"},"content":{"rendered":"\n<p>\u0415\u0441\u043b\u0438 \u0442\u044b \u0445\u043e\u0442\u044c \u0440\u0430\u0437 \u0442\u0435\u0440\u044f\u043b \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0437\u043d\u0430\u0435\u0448\u044c, \u044d\u0442\u043e \u0431\u043e\u043b\u044c. \u0418 \u043b\u0430\u0434\u043d\u043e \u0431\u044b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0431\u0430\u0437\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0433\u043e\u0434\u043e\u0432\u0430\u044f \u043e\u0442\u0447\u0451\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0441\u0430\u0439\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0441\u0435\u043b \u0432 \u0442\u043e\u043f\u0435 \u2014 \u0432\u0441\u0451, \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u043f\u0430\u043d\u0438\u043a\u0430.<\/p>\n\n\n\n<p>\u042f \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e \u043f\u0440\u043e\u0448\u043b\u0430. \u0418 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u043a \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443, \u043d\u043e \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e: <strong>rsync + borg + cron<\/strong>. \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 <a href=\"https:\/\/cloudvps.by\/servers\/vps\/vps_server.php\" data-internallinksmanager029f6b8e52c=\"4\" title=\"VPS \u0445\u043e\u0441\u0442\u0438\u043d\u0433\">VPS<\/a>, \u0432\u0441\u0451 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u0438 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u0438 \u043a\u0430\u043a \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u041d\u0438\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, <strong>\u043a\u0430\u043a \u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b\u0430 \u0431\u044d\u043a\u0430\u043f-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 Ubuntu<\/strong>, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u00ab\u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439\u00bb \u0441 \u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u00ab\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u00bb.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u0417\u0430\u0447\u0435\u043c \u0432\u0441\u0451 \u044d\u0442\u043e? \u0418 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e ZIP?<\/h2>\n\n\n\n<p>\u0414\u0430, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0430\u0440\u0445\u0438\u0432 \u0438 \u0441\u043a\u0438\u043d\u0443\u0442\u044c \u043d\u0430 \u0444\u043b\u0435\u0448\u043a\u0443. \u0420\u0430\u0437\u043e\u043a. \u041d\u043e \u0435\u0441\u043b\u0438 \u0442\u044b \u0445\u043e\u0447\u0435\u0448\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0431\u044d\u043a\u0430\u043f\u0438\u043b\u043e\u0441\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c\/\u043d\u043e\u0447\u044c\/\u0447\u0430\u0441 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0422\u0443\u0442 \u043d\u0443\u0436\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u042f \u0432\u044b\u0431\u0440\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u043a\u0443:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>rsync<\/strong> \u2014 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438;<\/li>\n\n\n\n<li><strong>borgbackup<\/strong> \u2014 \u0434\u043b\u044f \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0441\u0436\u0430\u0442\u0438\u044f (\u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043f\u043e \u0441\u0442\u043e \u0440\u0430\u0437);<\/li>\n\n\n\n<li><strong>cron<\/strong> \u2014 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0440\u0430.<\/li>\n<\/ul>\n\n\n\n<p>\u0418 \u0434\u0430, \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0437\u0430 30 \u043c\u0438\u043d\u0443\u0442 \u0434\u0430\u0436\u0435 \u043d\u0430 \u0441\u0432\u0435\u0436\u0435\u0439 Ubuntu 22.04.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 rsync, \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u0442\u0430\u0449\u0438\u0442<\/h2>\n\n\n\n<p><strong>rsync \u2014 \u044d\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043f\u0430\u043f\u043e\u043a<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u043c\u0435\u0435\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/ssh\/\" data-internallinksmanager029f6b8e52c=\"197\" title=\"SSH (Secure Shell)\">SSH<\/a>, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u0435\u043c\u043e\u043d\u0430. \u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043a\u0430\u043a \u0433\u0432\u043e\u0437\u0434\u044c, \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u043a\u0430\u043a \u043c\u043e\u043b\u043d\u0438\u044f.<\/p>\n\n\n\n<p>\u042f \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e VPS <code>\/var\/www<\/code> \u0438 <code>\/etc<\/code> \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0447\u0435\u0440 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u044d\u043a\u0430\u043f-\u0441\u0435\u0440\u0432\u0435\u0440. \u0418 \u043f\u043e\u0442\u043e\u043c \u2014 \u043f\u0443\u0441\u0442\u044c \u0445\u043e\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0441\u0451, \u0443 \u043c\u0435\u043d\u044f \u043a\u043e\u043f\u0438\u044f \u0435\u0441\u0442\u044c.<\/p>\n\n\n\n<p>\u041a\u0440\u0443\u0442\u044b\u0435 \u0432\u0435\u0449\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 rsync:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438;<\/li>\n\n\n\n<li>\u0440\u0430\u0431\u043e\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 <code>rsync over ssh<\/code> (\u0432\u0441\u0451 \u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044f);<\/li>\n\n\n\n<li>\u043e\u043f\u0446\u0438\u0438 \u0432\u0440\u043e\u0434\u0435 <code>--archive<\/code>, <code>--delete<\/code>, <code>--compress<\/code>, <code>--progress<\/code>;<\/li>\n\n\n\n<li>\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a <code>rsync daemon<\/code>, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f rsync (\u0440\u0430\u0431\u043e\u0447\u0438\u0439)<\/h2>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rsync -avz -e \"ssh -p 2222\" user@remote:\/var\/www\/ \/<a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/backup\/\" data-internallinksmanager029f6b8e52c=\"228\" title=\"Backup (\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435)\">backup<\/a>\/sites\/\n<\/code><\/pre>\n\n\n\n<p>\u0427\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-a<\/code> \u2014 \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c (\u043f\u0440\u0430\u0432\u0430, \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u0438, \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u044b);<\/li>\n\n\n\n<li><code>-v<\/code> \u2014 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c;<\/li>\n\n\n\n<li><code>-z<\/code> \u2014 \u0441\u0436\u0430\u0442\u0438\u0435;<\/li>\n\n\n\n<li><code>-e<\/code> \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u0447\u0435\u0440\u0435\u0437 SSH \u0438 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/port\/\" data-internallinksmanager029f6b8e52c=\"225\" title=\"Port (\u041f\u043e\u0440\u0442 )\">\u043f\u043e\u0440\u0442<\/a>.<\/li>\n<\/ul>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <code>--delete<\/code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u043d\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0435 \u0444\u0430\u0439\u043b\u044b \u0443\u0434\u0430\u043b\u044f\u043b\u0438\u0441\u044c \u0438 \u043d\u0430 \u043a\u043e\u043f\u0438\u0438.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u044d\u043a\u0430\u043f-\u0441\u0435\u0440\u0432\u0435\u0440\u0430: \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u044e \u044f<\/h2>\n\n\n\n<p>\ud83d\udce6 \u0423 \u043c\u0435\u043d\u044f \u043d\u0430 CloudVPS.by \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 VPS \u0441 2 \u044f\u0434\u0440\u0430\u043c\u0438, 40 \u0413\u0411 SSD \u0438 Ubuntu 22.04. \u041d\u0430 \u043d\u0451\u043c:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0441\u0442\u043e\u0438\u0442 <strong>rsync<\/strong> (\u043f\u043e\u043d\u044f\u0442\u043d\u043e);<\/li>\n\n\n\n<li>\u043f\u043e\u0434\u043d\u044f\u0442 SSH \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438;<\/li>\n\n\n\n<li>\u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043f\u0430\u043f\u043a\u0438 \u0447\u0451\u0442\u043a\u043e \u0437\u0430\u0434\u0430\u043d\u044b;<\/li>\n\n\n\n<li>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>backup<\/code> \u0441 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 (\u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0430\u0440\u043e\u043b\u0435\u0439!).<\/li>\n<\/ul>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/backup\/sites\nchown backup:backup \/backup\/sites\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 <code>~backup\/.ssh\/authorized_keys<\/code> \u2014 \u0432\u0441\u0451, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043a\u0438\u0434\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u0438.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Borg: \u0437\u0430\u0447\u0435\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d \u0438 \u043a\u0430\u043a \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442<\/h2>\n\n\n\n<p><code>rsync<\/code> \u2014 \u044d\u0442\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f, \u043d\u043e <strong>\u043e\u043d \u043d\u0435 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u0442<\/strong>. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043f\u0438\u0438 \u043f\u043e \u0434\u043d\u044f\u043c\/\u043d\u0435\u0434\u0435\u043b\u044f\u043c \u0438 \u043d\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <strong>Borg<\/strong>.<\/p>\n\n\n\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install borgbackup -y\n<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>borg init --encryption=repokey \/backup\/borg\/site1\n<\/code><\/pre>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u044d\u043a\u0430\u043f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>borg create --stats \/backup\/borg\/site1::$(date +%F) \/backup\/sites\/\n<\/code><\/pre>\n\n\n\n<p>\u0427\u0442\u043e \u043a\u0440\u0443\u0442\u043e:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u043a\u0430\u0436\u0434\u043e\u0435 <code>borg create<\/code> \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0441\u043d\u0435\u043f\u0448\u043e\u0442, \u043d\u043e \u0432\u0435\u0441\u0438\u0442 \u0432 \u0440\u0430\u0437\u044b \u043c\u0435\u043d\u044c\u0448\u0435;<\/li>\n\n\n\n<li>\u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c 30, 100, 500 \u043a\u043e\u043f\u0438\u0439 \u2014 \u0438 \u043d\u0435 \u0431\u043e\u044f\u0442\u044c\u0441\u044f \u0437\u0430\u043d\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u0434\u0438\u0441\u043a;<\/li>\n\n\n\n<li>\u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Cron: \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0441\u0430\u043c\u043e \u043a\u0440\u0443\u0442\u0438\u043b\u043e\u0441\u044c<\/h2>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u044e \u0441\u043a\u0440\u0438\u043f\u0442 <code>backup.sh<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\nrsync -avz user@remote:\/var\/www\/ \/backup\/sites\/\nborg create --stats \/backup\/borg\/site1::$(date +%F) \/backup\/sites\/\nborg prune -v --keep-daily=7 --keep-weekly=4 --keep-monthly=3 \/backup\/borg\/site1\n<\/code><\/pre>\n\n\n\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432 cron:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>crontab -e\n<\/code><\/pre>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u0432 2:30 \u043d\u043e\u0447\u0438):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>30 2 * * * \/<a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/root-dostup\/\" data-internallinksmanager029f6b8e52c=\"234\" title=\"Root-\u0434\u043e\u0441\u0442\u0443\u043f\">root<\/a>\/backup.sh &gt;&gt; \/var\/log\/backup.log 2&gt;&amp;1\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0424\u0430\u0439\u043b\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a\u043e\u043f\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c;<\/li>\n\n\n\n<li>\u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430 \u0432\u0447\u0435\u0440\u0430, \u043d\u0435\u0434\u0435\u043b\u044e \u043d\u0430\u0437\u0430\u0434 \u0438 \u0434\u0430\u0436\u0435 \u043c\u0435\u0441\u044f\u0446;<\/li>\n\n\n\n<li>\u0412\u0441\u0451 \u0441\u0436\u0430\u0442\u043e, \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043e \u0438 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 <strong>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c VPS \u043e\u0442 CloudVPS.by<\/strong>;<\/li>\n\n\n\n<li>\u041d\u0435 \u043d\u0443\u0436\u0435\u043d Google Drive, rsync \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437 \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u0435\u043a.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c <strong>\u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e rsync, borg \u0438 cron<\/strong> \u2014 \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438 \u0432\u044b \u0443\u0436\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0435\u0441\u044c \u0431\u0435\u0437 \u0431\u044d\u043a\u0430\u043f\u043e\u0432. \u0410 \u0441 VPS \u043e\u0442 CloudVPS.by \u0432\u0441\u0451 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u0438 \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0437\u0430 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u044b \u0432 \u0447\u0443\u0436\u0438\u0445 \u043e\u0431\u043b\u0430\u043a\u0430\u0445.<\/p>\n\n\n\n<p>\ud83d\udc49 \u041d\u0430\u0434\u043e\u0435\u043b\u043e \u0431\u043e\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435? \u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0438 \u0441\u0432\u043e\u0439 rsync-\u0441\u0435\u0440\u0432\u0435\u0440 \u2014 \u0438 \u0441\u043f\u0438 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u0442\u044b \u0445\u043e\u0442\u044c \u0440\u0430\u0437 \u0442\u0435\u0440\u044f\u043b \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0437\u043d\u0430\u0435\u0448\u044c, \u044d\u0442\u043e \u0431\u043e\u043b\u044c. \u0418 \u043b\u0430\u0434\u043d\u043e \u0431\u044b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0431\u0430\u0437\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0433\u043e\u0434\u043e\u0432\u0430\u044f \u043e\u0442\u0447\u0451\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0441\u0430\u0439\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0441\u0435\u043b \u0432 \u0442\u043e\u043f\u0435 \u2014 \u0432\u0441\u0451, \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u043f\u0430\u043d\u0438\u043a\u0430. \u042f \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e \u043f\u0440\u043e\u0448\u043b\u0430. \u0418 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u043a \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443, \u043d\u043e \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e: rsync + borg + cron. \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3566,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-3523","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gajdy"],"_links":{"self":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/posts\/3523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/comments?post=3523"}],"version-history":[{"count":5,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/posts\/3523\/revisions"}],"predecessor-version":[{"id":3697,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/posts\/3523\/revisions\/3697"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/media\/3566"}],"wp:attachment":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/media?parent=3523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/categories?post=3523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/tags?post=3523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}