Solved

Create a batch file for NTBackup - "simple"

Posted on 2008-06-17
4
1,767 Views
Last Modified: 2013-11-14
I had thought that my NTBackup script was working well, but it doesn't do what I need.  What I am looking to do is create a Batch File that can be run manually & launch NTBackup & backup any changes since the last backup.  

For example, the user will launch the Backup.bat & it will do a full initial backup to Y:\Documents.bkf....now the next time they double-click on backup.bat, I want it only to add what has been added & delete was has been deleted.  I had thought the incremental switch would handle this, but apparently not.

Below is what I have for the script, but I am apparently not correct.  Please help me with what parameters I need to use/change.  I want this to be as easy as possible for my users
@echo off
echo Running Backup...
echo ------------------------
echo DO NOT CLOSE THIS WINDOW
echo ------------------------
echo DO NOT CLOSE THIS WINDOW
echo ------------------------
echo DO NOT CLOSE THIS WINDOW
echo ------------------------
echo DO NOT CLOSE THIS WINDOW
echo ------------------------
echo DO NOT CLOSE THIS WINDOW
 
ntbackup backup "C:\documents and settings\%username%\Favorites" /J "Backup Favs" /F Y:\Backup_Favs.bkf /M incremental /SNAP:on
 
ntbackup backup "C:\documents and settings\%username%\Desktop" /J "Backup Desktop" /F Y:\Backup_Desktop.bkf /M incremental /SNAP:on
 
ntbackup backup "C:\documents and settings\%username%\My Documents" /J "Backup Docs" /F Y:\Backup_Docs.bkf /M incremental /SNAP:on

Open in new window

0
Comment
Question by:rustyrpage
[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
  • 3
4 Comments
 
LVL 6

Author Comment

by:rustyrpage
ID: 21808176
There are a few other "nice to haves":

1) Have it verify the files have been backed up & if there were any exceptions (which shouldn't happen with VSC on), have it open a text document with the log showing what wasn't backed up.

2) Have it tell them in the command prompt window when they last backed up (if possible).

Also, I am testing this all out on my computer & I have a feeling that all of my files have already been marked as backed up.  Is there a way to unmark them so that I can properly test this?

Thanks!
0
 
LVL 63

Accepted Solution

by:
SysExpert earned 500 total points
ID: 21826279
1) incremental will only backup files with the archive bit on - files that have changed since the last backup.
Also, yours look like they will overwrite any previous backups.

I would instead do a full backup to a different directory, and then check to see if it exists. If it does do an incremental, into a differnt location or different file name.

You might also look into doing differential rather than incrementals, and see if there is a verify switch.


I hope this helps !
0
 
LVL 6

Author Comment

by:rustyrpage
ID: 21830859
I just changed it to use RoboCopy & it is MUCH better...I just put Robocopy.exe on the USB drive & it is fast & leaves a log for them.  I combine that with an Auto-It script & it automatically runs the backups, then displays the log on screen when it is done.
0
 
LVL 6

Author Closing Comment

by:rustyrpage
ID: 31468175
Thanks anyway for your input!
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (http://www.concertocloud.com/about/in-the-news/2017/02/0…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

733 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