![]() "C:\Program Files\7-Zip\7z.exe" a "D:\Backup-Hives\RegBack\%newdir%\%newdir%_hivebackup. REG LOAD HKLM\COMPONENTS "C:\Windows\System32\config\COMPONENTS" Using Advanced System Information in Windows 7. REG SAVE HKLM\COMPONENTS D:\Backup-Hives\RegBack\%newdir%\COMPONENTSĮcho HKLM\COMPONENTS key does not exist. Lets go ahead and run this script here, chi-fp01scriptsDocBackup-to-VHD. Makecab /D RptFileName="%TEMP%\~.rpt" /D InfFileName=Nul /F "%TEMP%\~.ddf" >NulĮcho HKLM\COMPONENTS key exists. The backup originally was 424MB and was compressed down to Off I did not choose to do so at this time.ĭ:\Backup\ADMIN\Batch>Backup_Registry.bat Note: For those more technically inclined the batch file could be golfed down to smaller, leaner code. Note: You should already have a full backup of your system before testing or using a batch file like this Note: Not tested on x86 32-bit or Windows 7 ( One change needed for x86 would be the path to 7-Zip) Please change the folder path " D:\Backup-Hives" to match where you want to save the backups. REG format for easy reading, copying, if needed. It backs up the hives as well as creates a full export of the Registry in. The batch file should work on Windows 10 and 11 running the 圆4-bit versions. Using the following batch file and having the opensource program 7-Zip installed you can fully back up your Windows Registry with built-in commands aside from the 7-Zip requirement The complete backup job script is mention offįorfiles -p "E:\Backup\" -s -m *.* -d -1 -c "cmd /c del onĮcho "Data backup from E:\Backup\ to E:\Archive\"įorfiles -p "E:\Backup" -s -m *.Endpoint Detection & Response for Servers Here " 0" is use to delete current day data that is inside the backup folder.įorfiles -p "E:\Backup" -s -m *.* -d -0 -c "cmd /c del make a batch file script copy all the above instruction on notepad file and save the file with ". To delete current day data that is inside Backup folder by use of forfile command, type the below mention command. Robocopy "E:\Archive" "\\owais-pc\d$\Backups" /MOV If network interruption occur, it will resume the copy process. Robocopy can easily copy large size of file or multiple files. Robocopy is similar command as rsync that use in Linux and unix base operating system, robocopy is a robust file copying program. Use Robocopy to move data from Archive folder to Backup Server, type the below mention command. "C:\Program Files\7-Zip\7z.exe" a -r "E:\Archive\Data.%TIMESTAMP%".7z "E:\Backup" Here you can see that the variable "TIMESTAMP" is being used with fix file name Data. Set Compress the Data that available inside Backup folder to Archive folder by use of 7-zip software, type the below mention command. Here "TIMESTAMP" is using as a Variable of Date that will use during the archive process of data. Here " 1" is use to delete last day data that is inside the backup folder.įorfiles -p "E:\Backup\" -s -m *.* -d -1 -c "cmd /c del Set Variable of Date that will use with archive file, type the below mention command. To delete last day data that is inside Backup folder by use of forfile command, type the below mention command. In Last delete current day data that is inside Backup folder. Use Robocopy to move data from Archive folder to Backup Server.ĥ. Compress the Data that available inside Backup folder to Archive folder.Ĥ. Set Variable of Date that will use with archive file.ģ. Delete last day data that is inside Backup folder.Ģ. ![]() To create a complete backup job script, the steps are list below.ġ. you will find in this article the commands of how to move data by use of robocopy command, how to archive (compress) data by use of 7-zip software, how to delete complete data inside a single folder by use of forfile command. In windows Task Scheduler is use to run script automatically. Here we are creating Backup Script in Windows through batch file, the extension of batch file is ".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |