{"id":239,"date":"2021-04-08T09:44:46","date_gmt":"2021-04-08T13:44:46","guid":{"rendered":"https:\/\/tecgesco.com\/blog\/?p=239"},"modified":"2021-04-08T09:44:46","modified_gmt":"2021-04-08T13:44:46","slug":"rotina-de-backup-backup-bat","status":"publish","type":"post","link":"https:\/\/tecgesco.com\/blog\/rotina-de-backup-backup-bat\/","title":{"rendered":"Rotina de backup (backup.bat)"},"content":{"rendered":"\n<p>1\u00ba &#8211; Crie um arquivo texto na \u00e1rea de trabalho.<\/p>\n\n\n\n<p>2\u00ba &#8211; Mude a extens\u00e3o do arquivo para .bat<\/p>\n\n\n\n<p>3\u00ba &#8211; Abra o arquivo com o bloco de notas ou outro editor de texto e cole o c\u00f3digo abaixo e defina as vari\u00e1veis DESTINO e DESTINOCH conforme necessidade.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">cls\r\n<span class=\"hljs-keyword\">echo<\/span> off\r\ncls\r\nset ORIGEM=C:\\BKPCHAUTO\\*.*\r\nset DESTINO=C:\\CHBKP\\BKPCHAUTO\r\nset ORIGEMCH=C:\\CHSISTEMAS\\*.*\r\nset DESTINOCH=C:\\CHBKP\\CHSISTEMAS\r\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-comment\"># - - - - - - - - - - - - - - - - - - - - - - - - - #<\/span>\r\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-comment\">#    COPIA DE ARQUIVOS E\/OU DIRETORIOS BKPCHAUTO\t #<\/span>\r\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-comment\"># - - - - - - - - - - - - - - - - - - - - - - - - - #<\/span>\r\nxcopy %ORIGEM% %DESTINO% \/E \/C \/H \/y \/f\r\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-comment\"># - - - - - - - - - - - - - - - - - - - - - - - - - #<\/span>\r\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-comment\">#    COPIA DE ARQUIVOS E\/OU DIRETORIOS CHSISTEMAS   #<\/span>\r\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-comment\"># - - - - - - - - - - - - - - - - - - - - - - - - - #<\/span>\r\nxcopy %ORIGEMCH% %DESTINOCH% \/E \/C \/H \/y \/f\r\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>O arquivo de backup est\u00e1 pronto, execute o mesmo para fazer o teste.<\/p>\n\n\n\n<p>Lembrando que \u00e9 necess\u00e1rio ter a pasta origem j\u00e1 criada.<\/p>\n\n\n\n<p>Funcionando, crie rotinas no agendador de tarefas do Windows para executar esse arquivo .bat de tempos em tempos.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u00ba &#8211; Crie um arquivo texto na \u00e1rea de trabalho. 2\u00ba &#8211; Mude a extens\u00e3o do arquivo para .bat 3\u00ba &#8211; Abra o arquivo com o bloco de notas ou outro editor de texto e cole o c\u00f3digo abaixo e defina as vari\u00e1veis DESTINO e DESTINOCH conforme necessidade. O arquivo de backup est\u00e1 pronto, execute [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-239","post","type-post","status-publish","format-standard","hentry","category-tecnico"],"_links":{"self":[{"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/posts\/239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/comments?post=239"}],"version-history":[{"count":2,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/posts\/239\/revisions"}],"predecessor-version":[{"id":241,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/posts\/239\/revisions\/241"}],"wp:attachment":[{"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/media?parent=239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/categories?post=239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/tags?post=239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}