{"id":655,"date":"2022-01-31T16:45:08","date_gmt":"2022-01-31T20:45:08","guid":{"rendered":"https:\/\/tecgesco.com\/blog\/?p=655"},"modified":"2022-02-01T19:56:50","modified_gmt":"2022-02-01T23:56:50","slug":"script-bat-de-backup-com-compactacao","status":"publish","type":"post","link":"https:\/\/tecgesco.com\/blog\/script-bat-de-backup-com-compactacao\/","title":{"rendered":"Script .bat de backup com compacta\u00e7\u00e3o"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"CH ERP - Backup automatizado em nuvem (Google Drive)\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/mYzHzaJfVHE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption>V\u00eddeo Explicativo<\/figcaption><\/figure>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"bkp.bat\"><code>@echo off\ncolor F1\n@echo -------------------------------------------------\n@echo   TecGesco Gestao - Script de Backup\n@echo -------------------------------------------------\n@echo   autor : Matheus Comaru\n@echo   data  : 31\/01\/2022\n@echo -------------------------------------------------\n\nset DATAHORA=%time:~0,2%%time:~3,2%%time:~6,2%_%date:~-10,2%%date:~-7,2%%date:~-4,4%\n\nset ORIGEMCHSISTEMAS=C:\\CHSISTEMAS\\*.*\nset DESTINOCHSISTEMAS=C:\\BKPTECGESCO\\CHSISTEMAS\n\nset ORIGEMBKPCHAUTO=C:\\BKPCHAUTO\\*.*\nset DESTINOBKPCHAUTO=C:\\BKPTECGESCO\\BKPCHAUTO\n\nset NOMEZIPCHSISTEMAS=C:\\BKPTECGESCO\\CHSISTEMAS_%DATAHORA%.zip\nset ORIGEMZIPCHSISTEMAS=C:\\BKPTECGESCO\\CHSISTEMAS\n\nset NOMEZIPBKPCHAUTO=C:\\BKPTECGESCO\\BKPCHAUTO_%DATAHORA%.zip\nset ORIGEMZIPBKPCHAUTO=C:\\BKPTECGESCO\\BKPCHAUTO\n\nset PASTAGOOGLEDRIVE=C:\\BKPTECGESCO\\GOOGLEDRIVE\n\n@echo -------------------------------------------------\n@echo   Iniciando COPIA CHSISTEMAS\n@echo -------------------------------------------------\nxcopy %ORIGEMCHSISTEMAS% %DESTINOCHSISTEMAS% \/i \/E \/C \/H \/y \/f\n\n@echo -------------------------------------------------\n@echo   Iniciando COPIA BKPCHAUTO\n@echo -------------------------------------------------\nxcopy %ORIGEMBKPCHAUTO% %DESTINOBKPCHAUTO% \/i \/E \/C \/H \/y \/f\n\n\n@echo -------------------------------------------------\necho    Compactando\tCHSSISTEMAS\t\t \n@echo -------------------------------------------------\n7z a -tzip %NOMEZIPCHSISTEMAS% %ORIGEMZIPCHSISTEMAS%\n\n@echo -------------------------------------------------\necho    Compactando\tBKPCHAUTO\t \n@echo -------------------------------------------------\n7z a -tzip %NOMEZIPBKPCHAUTO% %ORIGEMZIPBKPCHAUTO%\n\n@echo -------------------------------------------------\necho    Movendo Arquivos para Google Drive\t\t \n@echo -------------------------------------------------\nxcopy %NOMEZIPBKPCHAUTO% %PASTAGOOGLEDRIVE%\nxcopy %NOMEZIPCHSISTEMAS% %PASTAGOOGLEDRIVE%\n\n@echo -------------------------------------------------\necho    Deletando pasta temporaria CHSISTEMAS\t\t \n@echo -------------------------------------------------\nRMDIR %DESTINOCHSISTEMAS% \/S \/Q\nDEL %NOMEZIPCHSISTEMAS%\n\n@echo -------------------------------------------------\necho    Deletando pasta temporaria BKPCHAUTO\t\t \n@echo -------------------------------------------------\nRMDIR %DESTINOBKPCHAUTO% \/S \/Q\nDEL %NOMEZIPBKPCHAUTO%\n\n\npause<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"","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":[174,176,173,85,175],"class_list":["post-655","post","type-post","status-publish","format-standard","hentry","category-tecnico","tag-bat-2","tag-automatizado","tag-bakup","tag-bat","tag-script"],"_links":{"self":[{"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/posts\/655","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=655"}],"version-history":[{"count":5,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/posts\/655\/revisions"}],"predecessor-version":[{"id":663,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/posts\/655\/revisions\/663"}],"wp:attachment":[{"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/media?parent=655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/categories?post=655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tecgesco.com\/blog\/wp-json\/wp\/v2\/tags?post=655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}