TEE :: output to console window, as well as the log file. NP :: No Progress - don't display percentage copied. NDL :: No Directory List - don't log directory names. W:1 :: Wait time between retries: default is 30 seconds. R:0 :: number of Retries on failed copies: default 1 million. PURGE :: delete dest files/dirs that no longer exist in source. COPY:DAT :: what to COPY for files (default is /COPY:DAT). E :: copy subdirectories, including Empty ones. S :: copy Subdirectories, but not empty ones. :: Exclude files with any of the given Attributes set XJD :: eXclude Junction points for Directories. M :: copy only files with the Archive attribute and reset it. :: Destination Directory (this is given in command line) :: Source Directory (this is given in command line) :: robocopy.exe "c:\projects" "E:\backup\projects" /JOB:backup-robocopy-job.rcj GOTO %dt% robocopy completed > %dt% robocopy :: Robocopy Job Parameters IF NOT EXIST "%dstfile2%.7z.001" attrib A "%srcfile%"Ĭ:\apps\commands\7za.exe -mx0 -v4000m u "%dstfile2%.7z" "%srcfile%"Īttrib -A %dt% Splitted %srcfile% > ?sedir?ckup-robocopy-log.txt Set dstfile2=?st%\non-robocopy\Users\Myname\VirtualBox VMs\Ubuntu\Ubuntu.vdi Set dstfile=?st%\Users\Myname\VirtualBox VMs\Ubuntu\Ubuntu.vdi Set srcfile=C:\Users\Myname\VirtualBox VMs\Ubuntu\Ubuntu.vdi Start "Keep system awake" /MIN /LOW cmd.exe /C ?sedir?ckup-robocopy-movemouse.batĬall :BACKUP "Program Files\MariaDB 5.5\data"Ĭall :BACKUP Split 4GB file to multiple files to support FAT32 destination splitted files must be stored outside of the robocopy destination folder. I should use NTFS disk but haven't converted backup disks yet.Įcho "%dt% robocopy started" > ?sedir?ckup-robocopy-lock.txt You may leave this part out.Īnother is 7-Zip tool for splitting virtualbox files smaller than 4GB files, my destination folder is still FAT32 so this is mandatory. Script is using a lockfile to tell when backup script is completed and mousemove.bat script is closed. This script needs NirCmd tool to keep mouse moving so that my machine won't fall into sleep. Use /M command line, this is my backup script with few extra tricks. You can use robocopy to copy files with an archive flag and reset the attribute.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |