Automated backups 
Author Message
 Automated backups

Hi all,

I'm a newbie NT admin, and even newer to scripting.  I finally figured out
how to create a batch file and use the AT command to have a full backup done
nightly.  My tape drive is big enough for the entire hard disk, so tape
swapping wasn't an issue with me (yet!).

My batch file is extremely simple:

c:\winnt\system32\ntbackup backup "r:\" /t normal

and, as I said, the AT process kicks it off  every night.  This was much
cheaper than paying a thousand bucks or so for dedicated backup software,
when all the pieces are already there, but now I'd like to figure out how to
convert this simple batch file into a complex script, so new features could
be added to it as the need arises.

Can anybody show me a quick and dirty way to do this?

Thanks,

Bill Ferguson
USGS
Denver, CO



Tue, 04 Dec 2001 03:00:00 GMT  
 Automated backups
Try this

dim objWshShell

set objWshShell = WScript.CreateObject("WScript.Shell")
objWshShell.Run "c:\winnt\system32\ntbackup backup ""r:\"" /t normal", 0, false
Set objWshShell = Nothing

.Enjoy.
Legolas

Bill Ferguson ha scritto:

Quote:

> Hi all,

> I'm a newbie NT admin, and even newer to scripting.  I finally figured out
> how to create a batch file and use the AT command to have a full backup done
> nightly.  My tape drive is big enough for the entire hard disk, so tape
> swapping wasn't an issue with me (yet!).

> My batch file is extremely simple:

> c:\winnt\system32\ntbackup backup "r:\" /t normal

> and, as I said, the AT process kicks it off  every night.  This was much
> cheaper than paying a thousand bucks or so for dedicated backup software,
> when all the pieces are already there, but now I'd like to figure out how to
> convert this simple batch file into a complex script, so new features could
> be added to it as the need arises.

> Can anybody show me a quick and dirty way to do this?

> Thanks,

> Bill Ferguson
> USGS
> Denver, CO



Fri, 07 Dec 2001 03:00:00 GMT  
 Automated backups
Thank you....  I'll try it tonight...

Quote:

> Try this

> dim objWshShell

> set objWshShell = WScript.CreateObject("WScript.Shell")
> objWshShell.Run "c:\winnt\system32\ntbackup backup ""r:\"" /t normal", 0, false
> Set objWshShell = Nothing

> .Enjoy.
> Legolas

> Bill Ferguson ha scritto:

> > Hi all,

> > I'm a newbie NT admin, and even newer to scripting.  I finally figured out
> > how to create a batch file and use the AT command to have a full backup done
> > nightly.  My tape drive is big enough for the entire hard disk, so tape
> > swapping wasn't an issue with me (yet!).

> > My batch file is extremely simple:

> > c:\winnt\system32\ntbackup backup "r:\" /t normal

> > and, as I said, the AT process kicks it off  every night.  This was much
> > cheaper than paying a thousand bucks or so for dedicated backup software,
> > when all the pieces are already there, but now I'd like to figure out how to
> > convert this simple batch file into a complex script, so new features could
> > be added to it as the need arises.

> > Can anybody show me a quick and dirty way to do this?

> > Thanks,

> > Bill Ferguson
> > USGS
> > Denver, CO

--
Bill Ferguson

http://www.geocities.com/Yosemite/Trails/6314 (Mining)
http://www.my-ged.com/wbfergus/ (GEDCOM data)
http://members.tripod.com/Bill_Ferguson/genealogy/


Fri, 07 Dec 2001 03:00:00 GMT  
 Automated backups
Hi Bill and All,

 I believe even that will not do. What I saw from
your question is, that you try to backup a network
drive. If the scheduler service runs with the
LocalSystem account, this is not possible. The
LocalSystem account does'nt have networking
privilege and it cannot have them.

 Use a separat user account for your scheduler
service. Additionally, importent is, who has done
the connection to your drive "r:". Even the scheduler
have access rights, it will not see the connections
done by another user. You may use a connection
made in your batch file (I would prefer to use
an UNC name instead, but I am not sure, the
ntbackup can use them).

 Hope this helps.

Best regards,
Manfred Braun

(Private)
Lange Roetterstrasse 7
D68167 Mannheim
Germany


(Remove the anti-spam-underscore to mail me!)

Quote:

>Thank you....  I'll try it tonight...


>> Try this

>> dim objWshShell

>> set objWshShell = WScript.CreateObject("WScript.Shell")
>> objWshShell.Run "c:\winnt\system32\ntbackup backup ""r:\"" /t normal", 0, false
>> Set objWshShell = Nothing

>> .Enjoy.
>> Legolas

>> Bill Ferguson ha scritto:

>> > Hi all,

>> > I'm a newbie NT admin, and even newer to scripting.  I finally figured out
>> > how to create a batch file and use the AT command to have a full backup done
>> > nightly.  My tape drive is big enough for the entire hard disk, so tape
>> > swapping wasn't an issue with me (yet!).

>> > My batch file is extremely simple:

>> > c:\winnt\system32\ntbackup backup "r:\" /t normal

>> > and, as I said, the AT process kicks it off  every night.  This was much
>> > cheaper than paying a thousand bucks or so for dedicated backup software,
>> > when all the pieces are already there, but now I'd like to figure out how to
>> > convert this simple batch file into a complex script, so new features could
>> > be added to it as the need arises.

>> > Can anybody show me a quick and dirty way to do this?

>> > Thanks,

>> > Bill Ferguson
>> > USGS
>> > Denver, CO

>--
>Bill Ferguson

>http://www.geocities.com/Yosemite/Trails/6314 (Mining)
>http://www.my-ged.com/wbfergus/ (GEDCOM data)
>http://members.tripod.com/Bill_Ferguson/genealogy/



Fri, 07 Dec 2001 03:00:00 GMT  
 Automated backups
Manfred, Alfredo, and anybody reading this,

Alfredo's script did work for me, so to also kind of address Manfred's
points, let me recover them so this may be help for other "newbies" like
myself. (Actually, this may even be a good short article for new system
admins, if they have a similar server setup).  I hate spending money, even
government money, so why spend money on tape backup software when all the
free parts are already there?

Okay.  First the server hardware and configuration.

My server has two 16GB drives.  I have one small partition as my boot
partion (3GB) and the rest of the drive is set for LAN access by my users.
The other drive I'm using as a mirror copy, so I don't have to worry about
backing it up.  I also have a Sony SCSI tape drive, 12/24 GB, depending on
whether the compression option is activated.

My LAN partition I setup as the R: drive.  This way my users and myself can
all keep references to it the same, as the R: designation was not used by
anybody.

At the server console, logged in as Administrator (renamed of course), I
created an "at" entry from the DOS window, as follows:

at \\igsdgmmas 23:00 /interactive /every:M,T,W,Th,F "c:\scripts\archive.vbs"

(The above is just ONE line, in case the newsgroup or your browser wraps
it).  This runs the backup nightly at 11:00 pm, and I believe the
"/interactive" option will run it as the Administrator account (since that's
how I'm logged in at the server).

The contents of "archive.vbs" is the script supplied by Alfredo:
dim objWshShell

set objWshShell = WScript.CreateObject("WScript.Shell")
objWshShell.Run "c:\winnt\system32\ntbackup backup ""r:\"" /t normal", 0,
false
Set objWshShell = Nothing

I tested all of this last night, and the backup ran flawlessly.  For this
hardware configuration, I didn't need to spend any extra money on
specialized software by using the tools that Microsoft provides with the
system (plus with a little help from the newsgroup).

Eventually I'll wind up modifying the script to include the "/hc:on"
command, to activate the hardware compression, but it's not needed at this
time.  I'll probably also add other commands, to stop and restart services
before and after the backup, and other little niceties, but this is a
sufficient barebones for now.

Thanks again Alfredo and Manfred.

Bill Ferguson
U.S. Geological Survey - Minerals Information Team
Minerals and Materials Analysis Section
PO Box 25046, MS-750
Denver Federal Center
Denver, CO 80225



Sat, 08 Dec 2001 03:00:00 GMT  
 Automated backups
Hi Bill,

 "thanks" to my not-so-good english, may be, I interpret something
wrong. Your "r:" drive, is it a local drive (If you have'nt use the
disk admin, you would normally have c:, d:, e: in your config)?

 The "/interactive" option let the at service execute a command
which will gain access to the desktop (it will show a GUI at
runtime). This don't have anything to do with rights! Default
installations have the scheduler run in the "LocalSystem"
account, not an admin. You must change this, if you have
to have admin rights.

 Just to clarify some things.

Best regards,
Manfred

Quote:

>Manfred, Alfredo, and anybody reading this,

>Alfredo's script did work for me, so to also kind of address Manfred's
>points, let me recover them so this may be help for other "newbies" like
>myself. (Actually, this may even be a good short article for new system
>admins, if they have a similar server setup).  I hate spending money, even
>government money, so why spend money on tape backup software when all the
>free parts are already there?

>Okay.  First the server hardware and configuration.

>My server has two 16GB drives.  I have one small partition as my boot
>partion (3GB) and the rest of the drive is set for LAN access by my users.
>The other drive I'm using as a mirror copy, so I don't have to worry about
>backing it up.  I also have a Sony SCSI tape drive, 12/24 GB, depending on
>whether the compression option is activated.

>My LAN partition I setup as the R: drive.  This way my users and myself can
>all keep references to it the same, as the R: designation was not used by
>anybody.

>At the server console, logged in as Administrator (renamed of course), I
>created an "at" entry from the DOS window, as follows:

>at \\igsdgmmas 23:00 /interactive /every:M,T,W,Th,F

"c:\scripts\archive.vbs"

- Show quoted text -

Quote:

>(The above is just ONE line, in case the newsgroup or your browser wraps
>it).  This runs the backup nightly at 11:00 pm, and I believe the
>"/interactive" option will run it as the Administrator account (since
that's
>how I'm logged in at the server).

>The contents of "archive.vbs" is the script supplied by Alfredo:
>dim objWshShell

>set objWshShell = WScript.CreateObject("WScript.Shell")
>objWshShell.Run "c:\winnt\system32\ntbackup backup ""r:\"" /t normal", 0,
>false
>Set objWshShell = Nothing

>I tested all of this last night, and the backup ran flawlessly.  For this
>hardware configuration, I didn't need to spend any extra money on
>specialized software by using the tools that Microsoft provides with the
>system (plus with a little help from the newsgroup).

>Eventually I'll wind up modifying the script to include the "/hc:on"
>command, to activate the hardware compression, but it's not needed at this
>time.  I'll probably also add other commands, to stop and restart services
>before and after the backup, and other little niceties, but this is a
>sufficient barebones for now.

>Thanks again Alfredo and Manfred.

>Bill Ferguson
>U.S. Geological Survey - Minerals Information Team
>Minerals and Materials Analysis Section
>PO Box 25046, MS-750
>Denver Federal Center
>Denver, CO 80225



Mon, 10 Dec 2001 03:00:00 GMT  
 Automated backups
Hi Manfred,

Thanks for the clarifications.  In DiskAdmin I defined my "non-boot"
extended partition as the R: drive, since none of my users had the R:
drive mapped, this way we could all keep references to it the same,
cutting down on some mis-understandings.

The Microsoft documentation was unclear as to what the "/interactive"
option meant.  All it says is "Allows the job to interact with the
desktop of the user who is logged in at the time the job runs.", leading
me to believe that if I was logged on as a user, I wouldn't be able to
get all of the files.

Thanks again....  I'll also go ahead and copy this over to the newsgroup
so others may benefit as well.

--
                        Bill Ferguson
U.S. Geological Survey - Minerals Information Team
                    PO Box 25046, MS-750
                    Denver Federal Center
                   Denver, Colorado 80225
    Voice (303)236-8747 ext. 321     Fax   (303)236-4208

Quote:

> Hi Bill,

>  "thanks" to my not-so-good english, may be, I interpret something
> wrong. Your "r:" drive, is it a local drive (If you have'nt use the
> disk admin, you would normally have c:, d:, e: in your config)?

>  The "/interactive" option let the at service execute a command
> which will gain access to the desktop (it will show a GUI at
> runtime). This don't have anything to do with rights! Default
> installations have the scheduler run in the "LocalSystem"
> account, not an admin. You must change this, if you have
> to have admin rights.

>  Just to clarify some things.

> (Sorry, that I sent this per e-mail - I got error messages replying
> to the news since two days..!!)

> Best regards,
> Manfred



Tue, 11 Dec 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Need automate backup operation

2. Automate Backups

3. Wscript.shell => run backup script and waiting for backup to complet

4. Simple backup script question from a newbie

5. Backup IIS

6. IIS backup

7. Popup: Backup in Progress

8. MVS backup form

9. Backup Strategy

10. Test my backup script - anyone ?

11. backup gianfranco

12. Media Pool in NT Backup

 

 
Powered by phpBB® Forum Software