{"id":4832,"date":"2020-08-05T12:11:40","date_gmt":"2020-08-05T12:11:40","guid":{"rendered":"http:\/\/cloudminister.com\/?p=4832"},"modified":"2020-08-05T12:11:40","modified_gmt":"2020-08-05T12:11:40","slug":"create-automated-website-backup-shell-script","status":"publish","type":"post","link":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/","title":{"rendered":"How to Create Automated Backup for website files with shell script?"},"content":{"rendered":"<p style=\"font-weight: 400;\">In this article, we will be talking, How to create Automated Backup for website files with a shell script?<\/p>\n<h2><b>Backup<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">With the help of shell script and crontab, you can take automated backup in the server with the help of following the document.<\/span><\/p>\n<h2><b>Archive the content<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Backing up your files using tar is very simple using the following command:\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># <\/span><span style=\"font-weight: 400;\">tar -cvpzf \/backup\/backupfilename.tar.gz \/data\/directory<\/span><\/p>\n<p><span style=\"font-weight: 400;\">A real example would be backing up the HTML folder for your website, my case:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># <\/span><span style=\"font-weight: 400;\">tar -cvpzf \/backup\/file_name.tar.gz \/var\/www\/html<\/span><\/p>\n<h2><b>Tar command explained<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">tar = Tape archive<\/span><\/p>\n<p><span style=\"font-weight: 400;\">c = Create<\/span><\/p>\n<p><span style=\"font-weight: 400;\">v = Verbose mode will print all files that are archived.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">p = Preserving files and directory permissions.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">z = This will tell tar that to compress the files.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">f = It allows tar to get the file name.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now create a backup script with the help of vi editors.<\/span><\/p>\n<h2><b>Create Backup Script<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Now let&#8217;s add tar command in a bash script to make this backup process automatic. Also, it is good to add some dynamic value in the name to make sure there is no overwriting of backup files.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">E.g. Create the file using the vi editor and paste the below script.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"># <\/span><span style=\"font-weight: 400;\">vi \/backup.sh<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Paste the following script and change your details.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">#!\/bin\/bash<\/span><\/p>\n<p><span style=\"font-weight: 400;\">TIME=`date +%b-%d-%y`\u00a0 <\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0 <\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 # This Command will read the date.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">BK_FILENAME=backup-domainname.com-$TIME.tar.gz\u00a0 <\/span><span style=\"font-weight: 400;\">\u00a0\u00a0# The filename including the date.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">SOURCE=\/var\/www\/html\u00a0 <\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0 <\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 # Source backup folder.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">DESCT=\/backup \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0 <\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0 <\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 # Destination of backup file.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">tar -czf $DESCT\/$BK_FILENAME $SOURCE<\/span><\/p>\n<p><b>Note:<\/b><span style=\"font-weight: 400;\"> The only risk that can occur is to get out of disk memory if the source folder is big, but you can configure it by removing file after 30 days or any number of days with the help of the find command.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">find \/backup -type f -name \u2018*.gz\u2019 -mtime +15 -exec rm {} \\;<\/span><\/p>\n<h2><b>Automation<br \/>\n<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">In Linux, we can easily use the cron jobs in order to schedule tasks and perform the above backup task easily.\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 The cron jobs line has 6 parts see below explanation: Minutes Hours Day of Month Month Day of Week Command 0 to 59 0 to 23 1 to 31 1 to 12 0 to 6 Shell Command Open crontab editor utility:<br \/>\n# <\/span><span style=\"font-weight: 400;\">crontab -e\u00a0 <\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b><\/b><\/p>\n<p><b>Note:<\/b><span style=\"font-weight: 400;\"> the edit rules are similar to vi editors.<br \/>\nPaste the following text in the editor:<br \/>\n# M H DOM M DOW CMND<br \/>\n00 04 * * * \/bin\/bash \/backup.sh<br \/>\nThis will run the script every day at 04:00:00.<br \/>\nCheck the rules of crontab with the help of the following command:<br \/>\n# <\/span><span style=\"font-weight: 400;\">Crontab -l<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<h2><b>CONCLUSION<\/b><span style=\"font-weight: 400;\">&#8211; <\/span><\/h2>\n<p><span style=\"font-weight: 400;\">After the above configuration, you can take backup automatically and remove it in some specific period of time.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple&#8230;<\/p>\n","protected":false},"author":1,"featured_media":4835,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[90,59,62,66],"tags":[259,260,261,262,65,263,264],"class_list":["post-4832","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-beginner","category-general","category-how-to","category-technology","tag-automation","tag-backup","tag-command","tag-create-backup-script","tag-linux","tag-shell-script","tag-website-files"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Tanuj Chugh\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"CloudMinister -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to Create Automated Backup for website files with shell script? - CloudMinister\" \/>\n\t\t<meta property=\"og:description\" content=\"In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-08-05T12:11:40+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-08-05T12:11:40+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to Create Automated Backup for website files with shell script? - CloudMinister\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#blogposting\",\"name\":\"How to Create Automated Backup for website files with shell script? - CloudMinister\",\"headline\":\"How to Create Automated Backup for website files with shell script?\",\"author\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Automated-Backup.png\",\"width\":600,\"height\":305,\"caption\":\"Automation, Backup, Command, Create Backup Script, Linux, Shell Script,  Website Files,\"},\"datePublished\":\"2020-08-05T12:11:40+00:00\",\"dateModified\":\"2020-08-05T12:11:40+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#webpage\"},\"articleSection\":\"Beginner, General, How tos, Linux, Automation, Backup, Command, Create Backup Script, linux, Shell Script, Website Files\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/general\\\/#listItem\",\"name\":\"General\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/general\\\/#listItem\",\"position\":2,\"name\":\"General\",\"item\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/general\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#listItem\",\"name\":\"How to Create Automated Backup for website files with shell script?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#listItem\",\"position\":3,\"name\":\"How to Create Automated Backup for website files with shell script?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/general\\\/#listItem\",\"name\":\"General\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\",\"name\":\"CloudMinister\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/#author\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/\",\"name\":\"Tanuj Chugh\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3395bcaf63eb5840dd73f67c7cb69ffd3dfe33336c1bdb1f1b9aeabe5b05e15a?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Tanuj Chugh\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#webpage\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/\",\"name\":\"How to Create Automated Backup for website files with shell script? - CloudMinister\",\"description\":\"In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/tanuj-chugh\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Automated-Backup.png\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#mainImage\",\"width\":600,\"height\":305,\"caption\":\"Automation, Backup, Command, Create Backup Script, Linux, Shell Script,  Website Files,\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/create-automated-website-backup-shell-script\\\/#mainImage\"},\"datePublished\":\"2020-08-05T12:11:40+00:00\",\"dateModified\":\"2020-08-05T12:11:40+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\",\"name\":\"CloudMinister\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Create Automated Backup for website files with shell script? - CloudMinister","description":"In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple","canonical_url":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#blogposting","name":"How to Create Automated Backup for website files with shell script? - CloudMinister","headline":"How to Create Automated Backup for website files with shell script?","author":{"@id":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/#author"},"publisher":{"@id":"https:\/\/cloudminister.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/08\/Automated-Backup.png","width":600,"height":305,"caption":"Automation, Backup, Command, Create Backup Script, Linux, Shell Script,  Website Files,"},"datePublished":"2020-08-05T12:11:40+00:00","dateModified":"2020-08-05T12:11:40+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#webpage"},"isPartOf":{"@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#webpage"},"articleSection":"Beginner, General, How tos, Linux, Automation, Backup, Command, Create Backup Script, linux, Shell Script, Website Files"},{"@type":"BreadcrumbList","@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/cloudminister.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/general\/#listItem","name":"General"}},{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/general\/#listItem","position":2,"name":"General","item":"https:\/\/cloudminister.com\/blog\/category\/general\/","nextItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#listItem","name":"How to Create Automated Backup for website files with shell script?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#listItem","position":3,"name":"How to Create Automated Backup for website files with shell script?","previousItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/general\/#listItem","name":"General"}}]},{"@type":"Organization","@id":"https:\/\/cloudminister.com\/blog\/#organization","name":"CloudMinister","url":"https:\/\/cloudminister.com\/blog\/"},{"@type":"Person","@id":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/#author","url":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/","name":"Tanuj Chugh","image":{"@type":"ImageObject","@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3395bcaf63eb5840dd73f67c7cb69ffd3dfe33336c1bdb1f1b9aeabe5b05e15a?s=96&d=mm&r=g","width":96,"height":96,"caption":"Tanuj Chugh"}},{"@type":"WebPage","@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#webpage","url":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/","name":"How to Create Automated Backup for website files with shell script? - CloudMinister","description":"In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/cloudminister.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#breadcrumblist"},"author":{"@id":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/#author"},"creator":{"@id":"https:\/\/cloudminister.com\/blog\/author\/tanuj-chugh\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/08\/Automated-Backup.png","@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#mainImage","width":600,"height":305,"caption":"Automation, Backup, Command, Create Backup Script, Linux, Shell Script,  Website Files,"},"primaryImageOfPage":{"@id":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/#mainImage"},"datePublished":"2020-08-05T12:11:40+00:00","dateModified":"2020-08-05T12:11:40+00:00"},{"@type":"WebSite","@id":"https:\/\/cloudminister.com\/blog\/#website","url":"https:\/\/cloudminister.com\/blog\/","name":"CloudMinister","inLanguage":"en-US","publisher":{"@id":"https:\/\/cloudminister.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"CloudMinister -","og:type":"article","og:title":"How to Create Automated Backup for website files with shell script? - CloudMinister","og:description":"In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple","og:url":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/","article:published_time":"2020-08-05T12:11:40+00:00","article:modified_time":"2020-08-05T12:11:40+00:00","twitter:card":"summary_large_image","twitter:title":"How to Create Automated Backup for website files with shell script? - CloudMinister","twitter:description":"In this article, we will be talking, How to create Automated Backup for website files with a shell script? Backup With the help of shell script and crontab, you can take automated backup in the server with the help of following the document. Archive the content Backing up your files using tar is very simple"},"aioseo_meta_data":{"post_id":"4832","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2025-05-21 07:28:57","updated":"2025-08-07 04:50:52","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cloudminister.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cloudminister.com\/blog\/category\/general\/\" title=\"General\">General<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Create Automated Backup for website files with shell script?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/cloudminister.com\/blog\/"},{"label":"General","link":"https:\/\/cloudminister.com\/blog\/category\/general\/"},{"label":"How to Create Automated Backup for website files with shell script?","link":"https:\/\/cloudminister.com\/blog\/create-automated-website-backup-shell-script\/"}],"_links":{"self":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts\/4832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/comments?post=4832"}],"version-history":[{"count":0,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts\/4832\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/media\/4835"}],"wp:attachment":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/media?parent=4832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/categories?post=4832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/tags?post=4832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}