Lets backup whatever directory you decide step by step. We are going to use Windows Task Schedule.

Step 1

BAT File (except publish folder)

@echo off
set drive=D:\Backups
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
set AppExePath=%ProgramFiles%\7-Zip\7z.exe
set ext=.7z
echo ### Backing up your Sites directory…
rem %backupcmd% “C:\Chelsea98 Projects\Web-Financial-Education” “%drive%\%dateNtime%”
“%AppExePath%” a “%drive%\%dateNtime%_Web-Financial-Education%ext%” “C:\Chelsea98 Projects\Web-Financial-Education\*” -xr!Publish
echo Backup Complete – Your Backup is located at %drive%
exit

BAT File (all folder)

@echo off
set drive=D:\Backups
set dateNtime=%DATE:/=-%_%TIME::=-%
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
set AppExePath=%ProgramFiles%\7-Zip\7z.exe
set ext=.7z
echo ### Backing up your Sites directory…
rem %backupcmd% “C:\Chelsea98 Projects\Web-Financial-Education” “%drive%\%dateNtime%”
“%AppExePath%” a “%drive%\%dateNtime%_Web-Financial-Education%ext%” “C:\Chelsea98 Projects\Web-Financial-Education\*”
echo Backup Complete – Your Backup is located at %drive%
exit

Step 2

Run Bat File for backup

To open the Task Schedule, go to Windows Search > Task Schedule > Open > Create Task

Step 3

Step 4

Step 5

Restore Point (Automatic)

Step 6

-ExecutionPolicy Bypass -Command “Checkpoint-Computer -Description \”Restore Point (Automatic)\” -RestorePointType \”MODIFY_SETTINGS\””

Step 7


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *