Solved

Server 2008 backup, how to spit output of batch file to .txt for a log?

Posted on 2011-02-17
2
266 Views
Last Modified: 2012-06-21
The only way to backup over a LAN on server 2008 nativley on a schedule is to have it run as a task. So every day at midnight my server runs a batch file that starts the backup.

My questions is can I have the output of this process put in a .txt file automatically?

All of my other servers are server 2003 and they use NT Backup. It spits out a nice log that goes into a folder that I review everyday.

It would be nice to know what's actually going on.
0
Comment
Question by:sagetechit
2 Comments
 
LVL 6

Expert Comment

by:Bxoz
ID: 34920407
If you open Windows Server Backup you can see on the 1st page if the backup is ok or not
0
 
LVL 5

Accepted Solution

by:
rdhoore108 earned 500 total points
ID: 34920488
I'm not sure what you are starting exactly in your .cmd file (or .bat file), but you should be able to redirect the output of whatever command you are running inside the batch script to a .txt or .log file by using the ">" sign (or >> to append to an existing file).

For example, to capture the output of a dir command:
dir > mydir.txt

Open in new window


To capture all output from all commands at once, you could instead add the output redirection to where you call the batch script in your scheduled job (instead of adding it on each line in the batch script). For example, use the following to call your script from your scheduled task:

cmd.exe /c myscript.cmd > c:\log\mylog.txt

Open in new window


Or did I misunderstand your question?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a guide to configure bridging on Cisco Routers.  This is something I never knew was possible until after making a few phone calls to Cisco.  Using bridging saved our company money by not requiring us to purchase a new switch.  Bridgi…
Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question