You can optionally enter an Error Limit Message.ĭo not forget to set a notification trigger for the sensor so that PRTG can notify you when the sensor status changes.įor more information, see the Knowledge Base: My Event Log sensor ignores changes in the event log. Under Limits, select Enable alerting based on limits and enter 0,0001 as an Upper Error Limit to set the sensor to a Down status as soon as there is a new event log message that matches all your filter criteria. Leave all other settings as they are and click Create to add the sensor.Ĭlick below the gauge of the New Records channel to edit the channel settings Set the Scanning Interval option to a value that fits the creation of your backups. Which string you enter depends on the entry that your specific backup solution writes in the event log.ĭid you know that if you do not want the string to match the whole event message, you need to use the percent sign ( %) as wildcard for any or no character? For example, if you want the sensor to filter for the string backup failed, enter %backup failed%. Then enable the Filter by Message option and enter a string that the message should match. This is in the latest Powershell version on Windows 10. Ive tried running this as various users and on different machines but with the same result. For some reason it can backup all libraries but fails to backup any of the Desktop files. Enable the Filter by Source option and enter a string that the event source should match, for example, backup. I am using a script I modified slightly to backup user library files. In section Filter Event Log Entries, set the Event Type option to Error.The above procedure is for Windows Server 2003 but it’s also working for Windows 7. By doing this the system will be able to execute our script even if we are not logged on. After that in the properties window set the password for your account.Before you press the finish button make sure that you have checked the box Open the Advanced Properties for this task when I click finish.The admin can pass the source and target directory parameters. Enter the info for your script and when you want it to run A new folder will be created to store the backup files and folders.For example, if our script is located in the C:myscriptbackup_script.bat you must enter in the Start in field this: C:myscript You must enter the path of your script otherwise it’s not going to work. Something very important here is the optional Start in field.Press Next and then Press the Browse button and select your batch script.Start->Programs-> Accessories->System Tools->Scheduled Tasks.The last thing we have to do is to create a task for our batch file. IF %ERRORLEVEL% = 0 ( MOVE "%USERPROFILE%Desktop*.rar" I:Backup So a small example for moving our backup in a network drive is this : NET USE I: Also you can add and network commands if you want to move your backup in a network drive or something. Of course you can change the script to fit your needs. You will find the archive and a text file that contains informations about the backup process to your desktop. The above script takes all the data from the C:data folder it compress them with the name databackup and appends to the name the year, month and day that was created. We also created the BAT file with a script to start the WBADMIN utility. "%PROGRAMFILES%WinRARrar.exe" a -agYYYY-MM-dd -r "%USERPROFILE%Desktopdatabackup-.rar" "C:data"ĮCHO %date%, %time% : Backup succeeded > "%USERPROFILE%DesktopData_Backup_Log.txt"ĮCHO %date%, %time% : Backup succeeded with warnings > "%USERPROFILE%DesktopData_Backup_Log.txt"ĮCHO %date%, %time% : Backup failed > "%USERPROFILE%DesktopData_Backup_Log.txt" We created a local folder for interim backup storage. Here is a sample script that does the job. The best way to do this is to schedule a task in windows.Įnough with my story. After that, the only thing that left was to make this small batch file repeat itself once a week. I must admit that the manual of the WinRar is very good!Īs I found what I need (how to make a rar archive and append the year,month and day in the name of my archive) I start writing a batch file. I start searching about WinRar and I found that WinRar tool can be used in a terminal through the rar.exe plugin. What I had was a Windows system and the WinRar tool. When I say backup I mean to backup the data at least every week since it is not updated very often.īecause I don’t know if there is any worth free backup solution for Windows and because I prefer to learn something new I start thinking a way to automate the backup. When we finished the setup and the configuration the last thing we had to do was to find a way to backup our data. Although I prefer Linux, the server was running Windows 2003 so we had to go with this. The last week we setup an internal site for the needs of the company.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |