IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 22nd, 2006, 05:11 PM
ronneylovely ronneylovely is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 3 ronneylovely User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 14 sec
Reputation Power: 0
Backup IIS metabase using C#

How to backup IIS metabase using C#?

Reply With Quote
  #2  
Old November 29th, 2006, 06:42 PM
ronneylovely ronneylovely is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 3 ronneylovely User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 14 sec
Reputation Power: 0
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#.

Reply With Quote
  #3  
Old December 1st, 2006, 04:26 PM
ronneylovely ronneylovely is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 3 ronneylovely User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 14 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old December 1st, 2006, 08:40 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 13th Plane (11000 - 11499 posts)
 
Join Date: Jun 2003
Posts: 11,141 Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 17 h 15 m 54 sec
Reputation Power: 857
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

Reply With Quote
  #5  
Old January 2nd, 2007, 04:11 PM
fletchsod's Avatar
fletchsod fletchsod is offline
I lov C in AIX/Linux, hate C++
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jul 2003
Location: Jacksonville, Florida
Posts: 1,567 fletchsod User rank is Sergeant Major (2000 - 5000 Reputation Level)fletchsod User rank is Sergeant Major (2000 - 5000 Reputation Level)fletchsod User rank is Sergeant Major (2000 - 5000 Reputation Level)fletchsod User rank is Sergeant Major (2000 - 5000 Reputation Level)fletchsod User rank is Sergeant Major (2000 - 5000 Reputation Level)fletchsod User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 4 h 17 m 42 sec
Reputation Power: 28
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > Backup IIS metabase using C#


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT