Solved

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

Posted on 2011-02-17
2
263 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

New Server 172.16.200.2  was moved from behind Router R2 f0/1 to behind router R1 int f/01 and has now address 172.16.100.2. But we want users still to be able to connected to it by old IP. How to do it ? We can used destination NAT (DNAT).  In DNAT…
It happens many times that access list (ACL) have to be applied to outgoing router interface in order to limit some traffic.This article is about how to test ACL from the router which is not very intuitive for everyone. Below scenario shows simple s…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now