{"id":9555,"date":"2021-01-11T18:01:12","date_gmt":"2021-01-11T15:01:12","guid":{"rendered":"https:\/\/unihost.com\/help\/simple-backup-script-bash\/"},"modified":"2023-01-19T13:58:31","modified_gmt":"2023-01-19T10:58:31","slug":"simple-backup-script-bash","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/","title":{"rendered":"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash)"},"content":{"rendered":"<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">In this guide, I will show you how to create a backup of the database and site files using a simple bash script. I will also show you how you can automate the process and set up the archive rotation.<!--more--><\/span><!--more--><\/p>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0Bash Script<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Just copy the next script to your server. In my case, it will be \/opt\/backup.sh<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">#!\/bin\/bash<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">PROJNAME=unihost.com<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">DBNAME=$(mysqlshow | sed 's\/[|+-]\/\/g' | grep -v Databases | grep -v information_schema | grep -v performance_schema | grep -v mysql | sed 's\/^[ \\t]*\/\/;s\/[ \\t]*$\/\/' | sort | sed '\/.\/,$!d') #DB name<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">DATADIR=\/backup #backup path<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">SRC=\/var\/www\/unihost #folder to backup<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">PREFIX=`date +%F`<\/span><br \/><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">#start backup<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[--------------------------------[`date +%F--%H-%M`]--------------------------------]\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[----------][`date +%F--%H-%M`] Run the backup script...\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">mkdir -p $DATADIR\/$PREFIX 2&gt; \/dev\/null<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[++--------][`date +%F--%H-%M`] Generate a database backup...\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">#MySQL dump<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">for DB in $DBNAME<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">do<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">mysqldump $DB &gt; $DATADIR\/$PREFIX\/$DB.sql<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">done<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">if [[ $? -gt 0 ]];then<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[++--------][`date +%F--%H-%M`] Aborted. Generate database backup failed.\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">exit 1<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">fi<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[++++++----][`date +%F--%H-%M`] Copy the source code project [$PROJNAME]...\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">#SRC tar<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">tar -czPf $DATADIR\/$PREFIX\/$PROJNAME.tar.gz $SRC<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">if [[ $? -gt 0 ]];then<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[++++++----][`date +%F--%H-%M`] Aborted. Copying the source code failed.\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">exit 1<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">fi<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[++++++++--][`date +%F--%H-%M`] Copy the source code project [$PROJNAME] successfull.\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[+++++++++-][`date +%F--%H-%M`] Stat datadir space (USED): `du -h $DATADIR | tail -n1`\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[+++++++++-][`date +%F--%H-%M`] Free HDD space: `df -h \/|tail -n1|awk '{print $4}'`\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">echo \"[++++++++++][`date +%F--%H-%M`] All operations completed successfully!\"<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">exit 0<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">You need to change:<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">PROJNAME &#8211; it&#8217;s just a name<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">DATADIR &#8211; folder where backups are stored<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">SRC &#8211; folder what will be backuped<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Give execute permission the script<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">chmod +x \/opt\/backup.sh<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Now you can test the backup.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">cd \/opt<br \/><\/span><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">.\/backup<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/unihost.com\/help\/minio.php?DM_241220_oCouw6cF.png\" alt=\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash) - Image 1\" width=\"700\" height=\"146\" \/ title=\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash) - Image 1\"><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">All my databases and website files are backuped.<\/span><\/p>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Automation<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">I want to create a backup at 02:00 every day, so I will add the next cron task:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">crontab -e<\/span><br \/><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">0 2 * * * \/opt\/backup.sh | tee \/var\/log\/backup.log<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">That&#8217;s all daily backup is set up.<\/span><\/p>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Rotation<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">In order to remove old archives and save disk space. I\u00a0will set up an archive rotation. In my case, I will remove files older than 14 days.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">I will create a new bash script \/opt\/rotate.sh<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">#!\/bin\/bash<\/span><br \/><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">find \/backup -type f -mtime +14 -exec rm -f {} \\;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">find \/backup -type d -empty -delete<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Now you should add a rotation script to cron.<\/span><\/p>\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, I will show you how to create a backup of the database and site files using a simple bash script. I will also show you how you can automate the process and set up the archive rotation.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[666,672,126,682],"class_list":["post-9555","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers-ru","tag-backup-ru","tag-backup-ru-2","tag-linux-ru","tag-simple-ru"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash) - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"\u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0430\u0439\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e bash \u0441\u043a\u0440\u0438\u043f\u0442\u0430.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash) - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"\u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0430\u0439\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e bash \u0441\u043a\u0440\u0438\u043f\u0442\u0430.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-11T15:01:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-19T10:58:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash)\",\"datePublished\":\"2021-01-11T15:01:12+00:00\",\"dateModified\":\"2023-01-19T10:58:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/\"},\"wordCount\":180,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/#organization\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png\",\"keywords\":[\"backup\",\"backup\",\"Linux\",\"simple\"],\"articleSection\":[\"02. \u0421\u0435\u0440\u0432\u0435\u0440\u044b\"],\"inLanguage\":\"ru\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/\",\"url\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/\",\"name\":\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash) - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png\",\"datePublished\":\"2021-01-11T15:01:12+00:00\",\"dateModified\":\"2023-01-19T10:58:31+00:00\",\"description\":\"\u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0430\u0439\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e bash \u0441\u043a\u0440\u0438\u043f\u0442\u0430.\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#breadcrumb\"},\"inLanguage\":\"ru\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#primaryimage\",\"url\":\"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/ru\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#website\",\"url\":\"https:\/\/unihost.com\/help\/ru\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/ru\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/ru\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/ru\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash) - Unihost.FAQ","description":"\u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0430\u0439\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e bash \u0441\u043a\u0440\u0438\u043f\u0442\u0430.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/","og_locale":"ru_RU","og_type":"article","og_title":"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash) - Unihost.FAQ","og_description":"\u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0430\u0439\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e bash \u0441\u043a\u0440\u0438\u043f\u0442\u0430.","og_url":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2021-01-11T15:01:12+00:00","article_modified_time":"2023-01-19T10:58:31+00:00","og_image":[{"url":"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png","type":"","width":"","height":""}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash)","datePublished":"2021-01-11T15:01:12+00:00","dateModified":"2023-01-19T10:58:31+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/"},"wordCount":180,"publisher":{"@id":"https:\/\/unihost.com\/help\/ru\/#organization"},"image":{"@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#primaryimage"},"thumbnailUrl":"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png","keywords":["backup","backup","Linux","simple"],"articleSection":["02. \u0421\u0435\u0440\u0432\u0435\u0440\u044b"],"inLanguage":"ru"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/","url":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/","name":"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash) - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/ru\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#primaryimage"},"image":{"@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#primaryimage"},"thumbnailUrl":"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png","datePublished":"2021-01-11T15:01:12+00:00","dateModified":"2023-01-19T10:58:31+00:00","description":"\u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0430\u0439\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e bash \u0441\u043a\u0440\u0438\u043f\u0442\u0430.","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#breadcrumb"},"inLanguage":"ru","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/"]}]},{"@type":"ImageObject","inLanguage":"ru","@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#primaryimage","url":"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png","contentUrl":"https:\/\/unihost.com\/help\/wp-content\/uploads\/DM_241220_oCouw6cF.png"},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/ru\/simple-backup-script-bash\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/ru\/"},{"@type":"ListItem","position":3,"name":"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u043a\u0430\u043f\u0430 (bash)"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/ru\/#website","url":"https:\/\/unihost.com\/help\/ru\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/ru\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/ru\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/ru\/","logo":{"@type":"ImageObject","inLanguage":"ru","@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"ru","@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/ru\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/posts\/9555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/comments?post=9555"}],"version-history":[{"count":2,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/posts\/9555\/revisions"}],"predecessor-version":[{"id":13676,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/posts\/9555\/revisions\/13676"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/media?parent=9555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/categories?post=9555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/tags?post=9555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}