Solved

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

Posted on 2011-02-17
2
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Quality of Service (QoS) options are nearly endless when it comes to networks today. This article is merely one example of how it can be handled in a hub-n-spoke design using a 3-tier configuration.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…
Suggested Courses
Course of the Month4 days, 8 hours left to enroll

636 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