{"id":10,"date":"2006-06-27T11:59:30","date_gmt":"2006-06-27T11:59:30","guid":{"rendered":"http:\/\/ramblingsofasysadmin.com\/blog\/?p=10"},"modified":"2006-06-27T11:59:30","modified_gmt":"2006-06-27T11:59:30","slug":"simple-backup-scripts","status":"publish","type":"post","link":"http:\/\/ramblingsofasysadmin.com\/?p=10","title":{"rendered":"simple backup scripts."},"content":{"rendered":"<p>i think there&#8217;s a golden rule in system administration: never underestimate the importance of backups.  i have a few small scripts that you can use with rsync or just local that i decided may be useful, and i&#8217;m going to share them here.  maybe later on when i master rsync, i&#8217;ll post a tutorial about it here as well.<br \/>\na mysql backup may work for you as follows:<br \/>\n<font face=\"courier\">mysqldump -A &#8211;password=xxxxxx | gzip > \/root\/mysql_backup\/`date +%m%d%y_%T`.sql.gz<\/font><br \/>\non the other hand, if you want to backup all qmail for a particular domain, you can attempt to do a job as such:<br \/>\n<font face=\"courier\">tar zcvf \/root\/domain\/mailbackup-`date +%m%d%y_%T`.tar.gz \/var\/qmail\/mailnames\/domain.com\/<\/font><br \/>\ni have a cron job that runs nightly to execute these tasks, and i find them rather useful, especially since the inclusion of the timestamp gives me an idea of what could have happened and when.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>i think there&#8217;s a golden rule in system administration: never underestimate the importance of backups. i have a few small scripts that you can use with rsync or just local that i decided may be useful, and i&#8217;m going to share them here. maybe later on when i master rsync, i&#8217;ll post a tutorial about it here as well. a mysql backup may work for you as follows: mysqldump -A &#8211;password=xxxxxx | gzip > \/root\/mysql_backup\/`date <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"http:\/\/ramblingsofasysadmin.com\/?p=10\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10"}],"version-history":[{"count":0,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}