|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Backup IIS metabase using C#
How to backup IIS metabase using C#?
|
|
#2
|
|||
|
|||
|
Is there any one who knows the answer.
I got couple of VB scripts that can Backup IIS's Metabase. But not a single thing for C#. Does any one know how to backup IIS's Metabase using c#. |
|
#3
|
|||
|
|||
|
After searching over the Internet for 3 days..
I have got two VB Scripts , but i dont know how to convert it to C# code.. Can any one help me in this? ---------------Back up IIS Metabase---------------- '**** Start of Script Dim MyNetowrk Set MyNetwork = Wscript.createobject("Wscript.Network") '**** Runs the IIS Metabase Backup Dim ComputerObj, iFlags, strDate Set ComputerObj = GetObject("IIS://" & MyNetwork.Computername) iFlags = (MD_BACKUP_SAVE_FIRST or MD_BACKUP_FORCE_BACKUP) strDate = Month(date) & "-" & Day(date) & "-" & Year(date) & "-" & MyNetwork.Computername ComputerObj.Backup strDate, MD_BACKUP_NEXT_VERSION, iFlags '**** End of Script ---------Restore IIS Meta Base----------------------- **** Start of Script Dim MyNetowrk Dim ComputerObj Set MyNetwork = Wscript.createobject("Wscript.Network") '**** Runs the IIS Metabase Restore Set ComputerObj = GetObject("IIS://" & MyNetwork.Computername) '**** Restore the highest number version in MyBackups '**** Mybackups is the name of the last backup of the metabase '**** All you have to do is type in the name of it and and the vbs script '**** You could get more fancy on this and do other things, but this is the '**** basics of it ComputerObj.Restore "MyBackups", MD_BACKUP_HIGHEST_VERSION, 0 '**** End of Script |
|
#4
|
|||
|
|||
|
Try asking in the NET forum maybe, this really isn't an IIS question any longer.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#5
|
||||
|
||||
|
Have you get found the solution about whether is it possible to make a backup of a IIS web server (or configuration file) yet?
I am encountering this same situation due to lack of support for .NET. To make the matter worse, if you make a backup of it on one machine and restoring it on another machine would not work. It's what the documentation said. Look like I may will have to install Apache and move the websites over to it and junk the IIS. Everything I need is all there in the Apache directories. It is pretty organized. I can tweak the configuration to make it work on a different machine. I will have to find a Dot Net module for Apache though. |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > Backup IIS metabase using C# |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|