Created
January 24, 2017 13:30
-
-
Save jvinceso/f9d91df19e9965d044139abced0a30ac to your computer and use it in GitHub Desktop.
Comprime los archivos dentro de una ruta específica y los copia a otra dirección de red(servidor de respaldo)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM AUTHOR=Jose Vinces | |
REM #dsdfsd | |
set year=%date:~-4,4% | |
set month=%date:~-10,2% | |
set day=%date:~-7,2% | |
set hour=%time:~-11,2% | |
set hour=%hour: =0% | |
set min=%time:~-8,2% | |
set sharedMortifago="\\10.10.21.230\backups\WebS\" | |
set rutaOrigen= "C:\inetpub\wwwroot\oficinadigital\*" | |
set oficinaName=oficinadigital.%year%.%month%.%day%.%hour%%min%.7z | |
set destinoOficina= "\\10.10.21.230\backups\WebS\%oficinaName%" | |
REM #Ruta Portal Oficial | |
set rutaPortal= "D:\SitiosWeb\V2\*" | |
set destinoPortal= %sharedMortifago%PortalV2.%year%.%month%.%day%.%hour%%min%.7z | |
echo la ruta sds "%rutaOrigen%" | |
7z a -mx9 -r -t7z %destinoOficina% %rutaOrigen% | |
echo Oficina Digital %rutaOrigen% backed up to %destinoOficina% is complete! | |
echo backupeando "%rutaPortal%" | |
7z a -mx9 -r -t7z %destinoPortal% %rutaPortal% | |
echo Oficina Digital %rutaPortal% backed up to %destinoPortal% is complete! | |
REM #7z a oficinaName 9 -mx9 -xr!excluir -xr!*.7z -r "D:\d\log\*" | |
REM #7z a oficinaName 9 -mx9 -xr!excluir -xr!*.7z -r "D:\d\log\*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment