• RSS
  • Twitter
  • FaceBook

Welcome to ISAserver.org

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Automate Backup of ISA Config with Script

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [ISA Server 2004 Firewall] >> General >> Automate Backup of ISA Config with Script Page: [1]
Login
Message << Older Topic   Newer Topic >>
Automate Backup of ISA Config with Script - 14.Dec.2005 10:14:08 AM   
aeropostale

 

Posts: 65
Joined: 19.Jul.2005
From: Lake of Zurich, Switzerland
Status: offline
Hi @ all. Does anybody have a script that backups the ISA 2004 Configuration ? Thanks a lot !  Aero P.
Post #: 1
RE: Automate Backup of ISA Config with Script - 14.Dec.2005 11:57:59 AM   
aeropostale

 

Posts: 65
Joined: 19.Jul.2005
From: Lake of Zurich, Switzerland
Status: offline
it seems that i have found a solution on the german isa site http://www.msisafaq.de/ well, i put only the script here, did not have tested yet.will do it today. Aero P.

(in reply to aeropostale)
Post #: 2
RE: Automate Backup of ISA Config with Script - 14.Dec.2005 11:58:54 AM   
aeropostale

 

Posts: 65
Joined: 19.Jul.2005
From: Lake of Zurich, Switzerland
Status: offline
Here's the script  Dim fileName
Dim WSHNetwork
Dim shareName: shareName = WScript.Arguments(0)
Dim xmldom : set xmldom = CreateObject("Msxml2.DOMDocument")
Dim fpc : set fpc = WScript.CreateObject("Fpc.Root")
Dim array : set array = fpc.GetContainingArray
set WSHNetwork = CreateObject("WScript.Network")
fileName=shareName & "\" & WSHNetwork.ComputerName & "-" & Month(Now) & "-" & Day(Now) & "-
" & Year(Now) & ".xml"
array.Export xmldom, 0
xmldom.save(fileName)

(in reply to aeropostale)
Post #: 3
RE: Automate Backup of ISA Config with Script - 15.Dec.2005 3:35:24 AM   
ClintD

 

Posts: 1848
Joined: 26.Jan.2001
From: Keller, TX
Status: offline
Ise the ISAExportImport utility from the SDK\Samples\Scripts directory on the CD in a batch file.

c:\cscript isaexportimport.vbs e %filename%.xml

(in reply to aeropostale)
Post #: 4
RE: Automate Backup of ISA Config with Script - 15.Dec.2005 8:59:03 AM   
aeropostale

 

Posts: 65
Joined: 19.Jul.2005
From: Lake of Zurich, Switzerland
Status: offline
oh, great.
 
thx a lot ! on my ISA 2004 CD, this vbs is located on SDK\samples\admin  
Aero P.


< Message edited by aeropostale -- 15.Dec.2005 9:03:46 AM >

(in reply to ClintD)
Post #: 5
RE: Automate Backup of ISA Config with Script - 15.Dec.2005 1:56:22 PM   
nofear

 

Posts: 95
Joined: 28.Nov.2005
Status: offline
can you explain please
this script,you mentinoed above,how could i apply it?what should i do
please advice

(in reply to aeropostale)
Post #: 6
RE: Automate Backup of ISA Config with Script - 15.Dec.2005 2:31:53 PM   
ClintD

 

Posts: 1848
Joined: 26.Jan.2001
From: Keller, TX
Status: offline
Tell us what you don't understand about it... it exports the entire ISA configuration into a file named %filename%.xml that you can archive for backup/restore scenarios.

(in reply to nofear)
Post #: 7
RE: Automate Backup of ISA Config with Script - 16.Dec.2005 2:50:45 PM   
nofear

 

Posts: 95
Joined: 28.Nov.2005
Status: offline
Fisrt of all
i need to know..
i have an ISA server 2003 standard edition
what should i do to backup its all configuration to XML via your script?

let me guess...i shall write this script to txt file and save it as .vbs

then i will go and copy it to the ISA desktop and doubleclick it

thats it

or shall i modify the script ..and what about the SDK?what shall i do regarding it?

Dim fileName
Dim WSHNetwork
Dim shareName: shareName = WScript.Arguments(0)
Dim xmldom : set xmldom = CreateObject("Msxml2.DOMDocument")
Dim fpc : set fpc = WScript.CreateObject("Fpc.Root")
Dim array : set array = fpc.GetContainingArray
set WSHNetwork = CreateObject("WScript.Network")
fileName=shareName & "\" & WSHNetwork.ComputerName & "-" & Month(Now) & "-" & Day(Now) & "-
" & Year(Now) & ".xml"
array.Export xmldom, 0
xmldom.save(fileName)

 
 
 
in the script there is (FileName) variable in the first line..shall i change it or what
 
and in the last line there is also  "xmldom.save(fileName) "..shall i enter any file name or just leave the scripts as is?

(in reply to ClintD)
Post #: 8
RE: Automate Backup of ISA Config with Script - 16.Dec.2005 3:41:45 PM   
Ashokk001

 

Posts: 244
Joined: 6.Oct.2005
Status: offline
Nofear,

You don't need to do anything to the script file. Use the file that ClintD is referring to IsaExport.vbs

you need to copy this file into the isa server and use it like again ClintD mentioned.

cscript c:\isaexport.vbs myisabackup.xml, you can give the filename any name i just used the myisabackup.xml as an example.

Once you got the file created using the above menthod, copy it to your memory stick and archive it or store it anywhere safe. HTH,

Ashok.

(in reply to nofear)
Post #: 9
RE: Automate Backup of ISA Config with Script - 16.Dec.2005 4:53:01 PM   
ClintD

 

Posts: 1848
Joined: 26.Jan.2001
From: Keller, TX
Status: offline
In the cscript command, you have to add the 'e' or the 'i' after the vbs file argument.

Export
cscript c:\isaexport.vbs e myisabackup.xml

Import
cscript c:\isaexport.vbs i myisabackup.xml

(in reply to Ashokk001)
Post #: 10
RE: Automate Backup of ISA Config with Script - 19.Dec.2005 10:40:51 AM   
nofear

 

Posts: 95
Joined: 28.Nov.2005
Status: offline
i want to ask final question

As you mentioned above,there is a script in the ISA cd in SDK\SAMPLES\ADMIN\ImportExport.vbs
shall i use this script or the one you mentioned above (listed here below)?

"Dim fileName
Dim WSHNetwork
Dim shareName: shareName = WScript.Arguments(0)
Dim xmldom : set xmldom = CreateObject("Msxml2.DOMDocument")
Dim fpc : set fpc = WScript.CreateObject("Fpc.Root")
Dim array : set array = fpc.GetContainingArray
set WSHNetwork = CreateObject("WScript.Network")
fileName=shareName & "\" & WSHNetwork.ComputerName & "-" & Month(Now) & "-" & Day(Now) & "-
" & Year(Now) & ".xml"
array.Export xmldom, 0
xmldom.save(fileName)
"




which one shall i use,,the above one or the one in SDK\SAMPLES\ADMIN\ImportExport.vbs

(in reply to aeropostale)
Post #: 11
RE: Automate Backup of ISA Config with Script - 19.Dec.2005 10:53:12 AM   
Ashokk001

 

Posts: 244
Joined: 6.Oct.2005
Status: offline
NOfear,

The script that you included in the post is not tested so you can try that in your test network if you wish but i would use the isaexport.vbs since this is from MS directly and is probably gone through some testing.

Can try both if you want but i would recommend the isaexport.vbs personally

HTH,

Ashok.

(in reply to nofear)
Post #: 12
RE: Automate Backup of ISA Config with Script - 19.Dec.2005 11:08:17 AM   
nofear

 

Posts: 95
Joined: 28.Nov.2005
Status: offline
To be sure..you measn the one that is tested and you recommend is the one in script in the ISA cd in SDK\SAMPLES\ADMIN\ImportExport.vbs..right?

(in reply to Ashokk001)
Post #: 13
RE: Automate Backup of ISA Config with Script - 19.Dec.2005 11:26:29 AM   
Ashokk001

 

Posts: 244
Joined: 6.Oct.2005
Status: offline
Yes

(in reply to nofear)
Post #: 14
RE: Automate Backup of ISA Config with Script - 19.Dec.2005 12:27:02 PM   
nofear

 

Posts: 95
Joined: 28.Nov.2005
Status: offline
another question
i want to take a weekly backup for my isa configuration.
is there a way so that this script can be run alone every week (lets say each time to save the XML file to c:\isa FOLDER)
so that i can each week backup that folder.

and if yes..is there is a way so that in week one,the script will generate a file called ISA1.xml..in next week he will create ISA2.xml and so on,so that it will not override the xml it created the previous week..in that case i will have copy of my ISA configuration each week (easiest to restore)
thaaaaaaaaaaaanks!!!

< Message edited by nofear -- 19.Dec.2005 12:28:11 PM >

(in reply to Ashokk001)
Post #: 15
RE: Automate Backup of ISA Config with Script - 19.Dec.2005 2:30:35 PM   
nofear

 

Posts: 95
Joined: 28.Nov.2005
Status: offline
notice
while using the script in the ISA cd in SDK\SAMPLES\ADMIN\ImportExport.vbs ..i noticed the following

When i export the ISA configuration via  the script it gives me XML that its size is somehow smaller (in KB) than when i right click the ISA Server in ISA consol and choose export....this makes me afraid...please advice

(in reply to Ashokk001)
Post #: 16
RE: Automate Backup of ISA Config with Script - 26.May2006 9:00:11 PM   
Bane

 

Posts: 5
Joined: 26.May2006
Status: offline
Any one have a working script to write a differnt export file for each date? Essentially I want to have the date for that day's config file export reflected in the the filename.

Thanks

Jamy

(in reply to aeropostale)
Post #: 17
RE: Automate Backup of ISA Config with Script - 26.May2006 10:13:33 PM   
elmajdal

 

Posts: 6022
Joined: 16.Sep.2004
From: Lebanese in Kuwait
Status: offline
Yes, check this: http://forums.isaserver.org/m_2002017454/mpage_1/key_/tm.htm#2002017767

plus, u can have an email sent to u whenever the backup is done.

_____________________________

Tarek Majdalani

Windows Expert - IT Pro MVP
Facebook : https://www.facebook.com/ElMajdal.Net

(in reply to Bane)
Post #: 18

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [ISA Server 2004 Firewall] >> General >> Automate Backup of ISA Config with Script Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts