Return to site

Schedule Server 2003 Backup Batch File

broken image


Being a System administrator, it is your responsibility to backup even logs of your system regularly. Willson euphonium serial numbers. Event logs help us for troubleshooting systems. In this tutorial, you will get a simple batch script to take windows event log backups on your Windows system.

  1. Schedule Server 2003 Backup Batch File Mac
  2. Schedule Server 2003 Backup Batch File Windows 7

Step 1 – Create Backup Directory

Create a backup directory named c:backup for containing backups and c:backuplogs for containing log files. You can use your own directory structure for backup.

Open a command prompt and run below commands to create the directory structure.

Step 2 – Create Backup Script

  • I need to schedule a task in Windows Server 2003 that executes this script that deletes files older that n days in the specified folder. The script needs 3 parameters:%1 path to folder where files need to be deleted%2 file names (es.log)%3 number of days @echo off forfiles -p%1 -s -m%2 -d -%3.
  • This solution will work for everything from Windows 10, down to XP, and Server 2003. No external tools are required. Backup MySQL Databases with Batch File. Create a mysql-backup.bat file to export all the databases (or only select databases), using a DATE-TIME file-name stamp, and compress the SQL file.
Batch

Now, create a batch script c:backupevt-backup.bat and copy the below script in this batch script. Change the BACKUP_PATH if you are using a different location for backup directory.

If sufficient temporary disk space is not available Windows Server 2003 cannot complete shadow copy and the backup will skip open files. To use this feature you must use NTFS as file system. Volume Shadow Copy does not mean that you from now on can backup when the server usage is high.

Step 3 – Execute Script Manullly

Let's execute this script manually to test. Open Windows command prompt as Administrator. Navigate to c:backup directory and execute the script like below:

Then check, if event log backup files created successfully.

Step 4 – Configure Script in Scheduler

Schedule Server 2003 Backup Batch File Mac

Finally, configure this script in windows task schedulers to run it automatically on a regular interval. A daily backup is much sufficient for normal uses systems.

Schedule Server 2003 Backup Batch File Windows 7

Thanks for reading this article, I hope this script will help you to take automatic backup of windows logs.





broken image