Solved

NTBackup Filenames

Posted on 2006-07-21
9
858 Views
Last Modified: 2012-06-21
Does anyone have a solution to this problem?  You can't use wildcards in filenames for NTBackup.  I am backup up to disk using NTBackup, but if I can't use wildcards for the filename, it will just overwrite.  Is there anyway to get around this? I was thinking there might be a possiblity of creating a batch script that calls the for the date, and uses that to create another batch script that executes the backup...any ideas?  Thanks,
0
Comment
Question by:wirthr
  • 3
  • 3
9 Comments
 
LVL 88

Expert Comment

by:rindi
ID: 17154778
0
 
LVL 6

Author Comment

by:wirthr
ID: 17155876
Ok, so here is the batch script I am using

@echo off
rem Batch file for monday backups
rem to be scheduled through Nt's AT command
rem
rem this line is to put todays date with -'s into an environ variable
rem to then be inserted into the tape set label text
for /f "tokens=1,2,3 delims=/" %%a in ('date /t') do set today=%%a-%%b-%%c
echo Backup Script - PDC - Full - by...(11-25-98)
echo .
ntbackup backup "@C:\Documents and Settings\Administrator.ADAMSASSOCIATES\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Monday Backup 5.bks" /a /v:yes /J "Full Backup for %today% /m normal /hc:off /l:s /t normal /f "f:\%today%"
echo Tape Set: Monday Full BU %today%
echo Backup Done

and in the log file I get

Invalid command line parameter 'f:\Fri'.


any idea why?

Thanks,
0
 
LVL 88

Expert Comment

by:rindi
ID: 17155967
Can you try adding the .bkf to the "f:\%today%"? It looks as it replaces the %today% correctly...
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 6

Author Comment

by:wirthr
ID: 17155985
same error

Invalid command line parameter 'f:\Fri'.

0
 
LVL 88

Expert Comment

by:rindi
ID: 17156650
Try it this way, the example is streamlined for tapes:

@echo off
rem Batch file for monday backups
rem to be scheduled through Nt's AT command
rem
rem this line is to put todays date with -'s into an environ variable
rem to then be inserted into the tape set label text
for /f "tokens=1,2,3 delims=/" %%a in ('date /t') do set today=%%a.bkf
echo Backup Script - PDC - Full - by...(11-25-98)
echo .
ntbackup backup "C:\Documents and Settings\Administrator.ADAMSASSOCIATES\Local Settings\Application Data" /J "Full Backup for %today%" /l:f  /f "f:\%today%"
echo Tape Set: Monday Full BU %today%
echo Backup Done
0
 
LVL 6

Author Comment

by:wirthr
ID: 17157185
This is what I did, and should be posted as one of the "time tested solutions".  Works great.  In scheduler, I just scheduled the event for each day of the week, the only thing that needs added is the destination drive letter.   If you want the backup to go to drive F:\, just run

SetBackup.bat F

works perfect


@echo off

REM ==============================================================
REM Options: SetBackup <Drive Letter>
REM Example: SetBackup F
REM ==============================================================
REM Batch file for monday backups
REM Written by the good guys at smbizhost.com
REM ==============================================================

FOR /F "tokens=1,2 delims= " %%F IN ('date /t') Do Set tmpDate=%%G
FOR /F "tokens=1,2,3 delims=/" %%F IN ("%tmpDate%") Do Set tmpDate=%%F-%%G-%%H

ntbackup backup "@C:\Documents and Settings\userdir\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Backup.bks" /a /v:yes /J "Full Backup for %tmpDate%" /m normal /hc:off /l:f /f "%1:\%tmpDate%.bkf"


It should be noted that the backup.bks file needs to be created using ntbackup.  make the selections of what you want backed up and click on job, and then save as.  Then change the following to represent the location of your .bks file.

ntbackup backup "@C:\Documents and Settings\userdir\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Backup.bks"

Thats it!

Thanks,
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 17682067
PAQed with points refunded (500)

CetusMOD
Community Support Moderator
0

Featured Post

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
USB Drives Missing? 5 74
Unable to increase VMFS5 datastore on ESXi 6.0 free hypervisor 4 88
Server 2008 Cluster Fail-over Errors 5 81
Choosing CentOS 16 58
Hi, I've made you some graphics for a better understanding how RAID works. First of all, there are two ways a raid can be generated: - By hardware - By software What does that mean? This means: If you have a hardware RAID controller, there…
In this article, I provide some information on storage disks which go into calculations that will help you figure out how much Input/output Operations Per Second (IOPS) your disk subsystem can deliver. To effectively size & tune up applications l…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
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…

867 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

25 Experts available now in Live!

Get 1:1 Help Now