Tablets How to Backup IIS | BLOG IT

How to Backup IIS


If you manage a Microsoft Web Server (IIS-Internet Information Server), you must considered to backup it regularly, in this article I will show you how to backup it in an easy way.

You could create a BAT file with the following instructions on it:

  • C:\Windows\System32\inetsrv\appcmd add backup BACKUPNAME.  

The last instruction backup the general configuration for IIS, where BACKUPNAME is the name for the backup, if you will need to store backups on a daily basis, you could use the following:
    •  Servername-Back20%date:~8,4%%date:~3,2%%date:~0,2%
      • With last command you could obtain a backup with the current date and you could use the server's name in order to identify it.

  • The next instruction will backup the Application Pools:
    • C:\Windows\System32\inetsrv\appcmd list apppool /config /xml > apppoolsServername-Back20%date:~8,4%%date:~3,2%%date:~0,2%.xml

  • And finally to get the complete list of sites, use the following instruction:
    • C:\Windows\System32\inetsrv\appcmd list site /config /xml > SitesServername-Back20%date:~8,4%%date:~3,2%%dat
      e:~0,2%.xml
This script works fine for Windows 2008 or greater.
SHARE

About Robert SA

    Blogger Comment
    Facebook Comment

0 comentarios: